98e3096e18f4b70b99606964c32f16aff913ed28
[oota-llvm.git] / test / MC / Sparc / sparcv9-instructions.s
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
3
4         ! V8:      error: invalid instruction mnemonic
5         ! V8-NEXT: addc %g2, %g1, %g3
6         ! V9:      addx %g2, %g1, %g3              ! encoding: [0x86,0x40,0x80,0x01]
7         addc %g2, %g1, %g3
8
9         ! V8:      error: invalid instruction mnemonic
10         ! V8-NEXT: addccc %g1, %g2, %g3
11         ! V9:      addxcc %g1, %g2, %g3            ! encoding: [0x86,0xc0,0x40,0x02]
12         addccc %g1, %g2, %g3
13
14         ! V8:      error: invalid instruction mnemonic
15         ! V8-NEXT: subc %g2, %g1, %g3
16         ! V9:      subx %g2, %g1, %g3          ! encoding: [0x86,0x60,0x80,0x01]
17         subc %g2, %g1, %g3
18
19         ! V8:      error: invalid instruction mnemonic
20         ! V8-NEXT: subccc %g1, %g2, %g3
21         ! V9:      subxcc %g1, %g2, %g3         ! encoding: [0x86,0xe0,0x40,0x02]
22         subccc %g1, %g2, %g3
23
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]
27         popc %g1, %g2
28
29
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]
33         signx %g1, %g2
34         ! V8:      error: instruction requires a CPU feature not currently enabled
35         ! V8-NEXT: signx %g1
36         ! V9: sra %g1, %g0, %g1               ! encoding: [0x83,0x38,0x40,0x00]
37         signx %g1
38
39         ! V8:      error: invalid instruction mnemonic
40         ! V8-NEXT: lduw [%i0 + %l6], %o2
41         ! V9: ld [%i0+%l6], %o2    ! encoding: [0xd4,0x06,0x00,0x16]
42         lduw [%i0 + %l6], %o2
43         ! V8:      error: invalid instruction mnemonic
44         ! V8-NEXT: lduw [%i0 + 32], %o2
45         ! V9: ld [%i0+32], %o2     ! encoding: [0xd4,0x06,0x20,0x20]
46         lduw [%i0 + 32], %o2
47         ! V8:      error: invalid instruction mnemonic
48         ! V8-NEXT: lduw [%g1], %o2
49         ! V9: ld [%g1], %o2        ! encoding: [0xd4,0x00,0x40,0x00]
50         lduw [%g1], %o2
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
55
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]
59         lda [%l0] 0xf0, %f29
60
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]
64         ldda [%l0] 0xf0, %f48
65
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]
72         ldqa [%l0] 0xf0, %f48
73         ldq [%l0], %f48
74
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]
78         sta %f29, [%l0] 0xf0
79
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]
83         stda %f48, [%l0] 0xf0
84
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]
91         stqa %f48, [%l0] 0xf0
92         stq %f48, [%l0]
93
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]
97         ldx [%g2 + 20],%fsr
98
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]
102         ldx [%g2 + %i5],%fsr
103
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]
107         stx %fsr,[%g2 + 20]
108
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]
112         stx %fsr,[%g2 + %i5]