mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 14:35:54 +00:00
8168491a41
Recommitting after fixing overaggressive fastpath return in parsing. Fix intel syntax special case identifier operands that refer to a constant (e.g. .set <ID> n) to be interpreted as immediate not memory in parsing. Associated commit to fix clang test commited shortly. Reviewers: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22585 llvm-svn: 277489
27 lines
997 B
ArmAsm
27 lines
997 B
ArmAsm
// RUN: not llvm-mc -triple i686-unknown-unknown -x86-asm-syntax=att %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
// This tests weird forms of Intel and AT&T syntax that gas accepts that we
|
|
// don't. The [no]prefix operand of the syntax directive indicates whether
|
|
// registers need a '%' prefix.
|
|
|
|
.intel_syntax prefix
|
|
// CHECK: error: '.intel_syntax prefix' is not supported: registers must not have a '%' prefix in .intel_syntax
|
|
_test2:
|
|
mov DWORD PTR [%esp - 4], 257
|
|
.att_syntax noprefix
|
|
// CHECK: error: '.att_syntax noprefix' is not supported: registers must have a '%' prefix in .att_syntax
|
|
movl $257, -4(esp)
|
|
|
|
|
|
.intel_syntax noprefix
|
|
|
|
.global arr
|
|
.global i
|
|
.set FOO, 2
|
|
//CHECK-STDERR: error: cannot use base register with variable reference
|
|
mov eax, DWORD PTR arr[ebp + 1 + (2 * 5) - 3 + 1<<1]
|
|
//CHECK-STDERR: error: cannot use index register with variable reference
|
|
mov eax, DWORD PTR arr[esi*4]
|
|
//CHECK-STDERR: error: cannot use more than one symbol in memory operand
|
|
mov eax, DWORD PTR arr[i]
|