qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 056/111] m68k-linux-user: add '--enable-emulop'


From: Bryce Lanham
Subject: [Qemu-devel] [PATCH 056/111] m68k-linux-user: add '--enable-emulop'
Date: Wed, 17 Aug 2011 15:47:01 -0500

From: Laurent Vivier <address@hidden>

Allow to configure if the m68k emulator must implement
fake operation to allow returning from the emulator when
the emulator is used with the m68k-tester tool.

Signed-off-by: Laurent Vivier <address@hidden>
---
 configure               |   11 +++++++++++
 target-m68k/cpu.h       |    3 +++
 target-m68k/translate.c |   10 ++++++++++
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 40b1fa9..23ec821 100755
--- a/configure
+++ b/configure
@@ -135,6 +135,7 @@ kvm="no"
 gprof="no"
 debug_tcg="no"
 debug_mon="no"
+emulop="no"
 debug="no"
 strip_opt="yes"
 bigendian="no"
@@ -582,6 +583,10 @@ for opt do
   ;;
   --disable-debug-tcg) debug_tcg="no"
   ;;
+  --enable-emulop) emulop="yes"
+  ;;
+  --disable-emulop) emulop="no"
+  ;;
   --enable-debug-mon) debug_mon="yes"
   ;;
   --disable-debug-mon) debug_mon="no"
@@ -1046,6 +1051,8 @@ echo "  --disable-usb-redir      disable usb network 
redirection support"
 echo "  --enable-usb-redir       enable usb network redirection support"
 echo "  --disable-guest-agent    disable building of the QEMU Guest Agent"
 echo "  --enable-guest-agent     enable building of the QEMU Guest Agent"
+echo "  --enable-emulop          enable emulation tester helper"
+echo "  --disable-emulop         disable emulation tester helper"
 echo ""
 echo "NOTE: The object files are built at the place where configure is 
launched"
 exit 1
@@ -2684,6 +2691,7 @@ echo "host CPU          $cpu"
 echo "host big endian   $bigendian"
 echo "target list       $target_list"
 echo "tcg debug enabled $debug_tcg"
+echo "emulop enabled    $emulop"
 echo "Mon debug enabled $debug_mon"
 echo "gprof enabled     $gprof"
 echo "sparse enabled    $sparse"
@@ -3449,6 +3457,9 @@ if test ! -z "$gdb_xml_files" ; then
   echo "TARGET_XML_FILES=$list" >> $config_target_mak
 fi
 
+if test "$target_user_only" = "yes" -a  "$target_arch2" = "m68k" -a "$emulop" 
= "yes" ; then
+  echo "CONFIG_EMULOP=y" >> $config_target_mak
+fi
 if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
   echo "TARGET_HAS_BFLT=y" >> $config_target_mak
 fi
diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h
index 0d5e3d3..e316b1e 100644
--- a/target-m68k/cpu.h
+++ b/target-m68k/cpu.h
@@ -54,6 +54,9 @@
 
 #define EXCP_RTE            0x100
 #define EXCP_HALT_INSN      0x101
+#ifdef CONFIG_EMULOP
+#define EXCP_EXEC_RETURN    0x20000
+#endif
 
 #define NB_MMU_MODES 2
 
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index f93ad02..b011a5e 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -3904,6 +3904,13 @@ DISAS_INSN(to_mext)
         gen_helper_set_mac_extu(cpu_env, val, acc);
 }
 
+#ifdef CONFIG_EMULOP
+DISAS_INSN(emulop_exec_return)
+{
+    gen_exception(s, s->pc - 2, EXCP_EXEC_RETURN);
+}
+#endif
+
 static disas_proc opcode_table[65536];
 
 static void
@@ -4173,6 +4180,9 @@ void register_m68k_insns (CPUM68KState *env)
     INSN(cpushl,    f428, ff38, CF_ISA_A);
     INSN(wddata,    fb00, ff00, CF_ISA_A);
     INSN(wdebug,    fbc0, ffc0, CF_ISA_A);
+#ifdef CONFIG_EMULOP
+    INSN(emulop_exec_return, 7100, ffff, M68000);
+#endif
 #undef INSN
 }
 
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]