mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Use a base register instead of an index register with the local dynamic model.
Fixes pr13048. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83569cb062
commit
c07f5bbd3b
@ -596,6 +596,14 @@ static void LowerTlsAddr(MCStreamer &OutStreamer,
|
||||
LEA.addOperand(MCOperand::CreateReg(0)); // index
|
||||
LEA.addOperand(MCOperand::CreateExpr(symRef)); // disp
|
||||
LEA.addOperand(MCOperand::CreateReg(0)); // seg
|
||||
} else if (SRVK == MCSymbolRefExpr::VK_TLSLDM) {
|
||||
LEA.setOpcode(X86::LEA32r);
|
||||
LEA.addOperand(MCOperand::CreateReg(X86::EAX)); // dest
|
||||
LEA.addOperand(MCOperand::CreateReg(X86::EBX)); // base
|
||||
LEA.addOperand(MCOperand::CreateImm(1)); // scale
|
||||
LEA.addOperand(MCOperand::CreateReg(0)); // index
|
||||
LEA.addOperand(MCOperand::CreateExpr(symRef)); // disp
|
||||
LEA.addOperand(MCOperand::CreateReg(0)); // seg
|
||||
} else {
|
||||
LEA.setOpcode(X86::LEA32r);
|
||||
LEA.addOperand(MCOperand::CreateReg(X86::EAX)); // dest
|
||||
|
@ -75,7 +75,7 @@ entry:
|
||||
}
|
||||
|
||||
; X32: f5:
|
||||
; X32: leal {{[jk]}}@TLSLDM
|
||||
; X32: leal {{[jk]}}@TLSLDM(%ebx)
|
||||
; X32-NEXT: calll ___tls_get_addr@PLT
|
||||
; X32-NEXT: movl {{[jk]}}@DTPOFF(%eax)
|
||||
; X32-NEXT: addl {{[jk]}}@DTPOFF(%eax)
|
||||
|
Loading…
x
Reference in New Issue
Block a user