[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h |
Date: |
Wed, 19 Sep 2007 22:48:28 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi all,
The patch below moves likely()/unlikely() definitions to exec-all.h
from target-alpha/cpu.h and target-ppc/cpu.h. This way they can be used
on other targets.
Bye,
Aurelien
Index: exec-all.h
===================================================================
RCS file: /sources/qemu/qemu/exec-all.h,v
retrieving revision 1.61
diff -u -d -p -r1.61 exec-all.h
--- exec-all.h 17 Sep 2007 08:09:44 -0000 1.61
+++ exec-all.h 19 Sep 2007 20:34:04 -0000
@@ -32,6 +32,9 @@
#define __builtin_expect(x, n) (x)
#endif
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
#ifdef __i386__
#define REGPARM(n) __attribute((regparm(n)))
#else
Index: target-alpha/cpu.h
===================================================================
RCS file: /sources/qemu/qemu/target-alpha/cpu.h,v
retrieving revision 1.5
diff -u -d -p -r1.5 cpu.h
--- target-alpha/cpu.h 16 Sep 2007 21:08:01 -0000 1.5
+++ target-alpha/cpu.h 19 Sep 2007 20:34:04 -0000
@@ -32,10 +32,6 @@
#include "softfloat.h"
-/* XXX: put this in a common place */
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-
#define TARGET_HAS_ICE 1
#define ELF_MACHINE EM_ALPHA
Index: target-ppc/cpu.h
===================================================================
RCS file: /sources/qemu/qemu/target-ppc/cpu.h,v
retrieving revision 1.54
diff -u -d -p -r1.54 cpu.h
--- target-ppc/cpu.h 19 Sep 2007 05:46:03 -0000 1.54
+++ target-ppc/cpu.h 19 Sep 2007 20:34:04 -0000
@@ -88,10 +88,6 @@ typedef uint32_t ppc_gpr_t;
#define ICACHE_LINE_SIZE 32
#define DCACHE_LINE_SIZE 32
-/* XXX: put this in a common place */
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-
/*****************************************************************************/
/* PVR definitions for most known PowerPC */
enum {
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' address@hidden | address@hidden
`- people.debian.org/~aurel32 | www.aurel32.net
- [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h,
Aurelien Jarno <=