mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-13 07:00:59 +00:00
75e681a367
This patch enhances X86AsmParser's immediate expression parsing abilities, to include a named synonymous for selected binary/unary bitwise operators: {and,shl,shr,or,xor,not}, ultimately achieving better MS-compatability MASM reference: https://msdn.microsoft.com/en-us/library/94b6khh4.aspx Differential Revision: D31277 llvm-svn: 299439
59 lines
1.3 KiB
ArmAsm
59 lines
1.3 KiB
ArmAsm
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=att %s | FileCheck %s
|
|
|
|
.intel_syntax
|
|
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, 1+2
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, 1|2
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, 1 or 2
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, 1 OR 2
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, 1*3
|
|
// CHECK: andl $1, %ecx
|
|
and ecx, 1&3
|
|
// CHECK: andl $1, %ecx
|
|
and ecx, 1 and 3
|
|
// CHECK: andl $1, %ecx
|
|
and ecx, 1 AND 3
|
|
// CHECK: andl $0, %ecx
|
|
and ecx, (1&2)
|
|
// CHECK: andl $0, %ecx
|
|
and ecx, (1 and 2)
|
|
// CHECK: andl $0, %ecx
|
|
and ecx, (1 AND 2)
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, ((1)|2)
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, ((1) or 2)
|
|
// CHECK: andl $3, %ecx
|
|
and ecx, ((1) OR 2)
|
|
// CHECK: andl $1, %ecx
|
|
and ecx, 1&2+3
|
|
// CHECK: andl $1, %ecx
|
|
and ecx, 1 and 2+3
|
|
// CHECK: andl $1, %ecx
|
|
and ecx, 1 AND 2+3
|
|
// CHECK: addl $4938, %eax
|
|
add eax, 9876 >> 1
|
|
// CHECK: addl $4938, %eax
|
|
add eax, 9876 shr 1
|
|
// CHECK: addl $4938, %eax
|
|
add eax, 9876 SHR 1
|
|
// CHECK: addl $19752, %eax
|
|
add eax, 9876 << 1
|
|
// CHECK: addl $19752, %eax
|
|
add eax, 9876 shl 1
|
|
// CHECK: addl $19752, %eax
|
|
add eax, 9876 SHL 1
|
|
// CHECK: addl $5, %eax
|
|
add eax, 6 ^ 3
|
|
// CHECK: addl $5, %eax
|
|
add eax, 6 xor 3
|
|
// CHECK: addl $5, %eax
|
|
add eax, 6 XOR 3
|
|
// CHECK: addl $5, %eax
|
|
add eax, 6 XOR 3 shl 1 SHR 1
|