Skip to contentSkip to conversation

sun4u patch

Qemu-devel Jose Renau 1 participant 1 message Jan 26, 2006

lore
Share & tools
lore

Jose Renau

author
#0 lore raw

The following patch is to make sparc64-softmmu compilable (tested on
OS X).

op.c +14 -2
Index: target-sparc/op.c
===================================================================
@@ -851,6 +851,7 @@
 
 void OPPROTO op_wrtick(void)
 {
+  do_op_not_supported("op_wrtick");
     // XXX write cycle counter and bit 31
 }
 
@@ -1428,6 +1429,17 @@
 {
     do_fitod();
 }
+#ifdef TARGET_SPARC64
+void OPPROTO op_fxtos(void)
+{
+  do_fxtos();
+}
+
+void OPPROTO op_fxtod(void)
+{
+  do_fxtod();
+}
+#endif
 #else
 void OPPROTO op_fitos(void)
 {
@@ -1545,8 +1557,8 @@
 
 void OPPROTO op_sir(void)
 {
-    // XXX
-
+  do_op_not_supported("op_sir");
+  // XXX
 }
 
 void OPPROTO op_ld_asi_reg()
exec.h +1 -0
Index: target-sparc/exec.h
===================================================================
@@ -73,6 +73,7 @@
 void do_ldd_user(target_ulong addr);
 void do_ldd_raw(target_ulong addr);
 void do_interrupt(int intno);
+void do_op_not_supported(const char *str);
 void raise_exception(int tt);
 void memcpy32(target_ulong *dst, const target_ulong *src);
 target_ulong mmu_probe(CPUState *env, target_ulong address, int 

mmulev);

op_helper.c +15 -0
Index: target-sparc/op_helper.c
===================================================================
@@ -3,6 +3,11 @@
 //#define DEBUG_PCALL
 //#define DEBUG_MMU
 
+void do_op_not_supported(const char *str)
+{
+  fprintf(logfile, "%s not supported\n", str);
+}
+
 void raise_exception(int tt)
 {
     env->exception_index = tt;
@@ -19,6 +24,16 @@
 {
     DT0 = (double) *((int32_t *)&FT1);
 }
+
+void do_fxtos(void)
+{
+    FT0 = (float) *((int32_t *)&FT1);
+}
+
+void do_fxtod(void)
+{
+    DT0 = (double) *((int32_t *)&FT1);
+}
 #endif
 
 void do_fabss(void)
translate.c +2 -1
Index: target-sparc/translate.c
===================================================================
@@ -1361,7 +1361,8 @@
             } else if (xop == 0x2b) { /* rdtbr / V9 flushw */
 
 #ifdef TARGET_SPARC64
-                gen_op_flushw(1);
+	      // gen_op_flushw(1);
+	        gen_op_flushw();
 #else
                 if (!supervisor(dc))
                     goto priv_insn;