all repos — mgba @ 37554a40ea338bfb2e3971e8854091c55f77faeb

mGBA Game Boy Advance Emulator

Add likely/unlikely macros
Jeffrey Pfau jeffrey@endrift.com
Wed, 22 Oct 2014 22:39:36 -0700
commit

37554a40ea338bfb2e3971e8854091c55f77faeb

parent

c9f0ac5c7b62bea8f83d3929d07132d0856ca4b8

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/arm/macros.hsrc/arm/macros.h

@@ -61,4 +61,7 @@ return INS_BITS(src, (START), (START) + (SIZE), bits); \

} #define DECL_BIT(TYPE, FIELD, BIT) DECL_BITS(TYPE, FIELD, BIT, 1) + +#define LIKELY(X) __builtin_expect(!!(X), 1) +#define UNLIKELY(X) __builtin_expect(!!(X), 0) #endif