From f581fd3f899648f8699f53ecdc913e7d50c26f8f Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 2 Jun 2010 12:58:07 -0500 Subject: ARM: Decode pkh instructions. --- src/arch/arm/isa/formats/data.isa | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/arch/arm/isa/formats/data.isa b/src/arch/arm/isa/formats/data.isa index c1057caeb..d313f0f01 100644 --- a/src/arch/arm/isa/formats/data.isa +++ b/src/arch/arm/isa/formats/data.isa @@ -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 -- cgit v1.2.3