1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-31 16:02:52 +01:00
llvm-mirror/test/MC/AsmParser/exprs.s

79 lines
1.5 KiB
ArmAsm
Raw Normal View History

// RUN: llvm-mc -triple i386-unknown-unknown %s > %t
.macro check_expr
.if ($0) != ($1)
.abort Unexpected $0 != $1.
.endif
.endmacro
2011-08-20 18:10:09 +02:00
.text
g:
h:
j:
2011-08-20 18:10:09 +02:00
k:
.data
check_expr !1 + 2, 2
check_expr !0, 1
2010-10-25 22:18:49 +02:00
check_expr ~0, -1
check_expr -1, ~0
check_expr +1, 1
check_expr 1 + 2, 3
check_expr 1 & 3, 1
check_expr 4 / 2, 2
check_expr 4 / -2, -2
check_expr 1 == 1, 1
check_expr 1 == 0, 0
check_expr 1 > 0, 1
check_expr 1 >= 1, 1
check_expr 1 < 2, 1
check_expr 1 <= 1, 1
check_expr 4 % 3, 1
check_expr 2 * 2, 4
check_expr 2 != 2, 0
check_expr 2 <> 2, 0
check_expr 1 | 2, 3
check_expr 1 << 1, 2
check_expr 2 >> 1, 1
2010-10-25 22:18:49 +02:00
check_expr (~0 >> 1), -1
check_expr 3 - 2, 1
check_expr 1 ^ 3, 2
check_expr 1 && 2, 1
check_expr 3 && 0, 0
check_expr 0 && 1, 0
check_expr 1 || 2, 1
check_expr 0 || 1, 1
check_expr 0 || 0, 0
check_expr 1 + 2 < 3 + 4, 1
check_expr 1 << 8 - 1, 128
2011-08-20 18:10:09 +02:00
.set c, 10
check_expr c + 1, 11
d = e + 10
.long d
f = g - h + 5
.long f
i = (j + 10) - (k + 2)
.long i
2011-08-20 18:10:09 +02:00
l = m - n + 4
2011-08-20 18:10:09 +02:00
.text
m:
n:
nop
2011-08-20 18:10:09 +02:00
movw $8, (42)+66(%eax)
// "." support:
_f0:
L0:
jmp L1
.long . - L0
L1:
jmp A
.long . - L1