mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
33b7bebca4
enabled for all targets. Non-X86 targets should not have this behavior enabled by default. Joerg, if you would like to resubmit with the behavior conditionalized to be X86-ELF only, that's fine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126336 91177308-0d34-0410-b5e6-96231b3b80d8
78 lines
1.5 KiB
ArmAsm
78 lines
1.5 KiB
ArmAsm
// RUN: llvm-mc -triple i386-unknown-unknown %s > %t
|
|
|
|
.macro check_expr
|
|
.if ($0) != ($1)
|
|
.abort Unexpected $0 != $1.
|
|
.endif
|
|
.endmacro
|
|
|
|
.text
|
|
g:
|
|
h:
|
|
j:
|
|
k:
|
|
.data
|
|
check_expr !1 + 2, 2
|
|
check_expr !0, 1
|
|
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
|
|
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
|
|
|
|
.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
|
|
|
|
l = m - n + 4
|
|
|
|
.text
|
|
m:
|
|
n:
|
|
nop
|
|
|
|
|
|
movw $8, (42)+66(%eax)
|
|
|
|
// "." support:
|
|
_f0:
|
|
L0:
|
|
jmp L1
|
|
.long . - L0
|
|
L1:
|
|
jmp A
|
|
.long . - L1
|