[llvm-commits] [llvm] r76923 - in /llvm/trunk/test/CodeGen/XCore: globals.ll tls.ll
Richard Osborne
richard at xmos.com
Thu Jul 23 17:38:20 PDT 2009
Author: friedgold
Date: Thu Jul 23 19:38:20 2009
New Revision: 76923
URL: http://llvm.org/viewvc/llvm-project?rev=76923&view=rev
Log:
Add tests for handling of globals and tls on the XCore. These currently fail
but pass when run against r76652.
Added:
llvm/trunk/test/CodeGen/XCore/globals.ll
llvm/trunk/test/CodeGen/XCore/tls.ll
Added: llvm/trunk/test/CodeGen/XCore/globals.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/globals.ll?rev=76923&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/globals.ll (added)
+++ llvm/trunk/test/CodeGen/XCore/globals.ll Thu Jul 23 19:38:20 2009
@@ -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
+}
+
+ at G1 = global i32 4712
+; CHECK: .section .dp.data,"awd", at progbits
+; CHECK: G1:
+
+ at G2 = global i32 0
+; CHECK: .section .dp.bss,"awd", at nobits
+; CHECK: G2:
+
+ at G3 = constant i32 9401
+; CHECK: .section .cp.rodata,"ac", at progbits
+; CHECK: G3:
+
Added: llvm/trunk/test/CodeGen/XCore/tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/tls.ll?rev=76923&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/tls.ll (added)
+++ llvm/trunk/test/CodeGen/XCore/tls.ll Thu Jul 23 19:38:20 2009
@@ -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
+}
+
+ at G = thread_local global i32 15
+; CHECK: .section .dp.data,"awd", at 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
More information about the llvm-commits
mailing list