diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-11-20 22:52:33 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-11-20 22:52:33 +0000 |
commit | c31de251373b3ca2aad2a5354fd7b5d008768f6f (patch) | |
tree | f08caea68a984ea2a3fa1d608da6fa82bbd4fc93 | |
parent | 0a3c28bd6bffa39305c47a7ffcdac33c2cf53e76 (diff) | |
download | bcm5719-llvm-c31de251373b3ca2aad2a5354fd7b5d008768f6f.tar.gz bcm5719-llvm-c31de251373b3ca2aad2a5354fd7b5d008768f6f.zip |
A few more thumb instruction MC encodings.
llvm-svn: 119913
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrThumb.td | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrThumb.td b/llvm/lib/Target/ARM/ARMInstrThumb.td index e4c2649815a..96a608aa369 100644 --- a/llvm/lib/Target/ARM/ARMInstrThumb.td +++ b/llvm/lib/Target/ARM/ARMInstrThumb.td @@ -768,7 +768,13 @@ def tASRrr : T1sIt<(outs tGPR:$dst), (ins tGPR:$lhs, tGPR:$rhs), IIC_iMOVsr, def tBIC : T1sIt<(outs tGPR:$dst), (ins tGPR:$lhs, tGPR:$rhs), IIC_iBITr, "bic", "\t$dst, $rhs", [(set tGPR:$dst, (and tGPR:$lhs, (not tGPR:$rhs)))]>, - T1DataProcessing<0b1110>; + T1DataProcessing<0b1110> { + // A8.6.20 + bits<3> dst; + bits<3> rhs; + let Inst{5-3} = rhs; + let Inst{2-0} = dst; +} // CMN register let isCompare = 1, Defs = [CPSR] in { @@ -778,33 +784,49 @@ let isCompare = 1, Defs = [CPSR] in { // "cmn", "\t$lhs, $rhs", // [(ARMcmp tGPR:$lhs, (ineg tGPR:$rhs))]>, // T1DataProcessing<0b1011>; -def tCMNz : T1pI<(outs), (ins tGPR:$lhs, tGPR:$rhs), IIC_iCMPr, - "cmn", "\t$lhs, $rhs", - [(ARMcmpZ tGPR:$lhs, (ineg tGPR:$rhs))]>, - T1DataProcessing<0b1011>; +def tCMNz : T1pI<(outs), (ins tGPR:$Rn, tGPR:$Rm), IIC_iCMPr, + "cmn", "\t$Rn, $Rm", + [(ARMcmpZ tGPR:$Rn, (ineg tGPR:$Rm))]>, + T1DataProcessing<0b1011> { + // A8.6.33 + bits<3> Rm; + bits<3> Rn; + let Inst{5-3} = Rm; + let Inst{2-0} = Rn; +} } // CMP immediate let isCompare = 1, Defs = [CPSR] in { -def tCMPi8 : T1pI<(outs), (ins tGPR:$lhs, i32imm:$rhs), IIC_iCMPi, - "cmp", "\t$lhs, $rhs", - [(ARMcmp tGPR:$lhs, imm0_255:$rhs)]>, - T1General<{1,0,1,?,?}>; -def tCMPzi8 : T1pI<(outs), (ins tGPR:$lhs, i32imm:$rhs), IIC_iCMPi, - "cmp", "\t$lhs, $rhs", - [(ARMcmpZ tGPR:$lhs, imm0_255:$rhs)]>, - T1General<{1,0,1,?,?}>; +def tCMPi8 : T1pI<(outs), (ins tGPR:$Rn, i32imm:$imm8), IIC_iCMPi, + "cmp", "\t$Rn, $imm8", + [(ARMcmp tGPR:$Rn, imm0_255:$imm8)]>, + T1General<{1,0,1,?,?}> { + // A8.6.35 + bits<3> Rn; + bits<8> imm8; + let Inst{10-8} = Rn; + let Inst{7-0} = imm8; +} + +def tCMPzi8 : T1pI<(outs), (ins tGPR:$Rn, i32imm:$imm8), IIC_iCMPi, + "cmp", "\t$Rn, $imm8", + [(ARMcmpZ tGPR:$Rn, imm0_255:$imm8)]>, + T1General<{1,0,1,?,?}> { + // A8.6.35 + bits<3> Rn; + let Inst{10-8} = Rn; + let Inst{7-0} = 0x00; } // CMP register -let isCompare = 1, Defs = [CPSR] in { def tCMPr : T1pI<(outs), (ins tGPR:$Rn, tGPR:$Rm), IIC_iCMPr, "cmp", "\t$Rn, $Rm", [(ARMcmp tGPR:$Rn, tGPR:$Rm)]>, T1DataProcessing<0b1010> { + // A8.6.36 bits<3> Rm; bits<3> Rn; - let Inst{5-3} = Rm; let Inst{2-0} = Rn; } @@ -820,7 +842,7 @@ def tCMPhir : T1pI<(outs), (ins GPR:$lhs, GPR:$rhs), IIC_iCMPr, def tCMPzhir : T1pI<(outs), (ins GPR:$lhs, GPR:$rhs), IIC_iCMPr, "cmp", "\t$lhs, $rhs", []>, T1Special<{0,1,?,?}>; -} +} // isCompare = 1, Defs = [CPSR] // XOR register |