ARM: BXJ should be BX when there is no J support
authorAli Saidi <Ali.Saidi@ARM.com>
Wed, 2 Jun 2010 17:58:12 +0000 (12:58 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Wed, 2 Jun 2010 17:58:12 +0000 (12:58 -0500)
src/arch/arm/isa/decoder/arm.isa
src/arch/arm/isa/formats/branch.isa

index 31456dfc63003f624619b6c463c7ad68aa3ca973..4c5d71ad98f1a0752bb060551b45eab21eb7b292 100644 (file)
@@ -67,10 +67,8 @@ format DataOp {
             1: decode OPCODE_7 {
                 0x0: decode MISC_OPCODE {
                     0x0: ArmMsrMrs::armMsrMrs();
-                    0x1: ArmBxClz::armBxClz();
-                    0x2: decode OPCODE {
-                        0x9: WarnUnimpl::bxj();
-                    }
+                    // bxj unimplemented, treated as bx
+                    0x1,0x2: ArmBxClz::armBxClz();
                     0x3: decode OPCODE {
                         0x9: ArmBlxReg::armBlxReg();
                     }
index dbb6f9f9db8c9d864e73cb02da3aa1b8754559a2..055955520ea1661ee85d93dfcd960e0985485da5 100644 (file)
@@ -207,7 +207,12 @@ def format Thumb32BranchesAndMiscCtrl() {{
                         break;
                     }
                   case 0x3c:
-                    return new WarnUnimplemented("bxj", machInst);
+                    {
+                        // On systems that don't support bxj, bxj == bx
+                        return new BxReg(machInst,
+                                 (IntRegIndex)(uint32_t)bits(machInst, 19, 16),
+                                 COND_UC);
+                    }
                   case 0x3d:
                     {
                         const uint32_t imm32 = bits(machInst, 7, 0);