mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 23:29:51 +00:00
Add tests for handling of globals and tls on the XCore. These currently fail
but pass when run against r76652. llvm-svn: 76923
This commit is contained in:
parent
be00de7dfe
commit
19591063fc
37
test/CodeGen/XCore/globals.ll
Normal file
37
test/CodeGen/XCore/globals.ll
Normal file
@ -0,0 +1,37 @@
|
||||
; RUN: llvm-as < %s | llc -march=xcore -mcpu=xs1b-generic | FileCheck %s
|
||||
; XFAIL: *
|
||||
|
||||
define i32 *@addr_G1() {
|
||||
entry:
|
||||
; CHECK: addr_G1:
|
||||
; CHECK: ldaw r0, dp[G1]
|
||||
ret i32* @G1
|
||||
}
|
||||
|
||||
define i32 *@addr_G2() {
|
||||
entry:
|
||||
; CHECK: addr_G2:
|
||||
; CHECK: ldaw r0, dp[G2]
|
||||
ret i32* @G2
|
||||
}
|
||||
|
||||
define i32 *@addr_G3() {
|
||||
entry:
|
||||
; CHECK: addr_G3:
|
||||
; CHECK: ldaw r11, cp[G3]
|
||||
; CHECK: mov r0, r11
|
||||
ret i32* @G3
|
||||
}
|
||||
|
||||
@G1 = global i32 4712
|
||||
; CHECK: .section .dp.data,"awd",@progbits
|
||||
; CHECK: G1:
|
||||
|
||||
@G2 = global i32 0
|
||||
; CHECK: .section .dp.bss,"awd",@nobits
|
||||
; CHECK: G2:
|
||||
|
||||
@G3 = constant i32 9401
|
||||
; CHECK: .section .cp.rodata,"ac",@progbits
|
||||
; CHECK: G3:
|
||||
|
21
test/CodeGen/XCore/tls.ll
Normal file
21
test/CodeGen/XCore/tls.ll
Normal file
@ -0,0 +1,21 @@
|
||||
; RUN: llvm-as < %s | llc -march=xcore -mcpu=xs1b-generic | FileCheck %s
|
||||
; XFAIL: *
|
||||
|
||||
define i32 *@addr_G() {
|
||||
entry:
|
||||
; CHECK: addr_G:
|
||||
; CHECK: get r11, id
|
||||
ret i32* @G
|
||||
}
|
||||
|
||||
@G = thread_local global i32 15
|
||||
; CHECK: .section .dp.data,"awd",@progbits
|
||||
; CHECK: G:
|
||||
; CHECK: .long 15
|
||||
; CHECK: .long 15
|
||||
; CHECK: .long 15
|
||||
; CHECK: .long 15
|
||||
; CHECK: .long 15
|
||||
; CHECK: .long 15
|
||||
; CHECK: .long 15
|
||||
; CHECK: .long 15
|
Loading…
Reference in New Issue
Block a user