mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Make tTAILJMPr/tTAILJMPrND emit a tBX without a preceding MOV of PC to LR. This
fixes <rdar://problem/9495913> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
328634598f
commit
106acd4158
@ -1875,7 +1875,7 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
case ARM::TAILJMPr:
|
||||
case ARM::tTAILJMPr: {
|
||||
unsigned newOpc = (Opc == ARM::TAILJMPr || Opc == ARM::TAILJMPrND)
|
||||
? ARM::BX : ARM::tBX_CALL;
|
||||
? ARM::BX : ARM::tBX;
|
||||
MCInst TmpInst;
|
||||
TmpInst.setOpcode(newOpc);
|
||||
TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg()));
|
||||
|
@ -16,6 +16,10 @@ define void @t1() {
|
||||
define void @t2() {
|
||||
; CHECKV6: t2:
|
||||
; CHECKV6: bx r0 @ TAILCALL
|
||||
; CHECKT2D: t2:
|
||||
; CHECKT2D: ldr
|
||||
; CHECKT2D-NEXT: ldr
|
||||
; CHECKT2D-NEXT: bx r0 @ TAILCALL
|
||||
%tmp = load i32 ()** @t ; <i32 ()*> [#uses=1]
|
||||
%tmp.upgrd.2 = tail call i32 %tmp( ) ; <i32> [#uses=0]
|
||||
ret void
|
||||
|
Loading…
Reference in New Issue
Block a user