[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.8] x86/emul: add likely()/unlikely() to test harness



commit d57590205ebab425d670340c788a9ad4f4ad9914
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu Dec 22 16:23:37 2016 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Dec 22 16:23:37 2016 +0100

    x86/emul: add likely()/unlikely() to test harness
    
    Fix a build problem introduced in c/s 122dd9575c7 "x86emul:
    in_longmode() should not ignore ->read_msr() errors" by providing an
    implementation of likely()/unlikely().
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    
    Cherrypicked out of:
    
    master commit: 3e84c8da7d2c5442a12789dae7163dca6c0e154f
    master date: 2016-12-02 17:23:01 +0000
---
 tools/tests/x86_emulator/x86_emulate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/tests/x86_emulator/x86_emulate.c 
b/tools/tests/x86_emulator/x86_emulate.c
index c46b7fc..19d8385 100644
--- a/tools/tests/x86_emulator/x86_emulate.c
+++ b/tools/tests/x86_emulator/x86_emulate.c
@@ -50,4 +50,7 @@ typedef bool bool_t;
 #define __init
 #define __maybe_unused __attribute__((__unused__))
 
+#define likely(x)     __builtin_expect(!!(x), true)
+#define unlikely(x)   __builtin_expect(!!(x), false)
+
 #include "x86_emulate/x86_emulate.c"
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.8

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.