2007-11-13 20:32:02 +00:00
|
|
|
--- qemu/Makefile.target
|
|
|
|
+++ qemu/Makefile.target
|
|
|
|
@@ -396,6 +396,9 @@
|
2007-07-30 18:20:35 +00:00
|
|
|
ifeq ($(findstring z80, $(TARGET_ARCH) $(ARCH)),z80)
|
|
|
|
LIBOBJS+=z80-dis.o
|
|
|
|
endif
|
|
|
|
+ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390)
|
|
|
|
+LIBOBJS+=s390-dis.o
|
|
|
|
+endif
|
|
|
|
|
|
|
|
ifdef CONFIG_GDBSTUB
|
|
|
|
OBJS+=gdbstub.o
|
2007-11-13 20:32:02 +00:00
|
|
|
--- qemu/dis-asm.h
|
|
|
|
+++ qemu/dis-asm.h
|
|
|
|
@@ -388,6 +388,7 @@
|
|
|
|
extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
|
|
|
|
extern int print_insn_crisv32 PARAMS ((bfd_vma, disassemble_info*));
|
2007-07-30 18:20:35 +00:00
|
|
|
extern int print_insn_z80 PARAMS ((bfd_vma, disassemble_info*));
|
|
|
|
+extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* Fetch the disassembler for a given BFD, if that support is available. */
|
2007-11-13 20:32:02 +00:00
|
|
|
--- qemu/dyngen.c
|
|
|
|
+++ qemu/dyngen.c
|
2007-10-02 23:09:38 +00:00
|
|
|
@@ -1495,8 +1495,8 @@
|
|
|
|
p = (void *)(p_end - 2);
|
|
|
|
if (p == p_start)
|
|
|
|
error("empty code for %s", name);
|
|
|
|
- if (get16((uint16_t *)p) != 0x07fe && get16((uint16_t *)p) != 0x07f4)
|
|
|
|
- error("br %%r14 expected at the end of %s", name);
|
|
|
|
+ if ((get16((uint16_t *)p) & 0xfff0) != 0x07f0)
|
|
|
|
+ error("br %%rX expected at the end of %s", name);
|
|
|
|
copy_size = p - p_start;
|
|
|
|
}
|
|
|
|
#elif defined(HOST_ALPHA)
|
2007-11-13 20:32:02 +00:00
|
|
|
--- qemu/target-i386/translate.c
|
|
|
|
+++ qemu/target-i386/translate.c
|
2007-07-30 18:20:35 +00:00
|
|
|
@@ -1795,7 +1795,11 @@
|
|
|
|
case CC_OP_SUBW:
|
|
|
|
case CC_OP_SUBL:
|
|
|
|
case CC_OP_SUBQ:
|
|
|
|
+#ifdef __s390__
|
|
|
|
+ func = NULL; /* does not work on S/390 for unknown reasons */
|
|
|
|
+#else
|
|
|
|
func = gen_jcc_sub[s->cc_op - CC_OP_SUBB][jcc_op];
|
|
|
|
+#endif
|
|
|
|
break;
|
2007-11-13 20:32:02 +00:00
|
|
|
|
2007-07-30 18:20:35 +00:00
|
|
|
/* some jumps are easy to compute */
|
|
|
|
@@ -1843,7 +1847,11 @@
|
|
|
|
func = gen_jcc_sub[(s->cc_op - CC_OP_ADDB) % 4][jcc_op];
|
|
|
|
break;
|
|
|
|
case JCC_S:
|
|
|
|
+#ifdef __s390__
|
|
|
|
+ func = NULL;
|
|
|
|
+#else
|
|
|
|
func = gen_jcc_sub[(s->cc_op - CC_OP_ADDB) % 4][jcc_op];
|
|
|
|
+#endif
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
func = NULL;
|