Thumb assembly parsing and encoding for ADR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-08-17 20:37:40 +00:00
parent c9b2a987a2
commit 5a1cd045cd
3 changed files with 11 additions and 2 deletions

View File

@ -1189,7 +1189,7 @@ let usesCustomInserter = 1 in // Expanded after instruction selection.
// assembler.
def tADR : T1I<(outs tGPR:$Rd), (ins t_adrlabel:$addr, pred:$p),
IIC_iALUi, "adr{$p}\t$Rd, #$addr", []>,
IIC_iALUi, "adr{$p}\t$Rd, $addr", []>,
T1Encoding<{1,0,1,0,0,?}> {
bits<3> Rd;
bits<8> addr;

View File

@ -81,7 +81,7 @@ define double @f7(double %a, double %b) {
; CHECK-NEON-NEXT: cmp r0, [[REGISTER_1]]
; CHECK-NEON-NEXT: it eq
; CHECK-NEON-NEXT: moveq [[REGISTER_2]], #4
; CHECK-NEON-NEXT: adr [[REGISTER_3:r[0-9]+]], #LCPI
; CHECK-NEON-NEXT: adr [[REGISTER_3:r[0-9]+]], LCPI
; CHECK-NEON-NEXT: ldr
; CHECK-NEON: bx

View File

@ -47,3 +47,12 @@ _func:
@------------------------------------------------------------------------------
@ FIXME: ADD (SP plus register)
@------------------------------------------------------------------------------
@------------------------------------------------------------------------------
@ ADR
@------------------------------------------------------------------------------
adr r2, _baz
@ CHECK: adr r2, _baz @ encoding: [A,0xa2]
@ fixup A - offset: 0, value: _baz, kind: fixup_thumb_adr_pcrel_10