File: literal-pointers-x86_64.test

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (40 lines) | stat: -rw-r--r-- 1,270 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# RUN: llvm-mc < %s --triple x86_64-apple-darwin -filetype=obj | llvm-objdump --macho --section __DATA,__litp - | FileCheck %s
# RUN: llvm-mc < %s --triple x86_64-apple-darwin -filetype=obj | llvm-objdump --macho --section __DATA,__litp --non-verbose - | FileCheck %s --check-prefix=NON-VERBOSE

.cstring
L1: .asciz "Hello world\n"

.literal4
.align 2
L2: .float 4.0

.literal8
.align 3
L3: .double 8.0

.literal16
.align 4
L4: .long 0x10000016, 0x20000016, 0x30000016, 0x40000016

.const
L5: .asciz "const non-literal string"

.section __DATA,__litp, literal_pointers
.align 3
.quad L1
.quad L2
.quad L3
.quad L4
.quad L5

# CHECK: Contents of (__DATA,__litp) section
# CHECK: 0000000000000050  __TEXT:__cstring:Hello world\n
# CHECK: 0000000000000058  __TEXT:__literal4:0x40800000
# CHECK: 0000000000000060  __TEXT:__literal8:0x00000000 0x40200000
# CHECK: 0000000000000068  __TEXT:__literal16:0x10000016 0x20000016 0x30000016 0x40000016
# CHECK: 0000000000000070  0x30 (not in a literal section)

# NON-VERBOSE: Contents of (__DATA,__litp) section
# NON-VERBOSE: 0000000000000050	00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 
# NON-VERBOSE: 0000000000000060	18 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 
# NON-VERBOSE: 0000000000000070	30 00 00 00 00 00 00 00