diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td index eae947e4813..df3dc93252f 100644 --- a/lib/Target/ARM/ARMInstrFormats.td +++ b/lib/Target/ARM/ARMInstrFormats.td @@ -142,21 +142,21 @@ class ABLpredI opcod, dag oops, dag iops, Format f, string opc, : I { let Inst{24} = 1; // L bit - let Inst{25-27} = 5; + let Inst{25-27} = {1,0,1}; } class ABLI opcod, dag oops, dag iops, Format f, string asm, list pattern> : XI { let Inst{24} = 1; // L bit - let Inst{25-27} = 5; + let Inst{25-27} = {1,0,1}; } class ABLXI opcod, dag oops, dag iops, Format f, string asm, list pattern> : XI { - let Inst{4-7} = 3; - let Inst{20-27} = 0x12; + let Inst{4-7} = {1,1,0,0}; + let Inst{20-27} = {0,1,0,0,1,0,0,0}; } // FIXME: BX class AXIx2 opcod, dag oops, dag iops, Format f, string asm, @@ -168,14 +168,14 @@ class ABI opcod, dag oops, dag iops, Format f, string asm, : XI { let Inst{24} = 0; // L bit - let Inst{25-27} = 5; + let Inst{25-27} = {1,0,1}; } class ABccI opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> : I { let Inst{24} = 0; // L bit - let Inst{25-27} = 5; + let Inst{25-27} = {1,0,1}; } // BR_JT instructions @@ -184,25 +184,26 @@ class JTI opcod, dag oops, dag iops, string asm, list pattern> : XI { let Inst{20} = 0; // S Bit - let Inst{21-24} = 0xd; - let Inst{26-27} = 0; + let Inst{21-24} = {1,0,1,1}; + let Inst{26-27} = {0,0}; } -// == ldr pc +// == add pc class JTI1 opcod, dag oops, dag iops, string asm, list pattern> : XI { + let Inst{20} = 0; // S bit + let Inst{21-24} = {0,0,1,0}; + let Inst{26-27} = {0,0}; +} +// == ldr pc +class JTI2 opcod, dag oops, dag iops, string asm, list pattern> + : XI { let Inst{20} = 1; // L bit let Inst{21} = 0; // W bit let Inst{22} = 0; // B bit let Inst{24} = 1; // P bit -} -// == add pc -class JTI2 opcod, dag oops, dag iops, string asm, list pattern> - : XI { - let Inst{20} = 0; // S bit - let Inst{21-24} = 4; - let Inst{26-27} = 0; + let Inst{26-27} = {0,0}; } @@ -212,21 +213,21 @@ class AI1 opcod, dag oops, dag iops, Format f, string opc, : I { let Inst{21-24} = opcod; - let Inst{26-27} = 0; + let Inst{26-27} = {0,0}; } class AsI1 opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> : sI { let Inst{21-24} = opcod; - let Inst{26-27} = 0; + let Inst{26-27} = {0,0}; } class AXI1 opcod, dag oops, dag iops, Format f, string asm, list pattern> : XI { let Inst{21-24} = opcod; - let Inst{26-27} = 0; + let Inst{26-27} = {0,0}; } class AI1x2 opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> @@ -239,7 +240,7 @@ class AI2 opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> : I { - let Inst{26-27} = 1; + let Inst{26-27} = {1,0}; } class AXI2 opcod, dag oops, dag iops, Format f, string asm, list pattern> @@ -642,7 +643,7 @@ class AI4 opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> : I { - let Inst{25-27} = 0x4; + let Inst{25-27} = {0,0,1}; } class AXI4ld opcod, dag oops, dag iops, Format f, string asm, list pattern> @@ -650,7 +651,7 @@ class AXI4ld opcod, dag oops, dag iops, Format f, string asm, "", pattern> { let Inst{20} = 1; // L bit let Inst{22} = 0; // S bit - let Inst{25-27} = 0x4; + let Inst{25-27} = {0,0,1}; } class AXI4ldpc opcod, dag oops, dag iops, Format f, string asm, list pattern> @@ -658,7 +659,7 @@ class AXI4ldpc opcod, dag oops, dag iops, Format f, string asm, "", pattern> { let Inst{20} = 1; // L bit let Inst{22} = 1; // S bit - let Inst{25-27} = 0x4; + let Inst{25-27} = {0,0,1}; } class AXI4st opcod, dag oops, dag iops, Format f, string asm, list pattern> @@ -666,7 +667,7 @@ class AXI4st opcod, dag oops, dag iops, Format f, string asm, "", pattern> { let Inst{20} = 0; // L bit let Inst{22} = 0; // S bit - let Inst{25-27} = 0x4; + let Inst{25-27} = {0,0,1}; }