[Vm-dev] [commit][3295] Delete some redundancy in the ARM sim code.

commits at squeakvm.org commits at squeakvm.org
Thu Mar 26 20:23:10 UTC 2015


Revision: 3295
Author:   eliot
Date:     2015-03-26 13:23:09 -0700 (Thu, 26 Mar 2015)
Log Message:
-----------
Delete some redundancy in the ARM sim code.

Modified Paths:
--------------
    branches/Cog/processors/ARM/gdb-7.6/sim/arm/armemu.c

Modified: branches/Cog/processors/ARM/gdb-7.6/sim/arm/armemu.c
===================================================================
--- branches/Cog/processors/ARM/gdb-7.6/sim/arm/armemu.c	2015-03-26 18:52:48 UTC (rev 3294)
+++ branches/Cog/processors/ARM/gdb-7.6/sim/arm/armemu.c	2015-03-26 20:23:09 UTC (rev 3295)
@@ -575,10 +575,6 @@
 	  // if we get back an SWI_CogPrefetch then the pc was outside limits
 	  decoded = ARMul_ReLoadInstr (state, pc + isize, isize);
 	  loaded  = ARMul_ReLoadInstr (state, pc + isize * 2, isize);
-      // TPR - save the pc to help in CogVM sim error handling, IFF the instr is not a SWI_CogPrefetch
-          if ( instr != (0xEF000000 | SWI_CogPrefetch)) {
-          	state->temp = pc;
-          }
 	  NORMALCYCLE; // set to do simple SEQ next time & break to end of switch
 	  break;
 
@@ -592,10 +588,6 @@
 	  state->Aborted = 0;
 	  instr   = ARMul_LoadInstrN (state, pc, isize);
 	  decoded = ARMul_LoadInstrS (state, pc + (isize), isize);
-// TPR - save the pc to help in CogVM sim error handling, IFF the instr is not an abort SWI
-          if ( instr != (0xEF000000 | SWI_CogPrefetch)) {
-          	state->temp = pc;
-          }
 	  loaded  = ARMul_LoadInstrS (state, pc + (isize * 2), isize);
 	  NORMALCYCLE;
 	  break;
@@ -603,12 +595,12 @@
     // END OF SWITCH stmt, where the above breaks go 
     
  // TPR - save the pc to help in CogVM sim error handling, IFF the instr is not an abort SWI
-          if ( instr != (0xEF000000 | SWI_CogPrefetch)) {
-          	state->temp = pc;
-          }
+    if ( instr != (0xEF000000 | SWI_CogPrefetch)) {
+		state->temp = pc;
+	}
 
-     if (state->EventSet)
-	ARMul_EnvokeEvent (state);
+    if (state->EventSet)
+		ARMul_EnvokeEvent (state);
 #if 0 /* Enable this for a helpful bit of debugging when tracing is needed.  */
       fprintf (stderr, "pc: %x, instr: %x\n", pc & ~1, instr);
       if (instr == 0)



More information about the Vm-dev mailing list