ARM: Decode pkh instructions.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 2 Jun 2010 17:58:07 +0000 (12:58 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 2 Jun 2010 17:58:07 +0000 (12:58 -0500)
src/arch/arm/isa/formats/data.isa

index c1057caeb95b6b61eed7243222339c7aa110b8c4..d313f0f011039eb9ac0ff84b5f4f5c67ed18d75f 100644 (file)
@@ -140,7 +140,13 @@ def format ArmPackUnpackSatReverse() {{
             const ArmShiftType type =
                 (ArmShiftType)(uint32_t)bits(machInst, 6, 5);
             if (op1 == 0) {
-                return new WarnUnimplemented("pkh", machInst);
+                if (type) {
+                    return new PkhtbReg(machInst, rd, (IntRegIndex)a,
+                                        rn, imm, type);
+                } else {
+                    return new PkhbtReg(machInst, rd, (IntRegIndex)a,
+                                        rn, imm, type);
+                }
             } else if (bits(op1, 2, 1) == 1) {
                 return new Ssat(machInst, rd, satImm + 1, rn, imm, type);
             } else if (bits(op1, 2, 1) == 3) {
@@ -1284,7 +1290,11 @@ def format Thumb32DataProcShiftReg() {{
                 %(eor)s
             }
           case 0x6:
-            return new WarnUnimplemented("pkh", machInst);
+            if (type) {
+                return new PkhtbReg(machInst, rd, rn, rm, amt, type);
+            } else {
+                return new PkhbtReg(machInst, rd, rn, rm, amt, type);
+            }
           case 0x8:
             if (rd == INTREG_PC) {
                 %(cmn)s