1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
Index: libffi/ChangeLog
===================================================================
--- libffi.orig/ChangeLog
+++ libffi/ChangeLog
@@ -35,6 +35,11 @@
* testsuite/libffi.call/struct1_win32.c: New test.
* testsuite/libffi.call/struct2_win32.c: New test.
+2012-01-23 Anthony Green <green@moxielogic.com>
+ Dmitry Nadezhin <dmitry.nadezhin@gmail.com>
+
+ * include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
+
2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
Index: libffi/include/ffi_common.h
===================================================================
--- libffi.orig/include/ffi_common.h
+++ libffi/include/ffi_common.h
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
- ffi_common.h - Copyright (C) 2011 Anthony Green
+ ffi_common.h - Copyright (C) 2011, 2012 Anthony Green
Copyright (C) 2007 Free Software Foundation, Inc
Copyright (c) 1996 Red Hat, Inc.
@@ -118,8 +118,8 @@ typedef float FLOAT32;
#ifndef __GNUC__
#define __builtin_expect(x, expected_value) (x)
#endif
-#define LIKELY(x) __builtin_expect((x),1)
-#define UNLIKELY(x) __builtin_expect((x),1)
+#define LIKELY(x) __builtin_expect(!!(x),1)
+#define UNLIKELY(x) __builtin_expect((x)!=0,0)
#ifdef __cplusplus
}
|