Files
TheRock/compiler/amd-llvm/bolt/test/AArch64/instrumentation_sequence.s
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

51 lines
1.7 KiB
ArmAsm

# This test is to validate instrumentation code sequence generated with
# and without `--no-lse-atomics`.
# REQUIRES: system-linux,bolt-runtime,target=aarch64{{.*}}
# RUN: %clang %cflags -pie %s -o %t.so -Wl,-q -Wl,--init=_foo -Wl,--fini=_foo
.text
.global _foo
.type _foo, %function
_foo:
ret
.global _start
.type _start, %function
_start:
ret
# Dummy relocation to force relocation mode
.reloc 0, R_AARCH64_NONE
# RUN: llvm-bolt %t.so -o %t.instr.so --instrument
# RUN: llvm-objdump -d %t.instr.so | FileCheck %s --check-prefix=INLINE
# INLINE: {{.*}} <_foo>:
# INLINE-NEXT: {{.*}} stp x0, x1, [sp, #-0x10]!
# INLINE-NEXT: {{.*}} adrp x0, 0x{{[0-9a-f]*}} {{.*}}
# INLINE-NEXT: {{.*}} add x0, x0, #0x{{[0-9a-f]*}}
# INLINE-NEXT: {{.*}} mov x1, #0x1
# INLINE-NEXT: {{.*}} stadd x1, [x0]
# INLINE-NEXT: {{.*}} ldp x0, x1, [sp], #0x10
# RUN: llvm-bolt %t.so -o %t.instr.no_lse.so --instrument \
# RUN: --no-lse-atomics
# RUN: llvm-objdump -d %t.instr.no_lse.so | FileCheck %s --check-prefix=NOLSE
# NOLSE: {{.*}} <_foo>:
# NOLSE-NEXT: {{.*}} stp x0, x30, [sp, #-0x10]!
# NOLSE-NEXT: {{.*}} stp x1, x2, [sp, #-0x10]!
# NOLSE-NEXT: {{.*}} adrp x0, 0x{{[0-9a-f]*}} {{.*}}
# NOLSE-NEXT: {{.*}} add x0, x0, #0x{{[0-9a-f]*}}
# NOLSE-NEXT: {{.*}} adrp x1, 0x[[PAGEBASE:[0-9a-f]*]]000 {{.*}}
# NOLSE-NEXT: {{.*}} add x1, x1, #0x[[PAGEOFF:[0-9a-f]*]]
# NOLSE-NEXT: {{.*}} blr x1
# NOLSE-NEXT: {{.*}} ldp x0, x30, [sp], #0x10
# NOLSE: {{[0]*}}[[PAGEBASE]][[PAGEOFF]] <__bolt_instr_counter_incr>:
# NOLSE-NEXT: {{.*}} ldaxr x1, [x0]
# NOLSE-NEXT: {{.*}} add x1, x1, #0x1
# NOLSE-NEXT: {{.*}} stlxr w2, x1, [x0]
# NOLSE-NEXT: {{.*}} cbnz w2, 0x{{[0-9[a-f]*}} <__bolt_instr_counter_incr>
# NOLSE-NEXT: {{.*}} ldp x1, x2, [sp], #0x10
# NOLSE-NEXT: {{.*}} ret