mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-19 01:13:25 +00:00
5c0b16d0c4
a global with that gets printed with the :mem modifier. All operands to lea's should be handled with the lea32mem operand kind, and this allows the TLS stuff to do this. There are several better ways to do this, but I went for the minimal change since I can't really test this (beyond make check). This also makes the use of EBX explicit in the operand list in the 32-bit, instead of implicit in the instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73834 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
450 B
LLVM
15 lines
450 B
LLVM
; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic > %t
|
|
; RUN: grep {leal i@TLSGD(,%ebx), %eax} %t
|
|
; RUN: grep {call ___tls_get_addr@PLT} %t
|
|
; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic > %t2
|
|
; RUN: grep {leaq i@TLSGD(%rip), %rdi} %t2
|
|
; RUN: grep {call __tls_get_addr@PLT} %t2
|
|
|
|
@i = thread_local global i32 15
|
|
|
|
define i32 @f() {
|
|
entry:
|
|
%tmp1 = load i32* @i
|
|
ret i32 %tmp1
|
|
}
|