Files
TheRock/compiler/amd-llvm/bolt/test/X86/dwarf5-locaddrx.test
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

83 lines
4.0 KiB
Plaintext

; RUN: rm -rf %t
; RUN: mkdir %t
; RUN: cd %t
; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-locaddrx.s \
; RUN: -split-dwarf-file=mainlocadddrx.dwo -o mainlocadddrx.o
; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split mainlocadddrx.o -o mainlocadddrx.exe -fno-pic -no-pie
; RUN: llvm-bolt mainlocadddrx.exe -o mainlocadddrx.exe.bolt --update-debug-sections --always-convert-to-ranges
; RUN: llvm-dwarfdump --show-form --verbose --debug-info mainlocadddrx.exe | FileCheck -check-prefix=PRE-BOLT %s
; RUN: llvm-dwarfdump --show-form --verbose --debug-addr mainlocadddrx.exe.bolt &> %t/foo.txt
; RUN: llvm-dwarfdump --show-form --verbose --debug-info mainlocadddrx.exe.bolt >> %t/foo.txt
; RUN: cat %t/foo.txt | FileCheck -check-prefix=BOLT %s
; RUN: llvm-dwarfdump --show-form --verbose --debug-info mainlocadddrx.dwo | FileCheck -check-prefix=PRE-BOLT-DWO %s
; RUN: llvm-dwarfdump --show-form --verbose --debug-info mainlocadddrx.dwo.dwo | FileCheck -check-prefix=BOLT-DWO %s
;; Testing dwarf5 split dwarf. Making sure DW_AT_low_pc/DW_AT_high_pc are converted correctly in the binary and in dwo.
;; Checking that DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x0) is updated correctly.
; PRE-BOLT: version = 0x0005
; PRE-BOLT: DW_TAG_skeleton_unit
; PRE-BOLT: DW_AT_low_pc [DW_FORM_addrx]
; PRE-BOLT-NEXT: DW_AT_high_pc [DW_FORM_data4]
; PRE-BOLT: DW_AT_addr_base [DW_FORM_sec_offset] (0x00000008)
; BOLT: Addrs: [
; BOLT-NEXT: 0x
; BOLT-NEXT: 0x
; BOLT-NEXT: 0x[[#%.16x,ADDR:]]
; BOLT-NEXT: 0x[[#%.16x,ADDR2:]]
; BOLT: DW_TAG_skeleton_unit
; BOLT: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000004) address = 0x0000000000000000)
; BOLT-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000010
; BOLT-NEXT: [0x[[#ADDR]]
; BOLT-SAME: 0x[[#ADDR + 0x24]]
; BOLT-NEXT: [0x[[#ADDR2]]
; BOLT-SAME: 0x[[#ADDR2 + 0x54]]
; BOLT-NEXT: DW_AT_addr_base [DW_FORM_sec_offset] (0x00000008)
; BOLT-NEXT: DW_AT_rnglists_base [DW_FORM_sec_offset] (0x0000000c)
; PRE-BOLT-DWO: version = 0x0005
; PRE-BOLT-DWO: DW_TAG_compile_unit
; PRE-BOLT-DWO: DW_TAG_variable [2]
; PRE-BOLT-DWO-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000000) string = "x")
; PRE-BOLT-DWO-NEXT: DW_AT_type
; PRE-BOLT-DWO-NEXT: DW_AT_external
; PRE-BOLT-DWO-NEXT: DW_AT_decl_file
; PRE-BOLT-DWO-NEXT: DW_AT_decl_line
; PRE-BOLT-DWO-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x0)
; PRE-BOLT-DWO: DW_TAG_variable [2]
; PRE-BOLT-DWO-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000002) string = "y")
; PRE-BOLT-DWO-NEXT: DW_AT_type
; PRE-BOLT-DWO-NEXT: DW_AT_external
; PRE-BOLT-DWO-NEXT: DW_AT_decl_file
; PRE-BOLT-DWO-NEXT: DW_AT_decl_line
; PRE-BOLT-DWO-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x1)
; PRE-BOLT-DWO: DW_TAG_subprogram
; PRE-BOLT-DWO-NEXT: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000002)
; PRE-BOLT-DWO-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000024)
; PRE-BOLT-DWO: DW_TAG_subprogram
; PRE-BOLT-DWO-NEXT: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000003)
; PRE-BOLT-DWO-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x0000005a)
; BOLT-DWO: DW_TAG_compile_unit
; BOLT-DWO: DW_TAG_variable [2]
; BOLT-DWO-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000000) string = "x")
; BOLT-DWO-NEXT: DW_AT_type
; BOLT-DWO-NEXT: DW_AT_external
; BOLT-DWO-NEXT: DW_AT_decl_file
; BOLT-DWO-NEXT: DW_AT_decl_line
; BOLT-DWO-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x0)
; BOLT-DWO: DW_TAG_variable [2]
; BOLT-DWO-NEXT: DW_AT_name [DW_FORM_strx1] (indexed (00000002) string = "y")
; BOLT-DWO-NEXT: DW_AT_type
; BOLT-DWO-NEXT: DW_AT_external
; BOLT-DWO-NEXT: DW_AT_decl_file
; BOLT-DWO-NEXT: DW_AT_decl_line
; BOLT-DWO-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x1)
; BOLT-DWO: DW_TAG_subprogram [4]
; BOLT-DWO-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist = 0x00000014
; BOLT-DWO-NEXT: [0x0000000000000000, 0x0000000000000024))
; BOLT-DWO: DW_TAG_subprogram [6]
; BOLT-DWO-NEXT: DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x1) rangelist = 0x00000018
; BOLT-DWO-NEXT: [0x0000000000000000, 0x0000000000000054))