2009-07-17 22:38:58 +00:00
|
|
|
// FIXME: For now this test just checks that llvm-mc -triple i386-unknown-unknown works. Once we have .macro,
|
2009-06-29 22:00:57 +00:00
|
|
|
// .if, and .abort we can write a better test (without resorting to miles of
|
|
|
|
// greps).
|
2009-06-29 20:37:27 +00:00
|
|
|
|
2009-07-17 22:38:58 +00:00
|
|
|
// RUN: llvm-mc -triple i386-unknown-unknown %s > %t
|
2009-06-30 02:10:03 +00:00
|
|
|
|
|
|
|
.text
|
|
|
|
g:
|
|
|
|
h:
|
|
|
|
j:
|
|
|
|
k:
|
|
|
|
.data
|
2009-06-29 20:37:27 +00:00
|
|
|
.byte !1 + 2
|
|
|
|
.byte !0
|
|
|
|
.byte ~0
|
|
|
|
.byte -1
|
|
|
|
.byte +1
|
|
|
|
.byte 1 + 2
|
|
|
|
.byte 1 & 3
|
|
|
|
.byte 4 / 2
|
|
|
|
.byte 4 / -2
|
|
|
|
.byte 1 == 1
|
|
|
|
.byte 1 == 0
|
|
|
|
.byte 1 > 0
|
|
|
|
.byte 1 >= 1
|
|
|
|
.byte 1 < 2
|
|
|
|
.byte 1 <= 1
|
|
|
|
.byte 4 % 3
|
|
|
|
.byte 2 * 2
|
|
|
|
.byte 2 != 2
|
|
|
|
.byte 2 <> 2
|
|
|
|
.byte 1 | 2
|
|
|
|
.byte 1 << 1
|
|
|
|
.byte 2 >> 1
|
|
|
|
.byte ~0 >> 1
|
|
|
|
.byte 3 - 2
|
|
|
|
.byte 1 ^ 3
|
|
|
|
.byte 1 && 2
|
|
|
|
.byte 3 && 0
|
|
|
|
.byte 1 || 2
|
|
|
|
.byte 0 || 0
|
|
|
|
|
|
|
|
.set c, 10
|
|
|
|
.byte c + 1
|
2009-06-30 02:10:03 +00:00
|
|
|
|
|
|
|
d = e + 10
|
|
|
|
.long d
|
|
|
|
|
|
|
|
f = g - h + 5
|
|
|
|
.long f
|
|
|
|
|
|
|
|
i = (j + 10) - (k + 2)
|
|
|
|
.long i
|
|
|
|
|
2009-06-30 22:49:27 +00:00
|
|
|
l = m - n + 4
|
|
|
|
|
|
|
|
.text
|
|
|
|
m:
|
|
|
|
n:
|
|
|
|
nop
|
|
|
|
|
2009-07-17 22:38:58 +00:00
|
|
|
|
2010-01-24 01:07:33 +00:00
|
|
|
movw $8, (42)+66(%eax)
|
2010-04-14 04:40:28 +00:00
|
|
|
|
|
|
|
// "." support:
|
|
|
|
_f0:
|
|
|
|
L0:
|
|
|
|
jmp L1
|
|
|
|
.long . - L0
|
|
|
|
L1:
|
|
|
|
jmp A
|
|
|
|
.long . - L1
|