• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2# RUN: not llvm-mc -triple powerpc64-unknown-unknown < %s 2> %t
3# RUN: FileCheck < %t %s
4# RUN: not llvm-mc -triple powerpc64le-unknown-unknown < %s 2> %t
5# RUN: FileCheck < %t %s
6
7# Register operands
8
9# CHECK: error: invalid operand for instruction
10# CHECK-NEXT: add 32, 32, 32
11              add 32, 32, 32
12
13# CHECK: error: invalid register name
14# CHECK-NEXT: add %r32, %r32, %r32
15              add %r32, %r32, %r32
16
17# TLS register operands
18
19# CHECK: error: invalid operand for instruction
20# CHECK-NEXT: add 3, symbol@tls, 4
21              add 3, symbol@tls, 4
22
23# CHECK: error: invalid operand for instruction
24# CHECK-NEXT: subf 3, 4, symbol@tls
25              subf 3, 4, symbol@tls
26
27# Signed 16-bit immediate operands
28
29# CHECK: error: invalid operand for instruction
30# CHECK-NEXT: addi 1, 0, -32769
31              addi 1, 0, -32769
32
33# CHECK: error: invalid operand for instruction
34# CHECK-NEXT: addi 1, 0, 32768
35              addi 1, 0, 32768
36
37# Unsigned 16-bit immediate operands
38
39# CHECK: error: invalid operand for instruction
40# CHECK-NEXT: ori 1, 2, -1
41              ori 1, 2, -1
42
43# CHECK: error: invalid operand for instruction
44# CHECK-NEXT: ori 1, 2, 65536
45              ori 1, 2, 65536
46
47# Signed 16-bit immediate operands (extended range for addis)
48
49# CHECK: error: invalid operand for instruction
50         addis 1, 0, -65537
51
52# CHECK: error: invalid operand for instruction
53         addis 1, 0, 65536
54
55# D-Form memory operands
56
57# CHECK: error: invalid register number
58# CHECK-NEXT: lwz 1, 0(32)
59              lwz 1, 0(32)
60
61# CHECK: error: invalid register name
62# CHECK-NEXT: lwz 1, 0(%r32)
63              lwz 1, 0(%r32)
64
65# CHECK: error: invalid operand for instruction
66# CHECK-NEXT: lwz 1, -32769(2)
67              lwz 1, -32769(2)
68
69# CHECK: error: invalid operand for instruction
70# CHECK-NEXT: lwz 1, 32768(2)
71              lwz 1, 32768(2)
72
73# CHECK: error: invalid register number
74# CHECK-NEXT: ld 1, 0(32)
75              ld 1, 0(32)
76
77# CHECK: error: invalid register name
78# CHECK-NEXT: ld 1, 0(%r32)
79              ld 1, 0(%r32)
80
81# CHECK: error: invalid operand for instruction
82# CHECK-NEXT: ld 1, 1(2)
83              ld 1, 1(2)
84
85# CHECK: error: invalid operand for instruction
86# CHECK-NEXT: ld 1, 2(2)
87              ld 1, 2(2)
88
89# CHECK: error: invalid operand for instruction
90# CHECK-NEXT: ld 1, 3(2)
91              ld 1, 3(2)
92
93# CHECK: error: invalid operand for instruction
94# CHECK-NEXT: ld 1, -32772(2)
95              ld 1, -32772(2)
96
97# CHECK: error: invalid operand for instruction
98# CHECK-NEXT: ld 1, 32768(2)
99              ld 1, 32768(2)
100
101# CHECK: error: invalid modifier 'got' (no symbols present)
102         addi 4, 3, 123@got
103# CHECK-NEXT: addi 4, 3, 123@got
104