llvm.org GIT mirror llvm / 597fa65
Disassembly of A8.6.59 LDR (literal) Encoding T1 (16-bit thumb instruction) should print out ldr, not ldr.n. rdar://problem/9267772 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130008 91177308-0d34-0410-b5e6-96231b3b80d8 Johnny Chen 9 years ago
4 changed file(s) with 24 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
720720 let Inst{7-0} = addr;
721721 }
722722
723 // FIXME: Remove this entry when the above ldr.n workaround is fixed.
724 // For disassembly use only.
725 def tLDRpciDIS : T1pIs<(outs tGPR:$Rt), (ins t_addrmode_pc:$addr), IIC_iLoad_i,
726 "ldr", "\t$Rt, $addr",
727 [/* disassembly only */]>,
728 T1Encoding<{0,1,0,0,1,?}> {
729 // A6.2 & A8.6.59
730 bits<3> Rt;
731 bits<8> addr;
732 let Inst{10-8} = Rt;
733 let Inst{7-0} = addr;
734 }
735
723736 // A8.6.194 & A8.6.192
724737 defm tSTR : thumb_st_rr_ri_enc<0b000, 0b0110, t_addrmode_rrs4,
725738 t_addrmode_is4, AddrModeT1_4,
66 # CHECK-NEXT: add r3, sp, #20
77 # CHECK-NEXT: ldr r5, [r3], #4
88 # CHECK-NEXT: str r3, [sp]
9 # CHECK-NEXT: ldr.n r3, #52
9 # CHECK-NEXT: ldr r3, #52
1010 # CHECK-NEXT: add r3, pc
1111 # CHECK-NEXT: ldr r0, [r3]
1212 # CHECK-NEXT: ldr r4, [r0]
13 # CHECK-NEXT: ldr.n r0, #48
13 # CHECK-NEXT: ldr r0, #48
1414 # CHECK-NEXT: add r0, pc
1515 # CHECK-NEXT: ldr r0, [r0]
1616 # CHECK-NEXT: ldr r0, [r0]
1717 # CHECK-NEXT: blx #191548
1818 # CHECK-NEXT: cbnz r0, #6
19 # CHECK-NEXT: ldr.n r1, #40
19 # CHECK-NEXT: ldr r1, #40
2020 # CHECK-NEXT: add r1, pc
2121 # CHECK-NEXT: ldr r1, [r1]
2222 # CHECK-NEXT: b #0
2828
2929 # CHECK: ldmia r0!, {r1}
3030 0x02 0xc8
31
32 # CHECK: ldr r5, #432
33 0x6c 0x4d
3134
3235 # CHECK: str r0, [r3]
3336 0x18 0x60
16511651 Name == "t2ADDrSPi12" || Name == "t2SUBrSPi12")
16521652 return false;
16531653
1654 // FIXME: Use ldr.n to work around a Darwin assembler bug.
1655 // Introduce a workaround with tLDRpciDIS opcode.
1656 if (Name == "tLDRpci")
1657 return false;
1658
16541659 // Ignore t2LDRDpci, prefer the generic t2LDRDi8, t2LDRD_PRE, t2LDRD_POST.
16551660 if (Name == "t2LDRDpci")
16561661 return false;