From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IY6TK-0002zE-Ee for qemu-devel@nongnu.org; Wed, 19 Sep 2007 16:48:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IY6TI-0002xK-W1 for qemu-devel@nongnu.org; Wed, 19 Sep 2007 16:48:34 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IY6TI-0002xD-Rf for qemu-devel@nongnu.org; Wed, 19 Sep 2007 16:48:32 -0400 Received: from hall.aurel32.net ([88.191.38.19]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IY6TI-0003CO-FM for qemu-devel@nongnu.org; Wed, 19 Sep 2007 16:48:32 -0400 Received: from aurel32 by hall.aurel32.net with local (Exim 4.63) (envelope-from ) id 1IY6TE-0002x7-2M for qemu-devel@nongnu.org; Wed, 19 Sep 2007 22:48:28 +0200 Date: Wed, 19 Sep 2007 22:48:28 +0200 From: Aurelien Jarno Message-ID: <20070919204828.GA11298@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Sender: "aurel32,,," Subject: [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net