llvm-project
37 строк · 1.0 Кб
1// REQUIRES: aarch64
2// RUN: split-file %s %t.dir && cd %t.dir
3
4// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows func-arm64ec.s -o func-arm64ec.obj
5// RUN: llvm-mc -filetype=obj -triple=aarch64-windows func-arm64.s -o func-arm64.obj
6// RUN: lld-link -machine:arm64x -dll -noentry -out:out.dll func-arm64ec.obj func-arm64.obj
7// RUN: llvm-objdump -d out.dll | FileCheck %s
8
9// CHECK: 0000000180001000 <.text>:
10// CHECK-NEXT: 180001000: 52800020 mov w0, #0x1 // =1
11// CHECK-NEXT: 180001004: d65f03c0 ret
12// CHECK-NEXT: ...
13// CHECK-NEXT: 180002000: 52800020 mov w0, #0x1 // =1
14// CHECK-NEXT: 180002004: d65f03c0 ret
15
16
17#--- func-arm64.s
18.section .text,"xr",discard,func
19.globl func
20.p2align 2
21func:
22mov w0, #1
23ret
24
25.data
26.rva func
27
28#--- func-arm64ec.s
29.section .text,"xr",discard,"#func"
30.globl "#func"
31.p2align 2
32"#func":
33mov w0, #1
34ret
35
36.data
37.rva "#func"
38