* simops.c (call:16 call:32): Stack adjustment is determined solely
authorJeff Law <law@redhat.com>
Tue, 11 Nov 1997 17:37:04 +0000 (17:37 +0000)
committerJeff Law <law@redhat.com>
Tue, 11 Nov 1997 17:37:04 +0000 (17:37 +0000)
        by the imm8 field.

sim/mn10300/simops.c

index 3d82952eb788a3d910a6719b1d4715e6008189bf..9a3f3a314acbdb344291e1c61793c91d2baa31bc 100644 (file)
@@ -2586,8 +2586,10 @@ void OP_CD000000 (insn, extension)
       sp -= 4;
     }
 
-  /* Update the stack pointer.  */
-  State.regs[REG_SP] = sp - extension;
+  /* Update the stack pointer, note that the register saves to do not
+     modify SP.  The SP adjustment is derived totally from the imm8
+     field.  */
+  State.regs[REG_SP] -= extension;
   State.regs[REG_MDR] = next_pc;
   State.regs[REG_PC] += SEXT16 ((insn & 0xffff00) >> 8) - 5;
 }
@@ -2651,8 +2653,10 @@ void OP_DD000000 (insn, extension)
       sp -= 4;
     }
 
-  /* Update the stack pointer.  */
-  State.regs[REG_SP] = sp - (extension & 0xff);
+  /* Update the stack pointer, note that the register saves to do not
+     modify SP.  The SP adjustment is derived totally from the imm8
+     field.  */
+  State.regs[REG_SP] -= (extension & 0xff);
   State.regs[REG_MDR] = next_pc;
   State.regs[REG_PC] += (((insn & 0xffffff) << 8) | ((extension & 0xff0000) >> 16)) - 7;
 }
This page took 0.027487 seconds and 4 git commands to generate.