Files
TheRock/compiler/amd-llvm/llvm/test/MC/RISCV/option-exact.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

117 lines
3.6 KiB
ArmAsm

# RUN: llvm-mc -triple riscv32 -show-encoding -mattr=+c,+relax \
# RUN: -M no-aliases %s | FileCheck -check-prefixes=CHECK-ASM,CHECK-INST %s
# RUN: llvm-mc -triple riscv32 -filetype=obj -mattr=+c,+relax %s \
# RUN: | llvm-objdump --triple=riscv32 --mattr=+c -dr --no-print-imm-hex -M no-aliases - \
# RUN: | FileCheck -check-prefixes=CHECK-OBJDUMP,CHECK-INST %s
# RUN: llvm-mc -triple riscv64 -show-encoding \
# RUN: -M no-aliases -mattr=+c,+relax %s \
# RUN: | FileCheck -check-prefixes=CHECK-ASM %s
# RUN: llvm-mc -triple riscv64 -filetype=obj -mattr=+c,+relax %s \
# RUN: | llvm-objdump --triple=riscv64 --mattr=+c -dr --no-print-imm-hex -M no-aliases - \
# RUN: | FileCheck -check-prefixes=CHECK-OBJDUMP,CHECK-INST %s
## `.option exact` disables a variety of assembler behaviour:
## - automatic compression
## - branch relaxation (of short branches to longer equivalent sequences)
## - linker relaxation (emitting R_RISCV_RELAX)
## `.option noexact` enables these behaviours again. It is also the default.
# CHECK-OBJDUMP: 4108
# CHECK-INST: c.lw a0, 0(a0)
# CHECK-ASM: # encoding: [0x08,0x41]
lw a0, 0(a0)
# CHECK-OBJDUMP: 4108
# CHECK-INST: c.lw a0, 0(a0)
# CHECK-ASM: # encoding: [0x08,0x41]
c.lw a0, 0(a0)
# CHECK-ASM: call undefined
# CHECK-ASM-SAME: # encoding: [0x97'A',A,A,A,0xe7'A',0x80'A',A,A]
# CHECK-OBJDUMP: auipc ra, 0
# CHECK-OBJDUMP-NEXT: R_RISCV_CALL_PLT undefined
# CHECK-OBJDUMP-NEXT: R_RISCV_RELAX *ABS*
# CHECK-OBJDUMP-NEXT: jalr ra
call undefined@plt
# CHECK-ASM: beq a0, a1, undefined
# CHECK-ASM-SAME: # encoding: [0x63'A',A,0xb5'A',A]
# CHECK-OBJDUMP: bne a0, a1, 0x14
# CHECK-OBJDUMP-NEXT: jal zero, 0x10
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
beq a0, a1, undefined
# CHECK-ASM: c.j undefined
# CHECK-ASM-SAME: # encoding: [0bAAAAAA01,0b101AAAAA]
# CHECK-OBJDUMP: jal zero, 0x14
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
c.j undefined
# CHECK-ASM: .option exact
.option exact
# CHECK-OBJDUMP: 00052503
# CHECK-INST: lw a0, 0(a0)
# CHECK-ASM: # encoding: [0x03,0x25,0x05,0x00]
lw a0, 0(a0)
# CHECK-OBJDUMP: 4108
# CHECK-INST: c.lw a0, 0(a0)
# CHECK-ASM: # encoding: [0x08,0x41]
c.lw a0, 0(a0)
# CHECK-ASM: call undefined
# CHECK-ASM-SAME: # encoding: [0x97'A',A,A,A,0xe7'A',0x80'A',A,A]
# CHECK-OBJDUMP: auipc ra, 0
# CHECK-OBJDUMP-NEXT: R_RISCV_CALL_PLT undefined
# CHECK-OBJDUMP-NOT: R_RISCV_RELAX
# CHECK-OBJDUMP-NEXT: jalr ra, 0(ra)
call undefined@plt
# CHECK-ASM: beq a0, a1, undefined
# CHECK-ASM-SAME: # encoding: [0x63'A',A,0xb5'A',A]
# CHECK-OBJDUMP: beq a0, a1, 0x26
# CHECK-OBJDUMP-NEXT: R_RISCV_BRANCH undefined
beq a0, a1, undefined
# CHECK-ASM: c.j undefined
# CHECK-ASM-SAME: # encoding: [0bAAAAAA01,0b101AAAAA]
# CHECK-OBJDUMP: c.j 0x2a
# CHECK-OBJDUMP-NEXT: R_RISCV_RVC_JUMP undefined
c.j undefined
# CHECK-ASM: .option noexact
.option noexact
# CHECK-OBJDUMP: 4108
# CHECK-INST: c.lw a0, 0(a0)
# CHECK-ASM: # encoding: [0x08,0x41]
lw a0, 0(a0)
# CHECK-OBJDUMP: 4108
# CHECK-INST: c.lw a0, 0(a0)
# CHECK-ASM: # encoding: [0x08,0x41]
c.lw a0, 0(a0)
# CHECK-ASM: call undefined
# CHECK-ASM-SAME: # encoding: [0x97'A',A,A,A,0xe7'A',0x80'A',A,A]
# CHECK-OBJDUMP: auipc ra, 0
# CHECK-OBJDUMP-NEXT: R_RISCV_CALL_PLT undefined
# CHECK-OBJDUMP-NEXT: R_RISCV_RELAX *ABS*
# CHECK-OBJDUMP-NEXT: jalr ra, 0(ra)
call undefined@plt
# CHECK-ASM: beq a0, a1, undefined
# CHECK-ASM-SAME: # encoding: [0x63'A',A,0xb5'A',A]
# CHECK-OBJDUMP: bne a0, a1, 0x40
# CHECK-OBJDUMP-NEXT: jal zero, 0x3c
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
beq a0, a1, undefined
# CHECK-ASM: c.j undefined
# CHECK-ASM-SAME: # encoding: [0bAAAAAA01,0b101AAAAA]
# CHECK-OBJDUMP: jal zero, 0x40
# CHECK-OBJDUMP-NEXT: R_RISCV_JAL undefined
c.j undefined