qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tci: Use uintptr_t for the GETPC() macro


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] tci: Use uintptr_t for the GETPC() macro
Date: Tue, 17 Apr 2012 18:49:52 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20

Am 17.04.2012 18:40, schrieb Eric Blake:
On 04/17/2012 10:36 AM, Stefan Weil wrote:
This completes commit 2050396801ca0c8359364d61eaadece951006057
and fixes builds with TCI.

Signed-off-by: Stefan Weil<address@hidden>
---
  exec-all.h |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/exec-all.h b/exec-all.h
index a963fd4..e766f9d 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -284,7 +284,7 @@ extern int tb_invalidated_flag;
     For all others, GETPC remains undefined (which makes TCI a little faster. 
*/
  # if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4)
  extern void *tci_tb_ptr;
-#  define GETPC() tci_tb_ptr
+#  define GETPC() (uintptr_t)tci_tb_ptr
Missing ().  Any time you add a cast to a macro, you need to fully
parenthesize the entire expression.

This is a good rule in general, but not needed here, because
tci_tb_ptr is not a macro argument nor a macro!

The declaration of tci_tb_ptr is preceding the GETPC() macro.

Cheers,
Stefan W.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]