diff options
Diffstat (limited to 'llvm/test/MC/X86')
-rw-r--r-- | llvm/test/MC/X86/intel-syntax-encoding.s | 5 | ||||
-rw-r--r-- | llvm/test/MC/X86/intel-syntax-error.s | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/intel-syntax-encoding.s b/llvm/test/MC/X86/intel-syntax-encoding.s index 9806ac3802e..9907cfe6f75 100644 --- a/llvm/test/MC/X86/intel-syntax-encoding.s +++ b/llvm/test/MC/X86/intel-syntax-encoding.s @@ -76,3 +76,8 @@ LBB0_3: // CHECK: encoding: [0xca,0x08,0x00] retf 8 + .set FOO, 2 + cmp eax, FOO +// CHECK: encoding: [0x83,0xf8,0x02] + cmp eax, FOO[eax] +// CHECK: encoding: [0x67,0x3b,0x40,0x02] diff --git a/llvm/test/MC/X86/intel-syntax-error.s b/llvm/test/MC/X86/intel-syntax-error.s index 7207c952aba..41b068eb3a1 100644 --- a/llvm/test/MC/X86/intel-syntax-error.s +++ b/llvm/test/MC/X86/intel-syntax-error.s @@ -11,3 +11,16 @@ _test2: .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] |