qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] 64bit clean cris-softmmu
@ 2007-11-11 10:26 Carlo Marcelo Arenas Belon
  0 siblings, 0 replies; only message in thread
From: Carlo Marcelo Arenas Belon @ 2007-11-11 10:26 UTC (permalink / raw)
  To: qemu-devel

The following patch makes cris-softmmu compile in a 64bit host without
warnings by defining that the target CPU is 32bit explicitly and casting the
use of pointers into an uint32_t.

Carlo

---
Index: target-cris/cpu.h
===================================================================
RCS file: /sources/qemu/qemu/target-cris/cpu.h,v
retrieving revision 1.3
diff -u -r1.3 cpu.h
--- target-cris/cpu.h	10 Nov 2007 15:15:52 -0000	1.3
+++ target-cris/cpu.h	11 Nov 2007 09:53:49 -0000
@@ -21,6 +21,7 @@
 #ifndef CPU_CRIS_H
 #define CPU_CRIS_H
 
+#define TARGET_PHYS_ADDR_BITS 32
 #define TARGET_LONG_BITS 32
 
 #include "cpu-defs.h"
Index: target-cris/op_helper.c
===================================================================
RCS file: /sources/qemu/qemu/target-cris/op_helper.c,v
retrieving revision 1.3
diff -u -r1.3 op_helper.c
--- target-cris/op_helper.c	29 Oct 2007 14:39:49 -0000	1.3
+++ target-cris/op_helper.c	11 Nov 2007 10:05:31 -0000
@@ -60,7 +60,7 @@
     if (__builtin_expect(ret, 0)) {
         if (retaddr) {
             /* now we have a real cpu fault */
-            pc = (target_phys_addr_t)retaddr;
+            pc = (target_phys_addr_t)(unsigned long)retaddr;
             tb = tb_find_pc(pc);
             if (tb) {
                 /* the PC is inside the translated code. It means that we have

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-11 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-11 10:26 [Qemu-devel] [PATCH] 64bit clean cris-softmmu Carlo Marcelo Arenas Belon

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