The following patch is to make sparc64-softmmu compilable (tested on
OS X).
Index: target-sparc/op.c
===================================================================
--- target-sparc/op.c (revision 71)
+++ target-sparc/op.c (working copy)
@@ -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()
Index: target-sparc/exec.h
===================================================================
--- target-sparc/exec.h (revision 71)
+++ target-sparc/exec.h (working copy)
@@ -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);
Index: target-sparc/op_helper.c
===================================================================
--- target-sparc/op_helper.c (revision 71)
+++ target-sparc/op_helper.c (working copy)
@@ -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)
Index: target-sparc/translate.c
===================================================================
--- target-sparc/translate.c (revision 71)
+++ target-sparc/translate.c (working copy)
@@ -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;
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel