-.section foo1,"ax",@progbits\r
-.cfi_startproc\r
- nop\r
-.cfi_endproc\r
-\r
-.section bar1,"ax",@progbits\r
-.cfi_startproc\r
- nop\r
-.cfi_endproc\r
-\r
-.section dah1,"ax",@progbits\r
-.cfi_startproc\r
- nop\r
-.cfi_endproc\r
+.section foo1,"ax",@progbits
+.cfi_startproc
+ nop
+.cfi_endproc
+
+.section bar1,"ax",@progbits
+.cfi_startproc
+ nop
+.cfi_endproc
+
+.section dah1,"ax",@progbits
+.cfi_startproc
+ nop
+.cfi_endproc
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o\r
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o\r
-# RUN: ld.lld %tmain.o %ttlsie.o -o %tout\r
-# RUN: llvm-objdump -d %tout | FileCheck %s\r
-# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s\r
-# REQUIRES: aarch64\r
-\r
-#Local-Dynamic to Initial-Exec relax creates no\r
-#RELOC: Relocations [\r
-#RELOC-NEXT: ]\r
-\r
-# TCB size = 0x16 and foo is first element from TLS register.\r
-#CHECK: Disassembly of section .text:\r
-#CHECK: _start:\r
-#CHECK: 11000: 00 00 a0 d2 movz x0, #0, lsl #16\r
-#CHECK: 11004: 00 02 80 f2 movk x0, #0x10\r
-#CHECK: 11008: 1f 20 03 d5 nop\r
-#CHECK: 1100c: 1f 20 03 d5 nop\r
-\r
-.globl _start\r
-_start:\r
- adrp x0, :tlsdesc:foo\r
- ldr x1, [x0, :tlsdesc_lo12:foo]\r
- add x0, x0, :tlsdesc_lo12:foo\r
- .tlsdesccall foo\r
- blr x1\r
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o
+# RUN: ld.lld %tmain.o %ttlsie.o -o %tout
+# RUN: llvm-objdump -d %tout | FileCheck %s
+# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s
+# REQUIRES: aarch64
+
+#Local-Dynamic to Initial-Exec relax creates no
+#RELOC: Relocations [
+#RELOC-NEXT: ]
+
+# TCB size = 0x16 and foo is first element from TLS register.
+#CHECK: Disassembly of section .text:
+#CHECK: _start:
+#CHECK: 11000: 00 00 a0 d2 movz x0, #0, lsl #16
+#CHECK: 11004: 00 02 80 f2 movk x0, #0x10
+#CHECK: 11008: 1f 20 03 d5 nop
+#CHECK: 1100c: 1f 20 03 d5 nop
+
+.globl _start
+_start:
+ adrp x0, :tlsdesc:foo
+ ldr x1, [x0, :tlsdesc_lo12:foo]
+ add x0, x0, :tlsdesc_lo12:foo
+ .tlsdesccall foo
+ blr x1
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-tls-ie.s -o %tdso.o\r
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %tmain.o\r
-# RUN: ld.lld -shared %tdso.o -o %tdso.so\r
-# RUN: ld.lld %tmain.o %tdso.so -o %tout\r
-# RUN: llvm-objdump -d %tout | FileCheck %s\r
-# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s\r
-# REQUIRES: aarch64\r
-\r
-#RELOC: Section {\r
-#RELOC: Index:\r
-#RELOC: Name: .got\r
-#RELOC-NEXT: Type: SHT_PROGBITS\r
-#RELOC-NEXT: Flags [\r
-#RELOC-NEXT: SHF_ALLOC\r
-#RELOC-NEXT: SHF_WRITE\r
-#RELOC-NEXT: ]\r
-#RELOC-NEXT: Address: 0x120B0\r
-#RELOC-NEXT: Offset: 0x20B0\r
-#RELOC-NEXT: Size: 16\r
-#RELOC-NEXT: Link: 0\r
-#RELOC-NEXT: Info: 0\r
-#RELOC-NEXT: AddressAlignment: 8\r
-#RELOC-NEXT: EntrySize: 0\r
-#RELOC-NEXT: }\r
-#RELOC: Relocations [\r
-#RELOC-NEXT: Section ({{.*}}) .rela.dyn {\r
-#RELOC-NEXT: 0x120B0 R_AARCH64_TLS_TPREL64 foo 0x0\r
-#RELOC-NEXT: 0x120B8 R_AARCH64_TLS_TPREL64 bar 0x0\r
-#RELOC-NEXT: }\r
-#RELOC-NEXT:]\r
-\r
-# Page(0x120B0) - Page(0x11000) = 0x1000 = 4096\r
-# 0x120B0 & 0xff8 = 0xB0 = 176\r
-# Page(0x120B8) - Page(0x11000) = 0x1000 = 4096\r
-# 0x120B8 & 0xff8 = 0xB8 = 184\r
-#CHECK: Disassembly of section .text:\r
-#CHECK: _start:\r
-#CHECK: 11000: 00 00 00 b0 adrp x0, #4096\r
-#CHECK: 11004: 00 58 40 f9 ldr x0, [x0, #176]\r
-#CHECK: 11008: 00 00 00 b0 adrp x0, #4096\r
-#CHECK: 1100c: 00 5c 40 f9 ldr x0, [x0, #184]\r
-\r
-.globl _start\r
-_start:\r
- adrp x0, :gottprel:foo\r
- ldr x0, [x0, #:gottprel_lo12:foo]\r
-\r
- adrp x0, :gottprel:bar\r
- ldr x0, [x0, #:gottprel_lo12:bar]\r
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-tls-ie.s -o %tdso.o
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %tmain.o
+# RUN: ld.lld -shared %tdso.o -o %tdso.so
+# RUN: ld.lld %tmain.o %tdso.so -o %tout
+# RUN: llvm-objdump -d %tout | FileCheck %s
+# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s
+# REQUIRES: aarch64
+
+#RELOC: Section {
+#RELOC: Index:
+#RELOC: Name: .got
+#RELOC-NEXT: Type: SHT_PROGBITS
+#RELOC-NEXT: Flags [
+#RELOC-NEXT: SHF_ALLOC
+#RELOC-NEXT: SHF_WRITE
+#RELOC-NEXT: ]
+#RELOC-NEXT: Address: 0x120B0
+#RELOC-NEXT: Offset: 0x20B0
+#RELOC-NEXT: Size: 16
+#RELOC-NEXT: Link: 0
+#RELOC-NEXT: Info: 0
+#RELOC-NEXT: AddressAlignment: 8
+#RELOC-NEXT: EntrySize: 0
+#RELOC-NEXT: }
+#RELOC: Relocations [
+#RELOC-NEXT: Section ({{.*}}) .rela.dyn {
+#RELOC-NEXT: 0x120B0 R_AARCH64_TLS_TPREL64 foo 0x0
+#RELOC-NEXT: 0x120B8 R_AARCH64_TLS_TPREL64 bar 0x0
+#RELOC-NEXT: }
+#RELOC-NEXT:]
+
+# Page(0x120B0) - Page(0x11000) = 0x1000 = 4096
+# 0x120B0 & 0xff8 = 0xB0 = 176
+# Page(0x120B8) - Page(0x11000) = 0x1000 = 4096
+# 0x120B8 & 0xff8 = 0xB8 = 184
+#CHECK: Disassembly of section .text:
+#CHECK: _start:
+#CHECK: 11000: 00 00 00 b0 adrp x0, #4096
+#CHECK: 11004: 00 58 40 f9 ldr x0, [x0, #176]
+#CHECK: 11008: 00 00 00 b0 adrp x0, #4096
+#CHECK: 1100c: 00 5c 40 f9 ldr x0, [x0, #184]
+
+.globl _start
+_start:
+ adrp x0, :gottprel:foo
+ ldr x0, [x0, #:gottprel_lo12:foo]
+
+ adrp x0, :gottprel:bar
+ ldr x0, [x0, #:gottprel_lo12:bar]
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o\r
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o\r
-# RUN: ld.lld %tmain.o %ttlsie.o -o %tout\r
-# RUN: llvm-objdump -d %tout | FileCheck %s\r
-# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s\r
-# REQUIRES: aarch64\r
-\r
-#Local-Dynamic to Initial-Exec relax creates no\r
-#RELOC: Relocations [\r
-#RELOC-NEXT: ]\r
-\r
-# TCB size = 0x16 and foo is first element from TLS register.\r
-#CHECK: Disassembly of section .text:\r
-#CHECK: _start:\r
-#CHECK: 11000: 00 00 a0 d2 movz x0, #0, lsl #16\r
-#CHECK: 11004: 00 02 80 f2 movk x0, #0x10\r
-\r
-.globl _start\r
-_start:\r
- adrp x0, :gottprel:foo\r
- ldr x0, [x0, :gottprel_lo12:foo]\r
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o
+# RUN: ld.lld %tmain.o %ttlsie.o -o %tout
+# RUN: llvm-objdump -d %tout | FileCheck %s
+# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s
+# REQUIRES: aarch64
+
+#Local-Dynamic to Initial-Exec relax creates no
+#RELOC: Relocations [
+#RELOC-NEXT: ]
+
+# TCB size = 0x16 and foo is first element from TLS register.
+#CHECK: Disassembly of section .text:
+#CHECK: _start:
+#CHECK: 11000: 00 00 a0 d2 movz x0, #0, lsl #16
+#CHECK: 11004: 00 02 80 f2 movk x0, #0x10
+
+.globl _start
+_start:
+ adrp x0, :gottprel:foo
+ ldr x0, [x0, :gottprel_lo12:foo]
-# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %tmain.o\r
-# RUN: ld.lld %tmain.o -o %tout\r
-# RUN: llvm-objdump -d %tout | FileCheck %s\r
-# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s\r
-# REQUIRES: aarch64\r
-\r
-#Local-Dynamic to Initial-Exec relax creates no\r
-#RELOC: Relocations [\r
-#RELOC-NEXT: ]\r
-\r
-.globl _start\r
-_start:\r
- mrs x0, TPIDR_EL0\r
- add x0, x0, :tprel_hi12:v1\r
- add x0, x0, :tprel_lo12_nc:v1\r
-\r
-# TCB size = 0x16 and foo is first element from TLS register.\r
-#CHECK: Disassembly of section .text:\r
-#CHECK: _start:\r
-#CHECK: 11000: 40 d0 3b d5 mrs x0, TPIDR_EL0\r
-#CHECK: 11004: 00 00 00 91 add x0, x0, #0\r
-#CHECK: 11008: 00 40 00 91 add x0, x0, #16\r
-\r
-.type v1,@object\r
-.section .tbss,"awT",@nobits\r
-.globl v1\r
-.p2align 2\r
-v1:\r
-.word 0\r
-.size v1, 4\r
-\r
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %tmain.o
+# RUN: ld.lld %tmain.o -o %tout
+# RUN: llvm-objdump -d %tout | FileCheck %s
+# RUN: llvm-readobj -s -r %tout | FileCheck -check-prefix=RELOC %s
+# REQUIRES: aarch64
+
+#Local-Dynamic to Initial-Exec relax creates no
+#RELOC: Relocations [
+#RELOC-NEXT: ]
+
+.globl _start
+_start:
+ mrs x0, TPIDR_EL0
+ add x0, x0, :tprel_hi12:v1
+ add x0, x0, :tprel_lo12_nc:v1
+
+# TCB size = 0x16 and foo is first element from TLS register.
+#CHECK: Disassembly of section .text:
+#CHECK: _start:
+#CHECK: 11000: 40 d0 3b d5 mrs x0, TPIDR_EL0
+#CHECK: 11004: 00 00 00 91 add x0, x0, #0
+#CHECK: 11008: 00 40 00 91 add x0, x0, #16
+
+.type v1,@object
+.section .tbss,"awT",@nobits
+.globl v1
+.p2align 2
+v1:
+.word 0
+.size v1, 4
+