Skip to contentSkip to conversation

64bit clean cris-softmmu

PATCH New Carlo Marcelo Arenas Belon 1 participant 1 message Nov 11, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 64bit clean cris-softmmu

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

cpu.h +1 -0
diff -u -r1.3 cpu.h
@@ -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

op_helper.c +1 -1
diff -u -r1.3 op_helper.c
@@ -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