Commit cbecba264bb870608ffbf7c9df8102116432a7df

Authored by j_mayer
1 parent ff937dba

Move likely and unlikely macros in a common place (Aurelien Jarno).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3192 c046a42c-6fe2-441c-8c8c-71466251a162
exec-all.h
... ... @@ -32,6 +32,9 @@
32 32 #define __builtin_expect(x, n) (x)
33 33 #endif
34 34  
  35 +#define likely(x) __builtin_expect(!!(x), 1)
  36 +#define unlikely(x) __builtin_expect(!!(x), 0)
  37 +
35 38 #ifdef __i386__
36 39 #define REGPARM(n) __attribute((regparm(n)))
37 40 #else
... ...
target-alpha/cpu.h
... ... @@ -32,10 +32,6 @@
32 32  
33 33 #include "softfloat.h"
34 34  
35   -/* XXX: put this in a common place */
36   -#define likely(x) __builtin_expect(!!(x), 1)
37   -#define unlikely(x) __builtin_expect(!!(x), 0)
38   -
39 35 #define TARGET_HAS_ICE 1
40 36  
41 37 #define ELF_MACHINE EM_ALPHA
... ...
target-ppc/cpu.h
... ... @@ -88,10 +88,6 @@ typedef uint32_t ppc_gpr_t;
88 88 #define ICACHE_LINE_SIZE 32
89 89 #define DCACHE_LINE_SIZE 32
90 90  
91   -/* XXX: put this in a common place */
92   -#define likely(x) __builtin_expect(!!(x), 1)
93   -#define unlikely(x) __builtin_expect(!!(x), 0)
94   -
95 91 /*****************************************************************************/
96 92 /* PVR definitions for most known PowerPC */
97 93 enum {
... ...