From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h
Date: Wed, 19 Sep 2007 22:48:28 +0200 [thread overview]
Message-ID: <20070919204828.GA11298@hall.aurel32.net> (raw)
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
next reply other threads:[~2007-09-19 20:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 20:48 Aurelien Jarno [this message]
2007-09-20 9:38 ` [Qemu-devel] [PATCH] Move likely()/unlikely() to exec-all.h J. Mayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070919204828.GA11298@hall.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).