changeset e9970c1bccdd in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=e9970c1bccdd
description:
        ARM: Make the exception return form of ldm restore CPSR.

diffstat:

1 file changed, 10 insertions(+), 3 deletions(-)
src/arch/arm/isa/formats/macromem.isa |   13 ++++++++++---

diffs (34 lines):

diff -r 72836109775f -r e9970c1bccdd src/arch/arm/isa/formats/macromem.isa
--- a/src/arch/arm/isa/formats/macromem.isa     Sun Nov 15 00:15:42 2009 -0800
+++ b/src/arch/arm/isa/formats/macromem.isa     Sun Nov 15 00:23:14 2009 -0800
@@ -210,6 +210,7 @@
     microOps[0] = new MicroAddiUop(machInst, INTREG_UREG0, RN, 0);
 
     unsigned reg = 0;
+    bool forceUser = machInst.puswl.psruser;
     for (int i = 1; i < ones + 1; i++) {
         // Find the next register.
         while (!bits(regs, reg))
@@ -217,13 +218,19 @@
         replaceBits(regs, reg, 0);
 
         unsigned regIdx = reg;
-        if (machInst.puswl.psruser) {
+        if (forceUser) {
             regIdx = intRegForceUser(regIdx);
         }
 
         if (machInst.puswl.loadOp) {
-            microOps[i] =
-                new MicroLdrUop(machInst, regIdx, INTREG_UREG0, addr);
+            if (reg == INTREG_PC && forceUser) {
+                // This must be the exception return form of ldm.
+                microOps[i] =
+                    new MicroLdrRetUop(machInst, regIdx, INTREG_UREG0, addr);
+            } else {
+                microOps[i] =
+                    new MicroLdrUop(machInst, regIdx, INTREG_UREG0, addr);
+            }
         } else {
             microOps[i] =
                 new MicroStrUop(machInst, regIdx, INTREG_UREG0, addr);
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to