mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Avoid duplicated definitions: move common definitions from exec-all.h
and qemu-common.h to osdep.h. Include this header in translate-op.c. Make sure it's included first in darwin-user/qemu.h. To avoid discarded inlining bug, define inline as always_inline and always_inline as (( attribute (always_inline) )) __inline__. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3698 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
8a0ef21949
commit
df2542c737
5 changed files with 41 additions and 63 deletions
30
exec-all.h
30
exec-all.h
|
@ -21,36 +21,6 @@
|
|||
/* allow to see translation results - the slowdown should be negligible, so we leave it */
|
||||
#define DEBUG_DISAS
|
||||
|
||||
#ifndef glue
|
||||
#define xglue(x, y) x ## y
|
||||
#define glue(x, y) xglue(x, y)
|
||||
#define stringify(s) tostring(s)
|
||||
#define tostring(s) #s
|
||||
#endif
|
||||
|
||||
#ifndef likely
|
||||
#if __GNUC__ < 3
|
||||
#define __builtin_expect(x, n) (x)
|
||||
#endif
|
||||
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
#endif
|
||||
|
||||
#ifndef always_inline
|
||||
#if (__GNUC__ < 3) || defined(__APPLE__)
|
||||
#define always_inline inline
|
||||
#else
|
||||
#define always_inline __attribute__ (( always_inline )) inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
#define REGPARM(n) __attribute((regparm(n)))
|
||||
#else
|
||||
#define REGPARM(n)
|
||||
#endif
|
||||
|
||||
/* is_jmp field values */
|
||||
#define DISAS_NEXT 0 /* next instruction can be analyzed */
|
||||
#define DISAS_JUMP 1 /* only pc was modified dynamically */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue