1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/MC/X86/pr32530.s
Eric Astor 321b5c87a4 [X86][AsmParser] re-introduce 'offset' operator
Summary:
Amend MS offset operator implementation, to more closely fit with its MS counterpart:

    1. InlineAsm: evaluate non-local source entities to their (address) location
    2. Provide a mean with which one may acquire the address of an assembly label via MS syntax, rather than yielding a memory reference (i.e. "offset asm_label" and "$asm_label" should be synonymous
    3. address PR32530

Based on http://llvm.org/D37461

Fix broken test where the break appears unrelated.

- Set up appropriate memory-input rewrites for variable references.

- Intel-dialect assembly printing now correctly handles addresses by adding "offset".

- Pass offsets as immediate operands (using "r" constraint for offsets of locals).

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D71436
2019-12-30 14:35:26 -05:00

14 lines
376 B
ArmAsm

// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s | FileCheck %s
.text
// CHECK: movq $msg, %rsi
// CHECK: movq $msg+314159, %rax
// CHECK: movq $msg-89793, msg-6535(%rax,%rbx,2)
mov rsi, offset msg
mov rax, offset "msg" + 314159
mov qword ptr [rax + 2*rbx + offset msg - 6535], offset msg - 89793
.data
msg:
.ascii "Hello, world!\n"