• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -target-abi=ilp32 -triple aarch64-non-linux-gnu -filetype=obj \
2// RUN:  %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-ILP32 %s
3// RUN: llvm-mc                   -triple aarch64-non-linux-gnu -filetype=obj \
4// RUN:  %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-LP64 %s
5	.text
6	.file	"../projects/clang/test/Driver/arm64-ilp32.c"
7	.globl	foo
8	.align	2
9	.type	foo,@function
10foo:                                    // @foo
11// %bb.0:                               // %entry
12	sub	sp, sp, #16             // =16
13// CHECK-ILP32: 0000000000000004 R_AARCH64_P32_ADR_PREL_PG_HI21 sizes
14// CHECK-ILP32: 0000000000000008 R_AARCH64_P32_ADD_ABS_LO12_NC sizes
15// CHECK-LP64:  0000000000000004 R_AARCH64_ADR_PREL_PG_HI21 sizes
16// CHECK-LP64:  0000000000000008 R_AARCH64_ADD_ABS_LO12_NC sizes
17	adrp	x8, sizes
18	add	x8, x8, :lo12:sizes
19	str	w0, [sp, #12]
20	str	w1, [sp, #8]
21	ldr		w0, [x8]
22	add	sp, sp, #16             // =16
23	ret
24.Lfunc_end0:
25	.size	foo, .Lfunc_end0-foo
26
27	.type	sizes,@object           // @sizes
28	.data
29	.globl	sizes
30	.align	2
31sizes:
32	.word	1                       // 0x1
33	.word	2                       // 0x2
34	.word	4                       // 0x4
35	.word	4                       // 0x4
36	.word	4                       // 0x4
37	.size	sizes, 20
38