Files
TheRock/compiler/amd-llvm/llvm/test/MC/X86/intel-syntax-quote-reserved.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

123 lines
3.3 KiB
ArmAsm

# RUN: llvm-mc -triple x86_64 -output-asm-variant=1 %s | FileCheck %s --check-prefixes=CHECK,X64
# RUN: llvm-mc -triple i386 -defsym I386=1 -output-asm-variant=1 %s | FileCheck %s
# RUN: llvm-mc -triple x86_64-apple-darwin -output-asm-variant=1 %s | FileCheck %s --check-prefixes=CHECK,X64
# RUN: llvm-mc -triple x86_64-windows-msvc -output-asm-variant=1 %s | FileCheck %s --check-prefixes=CHECK,X64
# RUN: llvm-mc -triple x86_64-windows-gnu -output-asm-variant=1 %s | FileCheck %s --check-prefixes=CHECK,X64
# RUN: llvm-mc -triple x86_64 %s | FileCheck %s --check-prefix=ATT
# RUN: llvm-mc -triple x86_64 -output-asm-variant=1 -filetype=obj %s | llvm-objdump -dr - | FileCheck %s --check-prefix=DIS
## Round-trip: all calls should be direct (0xe8), not indirect (0xff).
# DIS-NOT: callq *
## AT&T output never needs quoting: registers use `%` prefix and none of
## these names are keywords in AT&T syntax. Sentinel positive checks plus a
## global NOT check that no `"` appears anywhere in the output.
# ATT: callq rsi
# ATT: callq byte
# ATT: callq and
# ATT-NOT: {{"}}
## Symbols whose names match registers or Intel syntax keywords must be quoted
## in Intel syntax output. Without quoting, the assembler would misparse these
## as registers, size specifiers, or expression operators.
## Register-name quoting uses the 64-bit `callq` mnemonic. The input block is
## gated by `.ifndef I386` so i386 skips it at assembly time; the output-check
## lines use the `X64` prefix so i386's FileCheck invocation ignores them too.
## (Register-quoting logic is identical across all X86 MCAsmInfo subclasses,
## so exercising it on 64-bit targets suffices.)
.ifndef I386
# X64: call "rsi"
# X64-NEXT: call "Rax"
# X64-NEXT: call "EAX"
# X64-NEXT: call "ah"
# X64-NEXT: call "dil"
callq rsi
callq Rax
callq EAX
callq ah
callq dil
.endif
## Size/type keywords (gas treats these as size constants: byte=1, word=2, etc.)
# CHECK: call "byte"
# CHECK-NEXT: call "word"
# CHECK-NEXT: call "dword"
# CHECK-NEXT: call "fword"
# CHECK-NEXT: call "qword"
# CHECK-NEXT: call "mmword"
# CHECK-NEXT: call "tbyte"
# CHECK-NEXT: call "oword"
# CHECK-NEXT: call "xmmword"
# CHECK-NEXT: call "ymmword"
# CHECK-NEXT: call "zmmword"
call byte
call word
call dword
call fword
call qword
call mmword
call tbyte
call oword
call xmmword
call ymmword
call zmmword
## Other keywords
# CHECK: call "offset"
# CHECK-NEXT: call "flat"
# CHECK-NEXT: call "near"
# CHECK-NEXT: call "far"
# CHECK-NEXT: call "short"
call offset
call flat
call near
call far
call short
## Expression operator keywords
# CHECK: call "and"
# CHECK-NEXT: call "eq"
# CHECK-NEXT: call "ge"
# CHECK-NEXT: call "gt"
# CHECK-NEXT: call "le"
# CHECK-NEXT: call "lt"
# CHECK-NEXT: call "mod"
# CHECK-NEXT: call "ne"
# CHECK-NEXT: call "not"
# CHECK-NEXT: call "or"
# CHECK-NEXT: call "shl"
# CHECK-NEXT: call "shr"
# CHECK-NEXT: call "xor"
call and
call eq
call ge
call gt
call le
call lt
call mod
call ne
call not
call or
call shl
call shr
call xor
## Symbols that don't need quoting (gas handles these correctly).
# CHECK: call ptr
# CHECK-NEXT: call bar
call ptr
call bar
## Intel-syntax input with quoted identifiers round-trips to AT&T output with
## the quotes stripped.
# ATT: callq rsi
# ATT-NEXT: callq byte
# ATT-NEXT: callq and
.intel_syntax noprefix
call "rsi"
call "byte"
call "and"
.att_syntax