Files
TheRock/compiler/amd-llvm/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_i386.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

73 lines
2.0 KiB
ArmAsm

// RUN: rm -rf %t && mkdir -p %t
// RUN: llvm-mc -triple i686-windows -filetype obj -o %t/COFF_i386.o %s
// RUN: llvm-rtdyld -triple i686-windows -dummy-extern _printf=0x7ffffffd \
// RUN: -dummy-extern _ExitProcess=0x7fffffff \
// RUN: -verify -check=%s %t/COFF_i386.o
.text
.def _main
.scl 2
.type 32
.endef
.global _main
_main:
rel1:
call _function // IMAGE_REL_I386_REL32
# rtdyld-check: decode_operand(rel1, 0) = (_function-_main-4-1)
xorl %eax, %eax
rel12:
jmp _printf
# rtdyld-check: decode_operand(rel12, 0)[31:0] = (_printf-_main-4-8)
.def _function
.scl 2
.type 32
.endef
_function:
rel2:
pushl string
# rtdyld-check: decode_operand(rel3, 3) = \
# rtdyld-check: stub_addr(COFF_i386.o/.text, __imp__ExitProcess)
# rtdyld-check: *{4}(stub_addr(COFF_i386.o/.text, __imp__ExitProcess)) = \
# rtdyld-check: _ExitProcess
rel3:
calll *__imp__ExitProcess // IMAGE_REL_I386_DIR32
.data
.global relocations
relocations:
rel5:
.long _function@imgrel // IMAGE_REL_I386_DIR32NB
# rtdyld-check: *{4}rel5 = _function - section_addr(COFF_i386.o, .text)
rel6:
# rtdyld-check: *{2}rel6 = 1
.secidx rel5 // IMAGE_REL_I386_SECTION
rel7:
# rtdyld-check: *{4}rel7 = string - section_addr(COFF_i386.o, .data)
.secrel32 string // IMAGE_REL_I386_SECREL
# Test that addends work.
rel8:
# rtdyld-check: *{4}rel8 = string
.long string // IMAGE_REL_I386_DIR32
rel9:
# rtdyld-check: *{4}rel9 = string+1
.long string+1 // IMAGE_REL_I386_DIR32
rel10:
# rtdyld-check: *{4}rel10 = string - section_addr(COFF_i386.o, .text) + 1
.long string@imgrel+1 // IMAGE_REL_I386_DIR32NB
rel11:
# rtdyld-check: *{4}rel11 = string - section_addr(COFF_i386.o, .data) + 1
.long string@SECREL32+1 // IMAGE_REL_I386_SECREL
# We explicitly add padding to put string outside of the 16bit address space
# (absolute and as an offset from .data), so that relocations involving
# 32bit addresses / offsets are not accidentally truncated to 16 bits.
.space 65536
.global string
.align 1
string:
.asciz "Hello World!\n"