1 // RUN: %clang -c -o %t %s
2 // RUN: %llvm_jitlink %t
4 // Test that basic MachO TLVs work by adding together TLVs with values
5 // 0, 1, and -1, and returning the result (0 for success). This setup
6 // tests both zero-initialized (__thread_bss) and non-zero-initialized
7 // (__thread_data) secitons.
9 .section __TEXT,__text,regular,pure_instructions
10 .build_version macos, 11, 0
16 movq _x@TLVP(%rip), %rdi
19 movq _y@TLVP(%rip), %rdi
23 movq _z@TLVP(%rip), %rdi
30 .tbss _x$tlv$init, 4, 2
32 .section __DATA,__thread_vars,thread_local_variables
39 .section __DATA,__thread_data,thread_local_regular
44 .section __DATA,__thread_vars,thread_local_variables
51 .section __DATA,__thread_data,thread_local_regular
56 .section __DATA,__thread_vars,thread_local_variables
63 .subsections_via_symbols