[llvm] r205033 - Convert another llc -filetype=obj test.
Rafael Espindola
rafael.espindola at gmail.com
Fri Mar 28 12:19:28 PDT 2014
Author: rafael
Date: Fri Mar 28 14:19:28 2014
New Revision: 205033
URL: http://llvm.org/viewvc/llvm-project?rev=205033&view=rev
Log:
Convert another llc -filetype=obj test.
Added:
llvm/trunk/test/MC/Mips/elf-tls.s
Removed:
llvm/trunk/test/MC/Mips/elf-tls.ll
Removed: llvm/trunk/test/MC/Mips/elf-tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/elf-tls.ll?rev=205032&view=auto
==============================================================================
--- llvm/trunk/test/MC/Mips/elf-tls.ll (original)
+++ llvm/trunk/test/MC/Mips/elf-tls.ll (removed)
@@ -1,40 +0,0 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -r | FileCheck %s
-
-; Check that the appropriate relocations were created.
-
-; CHECK: Relocations [
-; CHECK: Section (2) .rel.text {
-; CHECK: R_MIPS_TLS_LDM
-; CHECK: R_MIPS_TLS_DTPREL_HI16
-; CHECK: R_MIPS_TLS_DTPREL_LO16
-; CHECK: }
-; CHECK: ]
-
- at t1 = thread_local global i32 0, align 4
-
-define i32 @f1() nounwind {
-entry:
- %tmp = load i32* @t1, align 4
- ret i32 %tmp
-
-}
-
-
- at t2 = external thread_local global i32
-
-define i32 @f2() nounwind {
-entry:
- %tmp = load i32* @t2, align 4
- ret i32 %tmp
-
-}
-
- at f3.i = internal thread_local unnamed_addr global i32 1, align 4
-
-define i32 @f3() nounwind {
-entry:
- %0 = load i32* @f3.i, align 4
- %inc = add nsw i32 %0, 1
- store i32 %inc, i32* @f3.i, align 4
- ret i32 %inc
-}
Added: llvm/trunk/test/MC/Mips/elf-tls.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/elf-tls.s?rev=205033&view=auto
==============================================================================
--- llvm/trunk/test/MC/Mips/elf-tls.s (added)
+++ llvm/trunk/test/MC/Mips/elf-tls.s Fri Mar 28 14:19:28 2014
@@ -0,0 +1,134 @@
+// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj -r | FileCheck %s
+
+// Check that the appropriate relocations were created.
+
+// CHECK: Relocations [
+// CHECK: Section (2) .rel.text {
+// CHECK: R_MIPS_TLS_LDM
+// CHECK: R_MIPS_TLS_DTPREL_HI16
+// CHECK: R_MIPS_TLS_DTPREL_LO16
+// CHECK: }
+// CHECK: ]
+
+ .text
+ .abicalls
+ .section .mdebug.abi32,"", at progbits
+ .file "/home/espindola/llvm/llvm/test/MC/Mips/elf-tls.ll"
+ .text
+ .globl f1
+ .align 2
+ .type f1, at function
+ .set nomips16
+ .ent f1
+f1: # @f1
+ .frame $sp,24,$ra
+ .mask 0x80000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .set nomacro
+ .set noat
+# BB#0: # %entry
+ lui $2, %hi(_gp_disp)
+ addiu $2, $2, %lo(_gp_disp)
+ addiu $sp, $sp, -24
+ sw $ra, 20($sp) # 4-byte Folded Spill
+ addu $gp, $2, $25
+ lw $25, %call16(__tls_get_addr)($gp)
+ jalr $25
+ addiu $4, $gp, %tlsgd(t1)
+ lw $2, 0($2)
+ lw $ra, 20($sp) # 4-byte Folded Reload
+ jr $ra
+ addiu $sp, $sp, 24
+ .set at
+ .set macro
+ .set reorder
+ .end f1
+$tmp0:
+ .size f1, ($tmp0)-f1
+
+ .globl f2
+ .align 2
+ .type f2, at function
+ .set nomips16
+ .ent f2
+f2: # @f2
+ .frame $sp,24,$ra
+ .mask 0x80000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .set nomacro
+ .set noat
+# BB#0: # %entry
+ lui $2, %hi(_gp_disp)
+ addiu $2, $2, %lo(_gp_disp)
+ addiu $sp, $sp, -24
+ sw $ra, 20($sp) # 4-byte Folded Spill
+ addu $gp, $2, $25
+ lw $25, %call16(__tls_get_addr)($gp)
+ jalr $25
+ addiu $4, $gp, %tlsgd(t2)
+ lw $2, 0($2)
+ lw $ra, 20($sp) # 4-byte Folded Reload
+ jr $ra
+ addiu $sp, $sp, 24
+ .set at
+ .set macro
+ .set reorder
+ .end f2
+$tmp1:
+ .size f2, ($tmp1)-f2
+
+ .globl f3
+ .align 2
+ .type f3, at function
+ .set nomips16
+ .ent f3
+f3: # @f3
+ .frame $sp,24,$ra
+ .mask 0x80000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .set nomacro
+ .set noat
+# BB#0: # %entry
+ lui $2, %hi(_gp_disp)
+ addiu $2, $2, %lo(_gp_disp)
+ addiu $sp, $sp, -24
+ sw $ra, 20($sp) # 4-byte Folded Spill
+ addu $gp, $2, $25
+ lw $25, %call16(__tls_get_addr)($gp)
+ jalr $25
+ addiu $4, $gp, %tlsldm(f3.i)
+ lui $1, %dtprel_hi(f3.i)
+ addu $1, $1, $2
+ lw $2, %dtprel_lo(f3.i)($1)
+ addiu $2, $2, 1
+ sw $2, %dtprel_lo(f3.i)($1)
+ lw $ra, 20($sp) # 4-byte Folded Reload
+ jr $ra
+ addiu $sp, $sp, 24
+ .set at
+ .set macro
+ .set reorder
+ .end f3
+$tmp2:
+ .size f3, ($tmp2)-f3
+
+ .type t1, at object # @t1
+ .section .tbss,"awT", at nobits
+ .globl t1
+ .align 2
+t1:
+ .4byte 0 # 0x0
+ .size t1, 4
+
+ .type f3.i, at object # @f3.i
+ .section .tdata,"awT", at progbits
+ .align 2
+f3.i:
+ .4byte 1 # 0x1
+ .size f3.i, 4
+
+
+ .text
More information about the llvm-commits
mailing list