CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
149 lines
4.8 KiB
ArmAsm
149 lines
4.8 KiB
ArmAsm
REQUIRES: aarch64
|
|
RUN: split-file %s %t.dir && cd %t.dir
|
|
|
|
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows ext.s -o ext.obj
|
|
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows ext-mangled.s -o ext-mangled.obj
|
|
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows impl.s -o impl.obj
|
|
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows impl-cpp.s -o impl-cpp.obj
|
|
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig.obj
|
|
|
|
# Ensure -alternatename can change a mangled function symbol aliasing a defined symbol (typically a guest exit thunk).
|
|
|
|
RUN: lld-link -machine:arm64ec -dll -noentry -out:out1.dll ext.obj loadconfig.obj "-alternatename:#func=altsym"
|
|
|
|
RUN: llvm-objdump -d out1.dll | FileCheck --check-prefix=DISASM %s
|
|
DISASM: 0000000180001000 <.text>:
|
|
DISASM-NEXT: 180001000: 52800020 mov w0, #0x1 // =1
|
|
DISASM-NEXT: 180001004: d65f03c0 ret
|
|
DISASM-NOT: .thnk
|
|
|
|
RUN: llvm-readobj --hex-dump=.test out1.dll | FileCheck --check-prefix=TESTSEC %s
|
|
TESTSEC: 0x180005000 00100000 00100000
|
|
|
|
# Ensure -alternatename can change a demangled function symbol aliasing an anti-dependency symbol.
|
|
|
|
RUN: lld-link -machine:arm64ec -dll -noentry -out:out2.dll ext.obj loadconfig.obj -alternatename:func=altsym
|
|
|
|
RUN: llvm-objdump -d out2.dll | FileCheck --check-prefix=DISASM2 %s
|
|
DISASM2: Disassembly of section .text:
|
|
DISASM2-EMPTY:
|
|
DISASM2-NEXT: 0000000180001000 <.text>:
|
|
DISASM2-NEXT: 180001000: 52800020 mov w0, #0x1 // =1
|
|
DISASM2-NEXT: 180001004: d65f03c0 ret
|
|
DISASM2-EMPTY:
|
|
DISASM2-NEXT: Disassembly of section .thnk:
|
|
DISASM2-EMPTY:
|
|
DISASM2-NEXT: 0000000180006000 <.thnk>:
|
|
DISASM2-NEXT: 180006000: 52800040 mov w0, #0x2 // =2
|
|
DISASM2-NEXT: 180006004: d65f03c0 ret
|
|
|
|
RUN: llvm-readobj --hex-dump=.test out2.dll | FileCheck --check-prefix=TESTSEC2 %s
|
|
TESTSEC2: 0x180005000 00100000 00600000
|
|
|
|
# Ensure -alternatename cannot modify a demangled function symbol aliasing a defined symbol.
|
|
|
|
RUN: lld-link -machine:arm64ec -dll -noentry -out:out3.dll impl.obj loadconfig.obj -alternatename:func=altsym
|
|
RUN: llvm-objdump -d out3.dll | FileCheck --check-prefix=DISASM %s
|
|
RUN: llvm-readobj --hex-dump=.test out3.dll | FileCheck --check-prefix=TESTSEC %s
|
|
|
|
RUN: lld-link -machine:arm64ec -dll -noentry -out:out4.dll impl-cpp.obj loadconfig.obj -alternatename:func=altsym
|
|
RUN: llvm-objdump -d out4.dll | FileCheck --check-prefix=DISASM %s
|
|
RUN: llvm-readobj --hex-dump=.test out4.dll | FileCheck --check-prefix=TESTSEC %s
|
|
|
|
# Check that when both mangled and demangled alternate names are used,
|
|
# only the one whose target is defined is used (the mangled one in this case).
|
|
|
|
RUN: lld-link -machine:arm64ec -dll -noentry -out:out5.dll ext-mangled.obj loadconfig.obj "-alternatename:#func=#altsym" -alternatename:func=altsym
|
|
RUN: llvm-objdump -d out5.dll | FileCheck --check-prefix=DISASM %s
|
|
RUN: llvm-readobj --hex-dump=.test out5.dll | FileCheck --check-prefix=TESTSEC %s
|
|
|
|
# Check that when both mangled and demangled alternate names are used,
|
|
# only the one whose target is defined is used (the demangled one in this case).
|
|
|
|
RUN: lld-link -machine:arm64ec -dll -noentry -out:out6.dll ext.obj loadconfig.obj "-alternatename:#func=#altsym" -alternatename:func=altsym
|
|
RUN: llvm-objdump -d out6.dll | FileCheck --check-prefix=DISASM2 %s
|
|
RUN: llvm-readobj --hex-dump=.test out6.dll | FileCheck --check-prefix=TESTSEC2 %s
|
|
|
|
#--- ext.s
|
|
.weak_anti_dep func
|
|
.set func, "#func"
|
|
.weak_anti_dep "#func"
|
|
.set "#func", thunksym
|
|
|
|
.section .test, "r"
|
|
.rva func
|
|
.rva "#func"
|
|
|
|
.section .thnk,"xr",discard,thunksym
|
|
thunksym:
|
|
mov w0, #2
|
|
ret
|
|
|
|
.section .text,"xr",discard,altsym
|
|
.globl altsym
|
|
altsym:
|
|
mov w0, #1
|
|
ret
|
|
|
|
#--- ext-mangled.s
|
|
.weak_anti_dep func
|
|
.set func, "#func"
|
|
.weak_anti_dep "#func"
|
|
.set "#func", thunksym
|
|
|
|
.section .test, "r"
|
|
.rva func
|
|
.rva "#func"
|
|
|
|
.section .thnk,"xr",discard,thunksym
|
|
thunksym:
|
|
mov w0, #2
|
|
ret
|
|
|
|
.section .text,"xr",discard,"#altsym"
|
|
.globl "#altsym"
|
|
"#altsym":
|
|
mov w0, #1
|
|
ret
|
|
|
|
.weak_anti_dep altsym
|
|
.set altsym,"#altsym"
|
|
|
|
#--- impl.s
|
|
.weak_anti_dep func
|
|
.set func, "#func"
|
|
|
|
.section .test, "r"
|
|
.rva func
|
|
.rva "#func"
|
|
|
|
.section .text,"xr",discard,"#func"
|
|
"#func":
|
|
mov w0, #1
|
|
ret
|
|
|
|
.section .text,"xr",discard,altsym
|
|
.globl altsym
|
|
altsym:
|
|
mov w0, #2
|
|
ret
|
|
|
|
#--- impl-cpp.s
|
|
.weak_anti_dep func
|
|
.set func, "?func@@$$hYAXXZ"
|
|
|
|
.section .test, "r"
|
|
.rva func
|
|
.rva "?func@@$$hYAXXZ"
|
|
|
|
.section .text,"xr",discard,"?func@@$$hYAXXZ"
|
|
"?func@@$$hYAXXZ":
|
|
mov w0, #1
|
|
ret
|
|
|
|
.section .text,"xr",discard,altsym
|
|
.globl altsym
|
|
altsym:
|
|
mov w0, #2
|
|
ret
|