mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-21 00:31:50 +00:00
Move likely() definitions to dyngen-exec.h, they are only used in the CPU
core where it's most useful (give a stronger hint to gcc4)
This commit is contained in:
parent
b9b1fd4e22
commit
e5051464bf
@ -166,21 +166,6 @@ typedef int64 intptr;
|
||||
#error "Unsupported size of pointer"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Helper macros to annotate likely branch directions
|
||||
**/
|
||||
|
||||
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
#endif
|
||||
#ifndef likely
|
||||
#define likely(x) (x)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Helper functions to byteswap data
|
||||
**/
|
||||
|
@ -163,4 +163,20 @@ extern int __op_jmp0, __op_jmp1;
|
||||
#define ASM_LONG ".long"
|
||||
#endif
|
||||
|
||||
// Helper macros to annotate likely branch directions
|
||||
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
#ifndef likely
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef likely
|
||||
#define likely(x) (x)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
#endif /* DYNGEN_EXEC_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user