* build / debug improvements for gx JIT sim prototype
authorFrank Ch. Eigler <fche@redhat.com>
Wed, 30 Dec 1998 18:30:48 +0000 (18:30 +0000)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 30 Dec 1998 18:30:48 +0000 (18:30 +0000)
sim/m32r-gx/ChangeLog
sim/m32r-gx/cpuall.h
sim/m32r-gx/gx-translate.c
sim/m32r-gx/sim-main.h

index a04bd6fdcb53e04d26ef7bd554e1022a188c3891..7c9fec0554592a1139cdee23b8afb51fc54f9773 100644 (file)
@@ -1,3 +1,11 @@
+1998-12-30  Frank Ch. Eigler  <fche@elastic.org>
+
+       * cpuall.h: Don't include sim-model.h.
+       * gx-translate.c (m32r_emit_short_insn): Emit a PC trace on stdout
+       if $GX_TRACE is set.
+       (m32r_emit_long_insn): Ditto.
+       * sim-main.h: #undef some newly imported macros from cgen headers.
+
 1998-12-05  Frank Ch. Eigler  <fche@elastic.org>
 
        * gx-translate.c (m32r_emit_short_insn): Correct ABI result
index 11213e3f57db5f83e3710779e2e48e923d8dd9c0..f159213673b9d86220998a1464fbcbf8d681eb48 100644 (file)
@@ -1,2 +1,2 @@
 #include "sim-cpu.h"
-#include "sim-model.h"
+/* #include "sim-model.h" */
index aa0a0f1f05badaa5a71b7ffa52d825520387871c..b3db866946229b4e6abd6b29846c8aadf90e965b 100644 (file)
@@ -435,7 +435,11 @@ m32r_emit_long_insn(sim_gx_block* gx, PCADDR pc, unsigned insn, int optimized)
 
   ASSERT(f != NULL);
 
-  /* fprintf(f, "      printf(\"0x%06x\\n\");\n", pc); */
+  /* force PC trace by environment variable */
+#ifdef HAVE_GETENV
+  if(getenv("GX_TRACE"))
+    fprintf(f, "      printf(\"0x%06x\\n\");\n", pc);
+#endif
 
   if(op1 == 0x8 && op2 == 0x4 && r1 == 0)
     {
@@ -836,7 +840,11 @@ m32r_emit_short_insn(sim_gx_block* gx, PCADDR pc, unsigned insn, int optimized)
 
   ASSERT(f != NULL);
 
-  /* fprintf(f, "      printf(\"0x%06x\\n\");\n", pc); */
+  /* force PC trace by environment variable */
+#ifdef HAVE_GETENV
+  if(getenv("GX_TRACE"))
+    fprintf(f, "      printf(\"0x%06x\\n\");\n", pc);
+#endif
 
   if(0)
     ; /* place holder */
index 3367dcbe386180cb3d61a833cf3e471701bfdd19..6238922594d08bc0fd3b416f5ed07795c7180c34 100644 (file)
@@ -14,7 +14,11 @@ typedef struct _sim_cpu SIM_CPU;
 
 #include "ansidecl.h"
 #include "symcat.h"
+
 #include "cgen-types.h"
+#undef SIM_HAVE_MODEL
+#undef SIM_HAVE_ADDR_RANGE
+
 #include "arch.h"
 #include "sim-basics.h"