qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h
@ 2007-09-19 20:48 Aurelien Jarno
  2007-09-20  9:38 ` J. Mayer
  0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2007-09-19 20:48 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h
  2007-09-19 20:48 [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h Aurelien Jarno
@ 2007-09-20  9:38 ` J. Mayer
  0 siblings, 0 replies; 2+ messages in thread
From: J. Mayer @ 2007-09-20  9:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aurelien Jarno

On Wed, 2007-09-19 at 22:48 +0200, Aurelien Jarno wrote:
> Hi all,

Hi,

> 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.

Good idea, I will apply this.

Regards.

-- 
J. Mayer <l_indien@magic.fr>
Never organized

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-20  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 20:48 [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h Aurelien Jarno
2007-09-20  9:38 ` J. Mayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).