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
9 # CHECK: error: invalid operand for instruction
10 # CHECK-NEXT: add 32, 32, 32
13 # CHECK: error: invalid register name
14 # CHECK-NEXT: add %r32, %r32, %r32
17 # TLS register operands
19 # CHECK: error: invalid operand for instruction
20 # CHECK-NEXT: add 3, symbol@tls, 4
23 # CHECK: error: invalid operand for instruction
24 # CHECK-NEXT: subf 3, 4, symbol@tls
27 # Signed 16-bit immediate operands
29 # CHECK: error: invalid operand for instruction
30 # CHECK-NEXT: addi 1, 0, -32769
33 # CHECK: error: invalid operand for instruction
34 # CHECK-NEXT: addi 1, 0, 32768
37 # Unsigned 16-bit immediate operands
39 # CHECK: error: invalid operand for instruction
40 # CHECK-NEXT: ori 1, 2, -1
43 # CHECK: error: invalid operand for instruction
44 # CHECK-NEXT: ori 1, 2, 65536
47 # Signed 16-bit immediate operands (extended range for addis)
49 # CHECK: error: invalid operand for instruction
52 # CHECK: error: invalid operand for instruction
55 # D-Form memory operands
57 # CHECK: error: invalid register number
58 # CHECK-NEXT: lwz 1, 0(32)
61 # CHECK: error: invalid register name
62 # CHECK-NEXT: lwz 1, 0(%r32)
65 # CHECK: error: invalid operand for instruction
66 # CHECK-NEXT: lwz 1, -32769(2)
69 # CHECK: error: invalid operand for instruction
70 # CHECK-NEXT: lwz 1, 32768(2)
73 # CHECK: error: invalid register number
74 # CHECK-NEXT: ld 1, 0(32)
77 # CHECK: error: invalid register name
78 # CHECK-NEXT: ld 1, 0(%r32)
81 # CHECK: error: invalid operand for instruction
82 # CHECK-NEXT: ld 1, 1(2)
85 # CHECK: error: invalid operand for instruction
86 # CHECK-NEXT: ld 1, 2(2)
89 # CHECK: error: invalid operand for instruction
90 # CHECK-NEXT: ld 1, 3(2)
93 # CHECK: error: invalid operand for instruction
94 # CHECK-NEXT: ld 1, -32772(2)
97 # CHECK: error: invalid operand for instruction
98 # CHECK-NEXT: ld 1, 32768(2)
101 # CHECK: error: invalid modifier 'got' (no symbols present)
103 # CHECK-NEXT: addi 4, 3, 123@got