1 ! RUN: not llvm-mc %s -arch=sparc -show-encoding 2>&1 | FileCheck %s --check-prefix=V8
2 ! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s --check-prefix=V9
4 ! V8: error: invalid instruction mnemonic
5 ! V8-NEXT: addc %g2, %g1, %g3
6 ! V9: addx %g2, %g1, %g3 ! encoding: [0x86,0x40,0x80,0x01]
9 ! V8: error: invalid instruction mnemonic
10 ! V8-NEXT: addccc %g1, %g2, %g3
11 ! V9: addxcc %g1, %g2, %g3 ! encoding: [0x86,0xc0,0x40,0x02]
14 ! V8: error: invalid instruction mnemonic
15 ! V8-NEXT: subc %g2, %g1, %g3
16 ! V9: subx %g2, %g1, %g3 ! encoding: [0x86,0x60,0x80,0x01]
19 ! V8: error: invalid instruction mnemonic
20 ! V8-NEXT: subccc %g1, %g2, %g3
21 ! V9: subxcc %g1, %g2, %g3 ! encoding: [0x86,0xe0,0x40,0x02]
24 ! V8: error: instruction requires a CPU feature not currently enabled
25 ! V8-NEXT: popc %g1, %g2
26 ! V9: popc %g1, %g2 ! encoding: [0x85,0x70,0x00,0x01]
30 ! V8: error: instruction requires a CPU feature not currently enabled
31 ! V8-NEXT: signx %g1, %g2
32 ! V9: sra %g1, %g0, %g2 ! encoding: [0x85,0x38,0x40,0x00]
34 ! V8: error: instruction requires a CPU feature not currently enabled
36 ! V9: sra %g1, %g0, %g1 ! encoding: [0x83,0x38,0x40,0x00]
39 ! V8: error: invalid instruction mnemonic
40 ! V8-NEXT: lduw [%i0 + %l6], %o2
41 ! V9: ld [%i0+%l6], %o2 ! encoding: [0xd4,0x06,0x00,0x16]
43 ! V8: error: invalid instruction mnemonic
44 ! V8-NEXT: lduw [%i0 + 32], %o2
45 ! V9: ld [%i0+32], %o2 ! encoding: [0xd4,0x06,0x20,0x20]
47 ! V8: error: invalid instruction mnemonic
48 ! V8-NEXT: lduw [%g1], %o2
49 ! V9: ld [%g1], %o2 ! encoding: [0xd4,0x00,0x40,0x00]
51 ! V8: error: invalid instruction mnemonic
52 ! V8-NEXT: lduwa [%i0 + %l6] 131, %o2
53 ! V9: lda [%i0+%l6] 131, %o2 ! encoding: [0xd4,0x86,0x10,0x76]
54 lduwa [%i0 + %l6] 131, %o2
56 ! V8: error: instruction requires a CPU feature not currently enabled
57 ! V8-NEXT: lda [%l0] 0xf0, %f29
58 ! V9: lda [%l0] 240, %f29 ! encoding: [0xfb,0x84,0x1e,0x00]
61 ! V8: error: instruction requires a CPU feature not currently enabled
62 ! V8-NEXT: ldda [%l0] 0xf0, %f48
63 ! V9: ldda [%l0] 240, %f48 ! encoding: [0xe3,0x9c,0x1e,0x00]
66 ! V8: error: instruction requires a CPU feature not currently enabled
67 ! V8-NEXT: ldqa [%l0] 0xf0, %f48
68 ! V8: error: instruction requires a CPU feature not currently enabled
69 ! V8-NEXT: ldq [%l0], %f48
70 ! V9: ldqa [%l0] 240, %f48 ! encoding: [0xe3,0x94,0x1e,0x00]
71 ! V9: ldq [%l0], %f48 ! encoding: [0xe3,0x14,0x00,0x00]
75 ! V8: error: instruction requires a CPU feature not currently enabled
76 ! V8-NEXT: sta %f29, [%l0] 0xf0
77 ! V9: sta %f29, [%l0] 240 ! encoding: [0xfb,0xa4,0x1e,0x00]
80 ! V8: error: instruction requires a CPU feature not currently enabled
81 ! V8-NEXT: stda %f48, [%l0] 0xf0
82 ! V9: stda %f48, [%l0] 240 ! encoding: [0xe3,0xbc,0x1e,0x00]
85 ! V8: error: instruction requires a CPU feature not currently enabled
86 ! V8-NEXT: stqa %f48, [%l0] 0xf0
87 ! V8: error: instruction requires a CPU feature not currently enabled
88 ! V8-NEXT: stq %f48, [%l0]
89 ! V9: stqa %f48, [%l0] 240 ! encoding: [0xe3,0xb4,0x1e,0x00]
90 ! V9: stq %f48, [%l0] ! encoding: [0xe3,0x34,0x00,0x00]
94 ! V8: error: instruction requires a CPU feature not currently enabled
95 ! V8-NEXT: ldx [%g2 + 20],%fsr
96 ! V9: ldx [%g2+20], %fsr ! encoding: [0xc3,0x08,0xa0,0x14]
99 ! V8: error: instruction requires a CPU feature not currently enabled
100 ! V8-NEXT: ldx [%g2 + %i5],%fsr
101 ! V9: ldx [%g2+%i5], %fsr ! encoding: [0xc3,0x08,0x80,0x1d]
104 ! V8: error: instruction requires a CPU feature not currently enabled
105 ! V8-NEXT: stx %fsr,[%g2 + 20]
106 ! V9: stx %fsr, [%g2+20] ! encoding: [0xc3,0x28,0xa0,0x14]
109 ! V8: error: instruction requires a CPU feature not currently enabled
110 ! V8-NEXT: stx %fsr,[%g2 + %i5]
111 ! V9: stx %fsr, [%g2+%i5] ! encoding: [0xc3,0x28,0x80,0x1d]