|
| 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: llvm-mc -filetype=obj -triple=arm64ec-windows drectve.s -o drectve.obj |
| 7 | +RUN: llvm-mc -filetype=obj -triple=aarch64-windows drectve.s -o drectve-arm64.obj |
| 8 | +RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig-arm64ec.obj |
| 9 | +RUN: llvm-mc -filetype=obj -triple=aarch64-windows %S/Inputs/loadconfig-arm64.s -o loadconfig-arm64.obj |
| 10 | + |
| 11 | +RUN: lld-link -machine:arm64x -dll -noentry -out:out.dll loadconfig-arm64.obj loadconfig-arm64ec.obj \ |
| 12 | +RUN: func-arm64.obj func-arm64ec.obj drectve.obj |
| 13 | + |
| 14 | +RUN: lld-link -machine:arm64x -dll -noentry -out:out-cmd.dll loadconfig-arm64.obj loadconfig-arm64ec.obj \ |
| 15 | +RUN: func-arm64.obj func-arm64ec.obj -arm64xsameaddress:func |
| 16 | + |
| 17 | +RUN: lld-link -machine:arm64ec -dll -noentry -out:out-ec.dll loadconfig-arm64ec.obj func-arm64ec.obj drectve.obj |
| 18 | + |
| 19 | +RUN: lld-link -machine:arm64x -dll -noentry -out:out-warn.dll loadconfig-arm64.obj loadconfig-arm64ec.obj \ |
| 20 | +RUN: func-arm64.obj func-arm64ec.obj drectve-arm64.obj 2>&1 | FileCheck --check-prefix=WARN %s |
| 21 | +WARN: lld-link: warning: -arm64xsameaddress: is not allowed in non-ARM64EC files (drectve-arm64.obj) |
| 22 | + |
| 23 | +#--- func-arm64.s |
| 24 | + .section .text,"xr",discard,func |
| 25 | + .globl func |
| 26 | +func: |
| 27 | + mov x0, #1 |
| 28 | + ret |
| 29 | + |
| 30 | +#--- func-arm64ec.s |
| 31 | + .section .text,"xr",discard,"#func" |
| 32 | + .globl "#func" |
| 33 | +"#func": |
| 34 | + mov x0, #2 |
| 35 | + ret |
| 36 | + |
| 37 | + .weak_anti_dep func |
| 38 | + .set func,"#func" |
| 39 | + |
| 40 | + .section .wowthk,"xr",discard,entry_thunk |
| 41 | + .globl entry_thunk |
| 42 | +entry_thunk: |
| 43 | + mov x0, #3 |
| 44 | + ret |
| 45 | + |
| 46 | + .section .test,"dr" |
| 47 | + .rva func |
| 48 | + |
| 49 | + .section .hybmp$x,"yi" |
| 50 | + .symidx "#func" |
| 51 | + .symidx entry_thunk |
| 52 | + .word 1 |
| 53 | + |
| 54 | +#--- drectve.s |
| 55 | + .section .drectve, "yn" |
| 56 | + .ascii " -arm64xsameaddress:func" |
0 commit comments