[llvm-commits] [llvm] r123778 - in /llvm/trunk: lib/Target/ARM/ARMInstrInfo.td lib/Target/ARM/ARMInstrThumb2.td test/MC/ARM/arm_instructions.s test/MC/ARM/thumb2.s
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Tue Jan 18 13:31:35 PST 2011
Author: bruno
Date: Tue Jan 18 15:31:35 2011
New Revision: 123778
URL: http://llvm.org/viewvc/llvm-project?rev=123778&view=rev
Log:
Fix MRS encoding for arm and thumb.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
llvm/trunk/test/MC/ARM/arm_instructions.s
llvm/trunk/test/MC/ARM/thumb2.s
Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=123778&r1=123777&r2=123778&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Jan 18 15:31:35 2011
@@ -3827,15 +3827,19 @@
// Move between special register and ARM core register -- for disassembly only
//
-def MRS : ABI<0b0001,(outs GPR:$dst),(ins), NoItinerary, "mrs", "\t$dst, cpsr",
+def MRS : ABI<0b0001, (outs GPR:$Rd), (ins), NoItinerary, "mrs", "\t$Rd, cpsr",
[/* For disassembly only; pattern left blank */]> {
- let Inst{23-20} = 0b0000;
+ bits<4> Rd;
+ let Inst{23-16} = 0b00001111;
+ let Inst{15-12} = Rd;
let Inst{7-4} = 0b0000;
}
-def MRSsys : ABI<0b0001,(outs GPR:$dst),(ins), NoItinerary,"mrs","\t$dst, spsr",
+def MRSsys : ABI<0b0001, (outs GPR:$Rd), (ins), NoItinerary,"mrs","\t$Rd, spsr",
[/* For disassembly only; pattern left blank */]> {
- let Inst{23-20} = 0b0100;
+ bits<4> Rd;
+ let Inst{23-16} = 0b01001111;
+ let Inst{15-12} = Rd;
let Inst{7-4} = 0b0000;
}
Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=123778&r1=123777&r2=123778&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Jan 18 15:31:35 2011
@@ -3290,6 +3290,7 @@
: T2SpecialReg<op31_20, op15_14, op12, oops, iops, itin, opc, asm, pattern> {
bits<4> Rd;
let Inst{11-8} = Rd;
+ let Inst{19-16} = 0b1111;
}
def t2MRS : T2MRS<0b111100111110, 0b10, 0,
Modified: llvm/trunk/test/MC/ARM/arm_instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/arm_instructions.s?rev=123778&r1=123777&r2=123778&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/arm_instructions.s (original)
+++ llvm/trunk/test/MC/ARM/arm_instructions.s Tue Jan 18 15:31:35 2011
@@ -133,3 +133,5 @@
@ CHECK: isb @ encoding: [0x6f,0xf0,0x7f,0xf5]
isb
+@ CHECK: mrs r8, cpsr @ encoding: [0x00,0x80,0x0f,0xe1]
+ mrs r8, cpsr
Modified: llvm/trunk/test/MC/ARM/thumb2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb2.s?rev=123778&r1=123777&r2=123778&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb2.s (original)
+++ llvm/trunk/test/MC/ARM/thumb2.s Tue Jan 18 15:31:35 2011
@@ -166,4 +166,5 @@
bfi r0, r0, #5, #7
@ CHECK: isb @ encoding: [0xbf,0xf3,0x6f,0x8f]
isb
-
+@ CHECK: mrs r0, cpsr @ encoding: [0xef,0xf3,0x00,0x80]
+ mrs r0, cpsr
More information about the llvm-commits
mailing list