aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/arm/tls.d48
-rw-r--r--gas/testsuite/gas/arm/tls.s42
3 files changed, 75 insertions, 21 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 67eee86..d28da8d 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-10 Nathan Sidwell <nathan@codesourcery.com>
+ Glauber de Oliveira Costa <glommer@gmail.com>
+
+ * gas/arm/tls.s: Add tlsdesc tests.
+ * gas/arm/tls.d: Adjust.
+
2011-01-07 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/ilp32/x86-64-arch-2.d: Add bmi flag and BMI instruction
diff --git a/gas/testsuite/gas/arm/tls.d b/gas/testsuite/gas/arm/tls.d
index 6401f29..727f8e4 100644
--- a/gas/testsuite/gas/arm/tls.d
+++ b/gas/testsuite/gas/arm/tls.d
@@ -11,15 +11,39 @@
Disassembly of section .text:
-00+0 <main>:
- 0: e1a00000 nop ; \(mov r0, r0\)
- 4: e1a00000 nop ; \(mov r0, r0\)
- 8: e1a0f00e mov pc, lr
- c: 00000000 .word 0x00000000
- c: R_ARM_TLS_GD32 a
- 10: 00000004 .word 0x00000004
- 10: R_ARM_TLS_LDM32 b
- 14: 00000008 .word 0x00000008
- 14: R_ARM_TLS_IE32 c
- 18: 00000000 .word 0x00000000
- 18: R_ARM_TLS_LE32 d
+0+00 <arm_fn>:
+ 0: e1a00000 nop ; .*
+ 0: R_ARM_TLS_DESCSEQ af
+ 4: e59f0014 ldr r0, \[pc, #20\] ; 20 .*
+ 8: fa000000 blx 8 <ae\+.*>
+ 8: R_ARM_TLS_CALL ae
+ c: e1a00000 nop ; .*
+0+10 <.arm_pool>:
+ 10: 00000008 .word 0x00000008
+ 10: R_ARM_TLS_GD32 aa
+ 14: 0000000c .word 0x0000000c
+ 14: R_ARM_TLS_LDM32 ab
+ 18: 00000010 .word 0x00000010
+ 18: R_ARM_TLS_IE32 ac
+ 1c: 00000000 .word 0x00000000
+ 1c: R_ARM_TLS_LE32 ad
+ 20: 00000018 .word 0x00000018
+ 20: R_ARM_TLS_GOTDESC ae
+0+24 <thumb_fn>:
+ 24: 46c0 nop ; .*
+ 26: 46c0 nop ; .*
+ 26: R_ARM_THM_TLS_DESCSEQ tf
+ 28: 4805 ldr r0, \[pc, #20\] ; \(40 .*\)
+ 2a: f000 e800 blx 4 <te\+0x4>
+ 2a: R_ARM_THM_TLS_CALL te
+ 2e: 46c0 nop ; .*
+ 30: 00000002 .word 0x00000002
+ 30: R_ARM_TLS_GD32 ta
+ 34: 00000006 .word 0x00000006
+ 34: R_ARM_TLS_LDM32 tb
+ 38: 0000000a .word 0x0000000a
+ 38: R_ARM_TLS_IE32 tc
+ 3c: 00000000 .word 0x00000000
+ 3c: R_ARM_TLS_LE32 td
+ 40: 00000017 .word 0x00000017
+ 40: R_ARM_TLS_GOTDESC te
diff --git a/gas/testsuite/gas/arm/tls.s b/gas/testsuite/gas/arm/tls.s
index 48722a4..96a25f5 100644
--- a/gas/testsuite/gas/arm/tls.s
+++ b/gas/testsuite/gas/arm/tls.s
@@ -1,14 +1,38 @@
.text
- .globl main
- .type main, %function
-main:
+ .arm
+ .globl arm_fn
+ .type arm_fn, %function
+arm_fn:
+1:
+.tlsdescseq af
nop
-.L2:
+ ldr r0, 1f
+2: blx ae(tlscall)
nop
- mov pc, lr
+.arm_pool:
+ .word aa(tlsgd) + (. - 1b - 8)
+ .word ab(tlsldm) + (. - 1b- 8)
+ .word ac(gottpoff) + (. - 1b - 8)
+ .word ad(tpoff)
+1: .word ae(tlsdesc) + (. - 2b)
+
+ .thumb
+ .globl thumb_fn
+ .type thumb_fn, %function
+thumb_fn:
+ nop
+1:
+.tlsdescseq tf
+ nop
+ ldr r0, 1f
+2: blx te(tlscall)
+ nop
+
+ .p2align 2
.Lpool:
- .word a(tlsgd) + (. - .L2 - 8)
- .word b(tlsldm) + (. - .L2 - 8)
- .word c(gottpoff) + (. - .L2 - 8)
- .word d(tpoff)
+ .word ta(tlsgd) + (. - 1b - 8)
+ .word tb(tlsldm) + (. - 1b - 8)
+ .word tc(gottpoff) + (. - 1b - 8)
+ .word td(tpoff)
+1: .word te(tlsdesc) + (. - 2b + 1)