Heuristic: If the number of operands in the alias are more than the number of
[llvm/stm8.git] / test / MC / AsmParser / exprs.s
blob153701d6852ac1abfa095226daf1a86249a8b673
1 // RUN: llvm-mc -triple i386-unknown-unknown %s > %t
3 .macro check_expr
4 .if ($0) != ($1)
5 .abort Unexpected $0 != $1.
6 .endif
7 .endmacro
9 .text
13 k:
14 .data
15 check_expr !1 + 2, 2
16 check_expr !0, 1
17 check_expr ~0, -1
18 check_expr -1, ~0
19 check_expr +1, 1
20 check_expr 1 + 2, 3
21 check_expr 1 & 3, 1
22 check_expr 4 / 2, 2
23 check_expr 4 / -2, -2
24 check_expr 1 == 1, 1
25 check_expr 1 == 0, 0
26 check_expr 1 > 0, 1
27 check_expr 1 >= 1, 1
28 check_expr 1 < 2, 1
29 check_expr 1 <= 1, 1
30 check_expr 4 % 3, 1
31 check_expr 2 * 2, 4
32 check_expr 2 != 2, 0
33 check_expr 2 <> 2, 0
34 check_expr 1 | 2, 3
35 check_expr 1 << 1, 2
36 check_expr 2 >> 1, 1
37 check_expr (~0 >> 1), -1
38 check_expr 3 - 2, 1
39 check_expr 1 ^ 3, 2
40 check_expr 1 && 2, 1
41 check_expr 3 && 0, 0
42 check_expr 0 && 1, 0
43 check_expr 1 || 2, 1
44 check_expr 0 || 1, 1
45 check_expr 0 || 0, 0
46 check_expr 1 + 2 < 3 + 4, 1
48 .set c, 10
49 check_expr c + 1, 11
51 d = e + 10
52 .long d
54 f = g - h + 5
55 .long f
57 i = (j + 10) - (k + 2)
58 .long i
60 l = m - n + 4
62 .text
65 nop
68 movw $8, (42)+66(%eax)
70 // "." support:
71 _f0:
72 L0:
73 jmp L1
74 .long . - L0
75 L1:
76 jmp A
77 .long . - L1