blob: 075ff597c3de4b6d45241840cc8cb39597156a15 [file] [log] [blame]
Alexander Graf13f67dd2015-05-08 03:06:41 +02001/*
2 * Arguments to the opcode prototypes
3 *
4 * C(OPC, NAME, FMT, FAC, I1, I2, P, W, OP, CC)
5 * D(OPC, NAME, FMT, FAC, I1, I2, P, W, OP, CC, DATA)
6 *
7 * OPC = (op << 8) | op2 where op is the major, op2 the minor opcode
8 * NAME = name of the opcode, used internally
9 * FMT = format of the opcode (defined in insn-format.def)
10 * FAC = facility the opcode is available in (defined in DisasFacility)
11 * I1 = func in1_xx fills o->in1
12 * I2 = func in2_xx fills o->in2
13 * P = func prep_xx initializes o->*out*
14 * W = func wout_xx writes o->*out* somewhere
15 * OP = func op_xx does the bulk of the operation
16 * CC = func cout_xx defines how cc should get set
17 * DATA = immediate argument to op_xx function
18 *
19 * The helpers get called in order: I1, I2, P, OP, W, CC
20 */
21
Richard Hendersonad044d02012-08-15 17:16:22 -070022/* ADD */
23 C(0x1a00, AR, RR_a, Z, r1, r2, new, r1_32, add, adds32)
24 C(0xb9f8, ARK, RRF_a, DO, r2, r3, new, r1_32, add, adds32)
25 C(0x5a00, A, RX_a, Z, r1, m2_32s, new, r1_32, add, adds32)
26 C(0xe35a, AY, RXY_a, LD, r1, m2_32s, new, r1_32, add, adds32)
27 C(0xb908, AGR, RRE, Z, r1, r2, r1, 0, add, adds64)
28 C(0xb918, AGFR, RRE, Z, r1, r2_32s, r1, 0, add, adds64)
29 C(0xb9e8, AGRK, RRF_a, DO, r2, r3, r1, 0, add, adds64)
30 C(0xe308, AG, RXY_a, Z, r1, m2_64, r1, 0, add, adds64)
31 C(0xe318, AGF, RXY_a, Z, r1, m2_32s, r1, 0, add, adds64)
Richard Henderson587626f2012-08-23 10:48:20 -070032 C(0xb30a, AEBR, RRE, Z, e1, e2, new, e1, aeb, f32)
33 C(0xb31a, ADBR, RRE, Z, f1_o, f2_o, f1, 0, adb, f64)
34 C(0xb34a, AXBR, RRE, Z, 0, x2_o, x1, 0, axb, f128)
35 C(0xed0a, AEB, RXE, Z, e1, m2_32u, new, e1, aeb, f32)
36 C(0xed1a, ADB, RXE, Z, f1_o, m2_64, f1, 0, adb, f64)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +020037/* ADD HIGH */
38 C(0xb9c8, AHHHR, RRF_a, HW, r2_sr32, r3_sr32, new, r1_32h, add, adds32)
39 C(0xb9d8, AHHLR, RRF_a, HW, r2_sr32, r3, new, r1_32h, add, adds32)
Richard Hendersonad044d02012-08-15 17:16:22 -070040/* ADD IMMEDIATE */
41 C(0xc209, AFI, RIL_a, EI, r1, i2, new, r1_32, add, adds32)
42 C(0xeb6a, ASI, SIY, GIE, m1_32s, i2, new, m1_32, add, adds32)
43 C(0xecd8, AHIK, RIE_d, DO, r3, i2, new, r1_32, add, adds32)
44 C(0xc208, AGFI, RIL_a, EI, r1, i2, r1, 0, add, adds64)
45 C(0xeb7a, AGSI, SIY, GIE, m1_64, i2, new, m1_64, add, adds64)
46 C(0xecd9, AGHIK, RIE_d, DO, r3, i2, r1, 0, add, adds64)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +020047/* ADD IMMEDIATE HIGH */
48 C(0xcc08, AIH, RIL_a, HW, r1_sr32, i2, new, r1_32h, add, adds32)
Richard Hendersond82287d2012-08-16 14:09:45 -070049/* ADD HALFWORD */
50 C(0x4a00, AH, RX_a, Z, r1, m2_16s, new, r1_32, add, adds32)
51 C(0xe37a, AHY, RXY_a, LD, r1, m2_16s, new, r1_32, add, adds32)
52/* ADD HALFWORD IMMEDIATE */
53 C(0xa70a, AHI, RI_a, Z, r1, i2, new, r1_32, add, adds32)
54 C(0xa70b, AGHI, RI_a, Z, r1, i2, r1, 0, add, adds64)
55
Richard Hendersonad044d02012-08-15 17:16:22 -070056/* ADD LOGICAL */
57 C(0x1e00, ALR, RR_a, Z, r1, r2, new, r1_32, add, addu32)
58 C(0xb9fa, ALRK, RRF_a, DO, r2, r3, new, r1_32, add, addu32)
59 C(0x5e00, AL, RX_a, Z, r1, m2_32u, new, r1_32, add, addu32)
60 C(0xe35e, ALY, RXY_a, LD, r1, m2_32u, new, r1_32, add, addu32)
61 C(0xb90a, ALGR, RRE, Z, r1, r2, r1, 0, add, addu64)
62 C(0xb91a, ALGFR, RRE, Z, r1, r2_32u, r1, 0, add, addu64)
63 C(0xb9ea, ALGRK, RRF_a, DO, r2, r3, r1, 0, add, addu64)
64 C(0xe30a, ALG, RXY_a, Z, r1, m2_64, r1, 0, add, addu64)
65 C(0xe31a, ALGF, RXY_a, Z, r1, m2_32u, r1, 0, add, addu64)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +020066/* ADD LOGICAL HIGH */
67 C(0xb9ca, ALHHHR, RRF_a, HW, r2_sr32, r3_sr32, new, r1_32h, add, addu32)
68 C(0xb9da, ALHHLR, RRF_a, HW, r2_sr32, r3, new, r1_32h, add, addu32)
Richard Hendersonad044d02012-08-15 17:16:22 -070069/* ADD LOGICAL IMMEDIATE */
70 C(0xc20b, ALFI, RIL_a, EI, r1, i2_32u, new, r1_32, add, addu32)
71 C(0xc20a, ALGFI, RIL_a, EI, r1, i2_32u, r1, 0, add, addu64)
Richard Hendersone272b3a2012-08-16 14:42:49 -070072/* ADD LOGICAL WITH SIGNED IMMEDIATE */
73 C(0xeb6e, ALSI, SIY, GIE, m1_32u, i2, new, m1_32, add, addu32)
74 C(0xecda, ALHSIK, RIE_d, DO, r3, i2, new, r1_32, add, addu32)
75 C(0xeb7e, ALGSI, SIY, GIE, m1_64, i2, new, m1_64, add, addu64)
76 C(0xecdb, ALGHSIK, RIE_d, DO, r3, i2, r1, 0, add, addu64)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +020077/* ADD LOGICAL WITH SIGNED IMMEDIATE HIGH */
78 C(0xcc0a, ALSIH, RIL_a, HW, r1_sr32, i2, new, r1_32h, add, addu32)
79 C(0xcc0b, ALSIHN, RIL_a, HW, r1_sr32, i2, new, r1_32h, add, 0)
Richard Henderson4e4bb432012-08-17 18:52:33 -070080/* ADD LOGICAL WITH CARRY */
81 C(0xb998, ALCR, RRE, Z, r1, r2, new, r1_32, addc, addc32)
82 C(0xb988, ALCGR, RRE, Z, r1, r2, r1, 0, addc, addc64)
83 C(0xe398, ALC, RXY_a, Z, r1, m2_32u, new, r1_32, addc, addc32)
84 C(0xe388, ALCG, RXY_a, Z, r1, m2_64, r1, 0, addc, addc64)
Richard Hendersonad044d02012-08-15 17:16:22 -070085
Richard Henderson3bbfbd12012-09-01 16:28:39 -070086/* AND */
87 C(0x1400, NR, RR_a, Z, r1, r2, new, r1_32, and, nz32)
88 C(0xb9f4, NRK, RRF_a, DO, r2, r3, new, r1_32, and, nz32)
89 C(0x5400, N, RX_a, Z, r1, m2_32s, new, r1_32, and, nz32)
90 C(0xe354, NY, RXY_a, LD, r1, m2_32s, new, r1_32, and, nz32)
91 C(0xb980, NGR, RRE, Z, r1, r2, r1, 0, and, nz64)
92 C(0xb9e4, NGRK, RRF_a, DO, r2, r3, r1, 0, and, nz64)
93 C(0xe380, NG, RXY_a, Z, r1, m2_64, r1, 0, and, nz64)
Richard Henderson0a949032012-08-22 11:54:19 -070094 C(0xd400, NC, SS_a, Z, la1, a2, 0, 0, nc, 0)
Richard Hendersonfacfc862012-08-17 15:01:36 -070095/* AND IMMEDIATE */
96 D(0xc00a, NIHF, RIL_a, EI, r1_o, i2_32u, r1, 0, andi, 0, 0x2020)
97 D(0xc00b, NILF, RIL_a, EI, r1_o, i2_32u, r1, 0, andi, 0, 0x2000)
98 D(0xa504, NIHH, RI_a, Z, r1_o, i2_16u, r1, 0, andi, 0, 0x1030)
99 D(0xa505, NIHL, RI_a, Z, r1_o, i2_16u, r1, 0, andi, 0, 0x1020)
100 D(0xa506, NILH, RI_a, Z, r1_o, i2_16u, r1, 0, andi, 0, 0x1010)
101 D(0xa507, NILL, RI_a, Z, r1_o, i2_16u, r1, 0, andi, 0, 0x1000)
Richard Hendersona05d2b62012-08-22 10:57:56 -0700102 C(0x9400, NI, SI, Z, m1_8u, i2_8u, new, m1_8, and, nz64)
103 C(0xeb54, NIY, SIY, LD, m1_8u, i2_8u, new, m1_8, and, nz64)
Richard Henderson3bbfbd12012-09-01 16:28:39 -0700104
Richard Henderson8ac33cd2012-08-18 11:38:19 -0700105/* BRANCH AND SAVE */
106 C(0x0d00, BASR, RR_a, Z, 0, r2_nz, r1, 0, bas, 0)
107 C(0x4d00, BAS, RX_a, Z, 0, a2, r1, 0, bas, 0)
108/* BRANCH RELATIVE AND SAVE */
109 C(0xa705, BRAS, RI_b, Z, 0, 0, r1, 0, basi, 0)
110 C(0xc005, BRASL, RIL_b, Z, 0, 0, r1, 0, basi, 0)
Richard Henderson7233f2e2012-08-20 08:28:02 -0700111/* BRANCH ON CONDITION */
112 C(0x0700, BCR, RR_b, Z, 0, r2_nz, 0, 0, bc, 0)
113 C(0x4700, BC, RX_b, Z, 0, a2, 0, 0, bc, 0)
114/* BRANCH RELATIVE ON CONDITION */
115 C(0xa704, BRC, RI_c, Z, 0, 0, 0, 0, bc, 0)
116 C(0xc004, BRCL, RIL_c, Z, 0, 0, 0, 0, bc, 0)
Richard Hendersonc61aad62012-08-20 14:22:58 -0700117/* BRANCH ON COUNT */
118 C(0x0600, BCTR, RR_a, Z, 0, r2_nz, 0, 0, bct32, 0)
119 C(0xb946, BCTGR, RRE, Z, 0, r2_nz, 0, 0, bct64, 0)
120 C(0x4600, BCT, RX_a, Z, 0, a2, 0, 0, bct32, 0)
121 C(0xe346, BCTG, RXY_a, Z, 0, a2, 0, 0, bct64, 0)
122/* BRANCH RELATIVE ON COUNT */
123 C(0xa706, BRCT, RI_b, Z, 0, 0, 0, 0, bct32, 0)
124 C(0xa707, BRCTG, RI_b, Z, 0, 0, 0, 0, bct64, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200125/* BRANCH RELATIVE ON COUNT HIGH */
126 C(0xcc06, BRCTH, RIL_b, HW, 0, 0, 0, 0, bcth, 0)
Richard Henderson2cf5e352012-08-29 12:57:55 -0700127/* BRANCH ON INDEX */
128 D(0x8600, BXH, RS_a, Z, 0, a2, 0, 0, bx32, 0, 0)
129 D(0x8700, BXLE, RS_a, Z, 0, a2, 0, 0, bx32, 0, 1)
130 D(0xeb44, BXHG, RSY_a, Z, 0, a2, 0, 0, bx64, 0, 0)
131 D(0xeb45, BXLEG, RSY_a, Z, 0, a2, 0, 0, bx64, 0, 1)
132/* BRANCH RELATIVE ON INDEX */
133 D(0x8400, BRXH, RSI, Z, 0, 0, 0, 0, bx32, 0, 0)
134 D(0x8500, BRXLE, RSI, Z, 0, 0, 0, 0, bx32, 0, 1)
135 D(0xec44, BRXHG, RIE_e, Z, 0, 0, 0, 0, bx64, 0, 0)
136 D(0xec45, BRXHLE, RIE_e, Z, 0, 0, 0, 0, bx64, 0, 1)
Richard Henderson8ac33cd2012-08-18 11:38:19 -0700137
Richard Henderson374724f2012-08-24 11:38:12 -0700138/* CHECKSUM */
139 C(0xb241, CKSM, RRE, Z, r1_o, ra2, new, r1_32, cksm, 0)
140
Richard Henderson2db014b2012-09-01 14:13:52 -0700141/* COPY SIGN */
142 C(0xb372, CPSDR, RRF_b, FPSSH, f3_o, f2_o, f1, 0, cps, 0)
143
Richard Hendersona7e836d2012-08-16 15:20:51 -0700144/* COMPARE */
145 C(0x1900, CR, RR_a, Z, r1_o, r2_o, 0, 0, 0, cmps32)
146 C(0x5900, C, RX_a, Z, r1_o, m2_32s, 0, 0, 0, cmps32)
147 C(0xe359, CY, RXY_a, LD, r1_o, m2_32s, 0, 0, 0, cmps32)
148 C(0xb920, CGR, RRE, Z, r1_o, r2_o, 0, 0, 0, cmps64)
149 C(0xb930, CGFR, RRE, Z, r1_o, r2_32s, 0, 0, 0, cmps64)
150 C(0xe320, CG, RXY_a, Z, r1_o, m2_64, 0, 0, 0, cmps64)
151 C(0xe330, CGF, RXY_a, Z, r1_o, m2_32s, 0, 0, 0, cmps64)
Richard Henderson587626f2012-08-23 10:48:20 -0700152 C(0xb309, CEBR, RRE, Z, e1, e2, 0, 0, ceb, 0)
153 C(0xb319, CDBR, RRE, Z, f1_o, f2_o, 0, 0, cdb, 0)
154 C(0xb349, CXBR, RRE, Z, x1_o, x2_o, 0, 0, cxb, 0)
155 C(0xed09, CEB, RXE, Z, e1, m2_32u, 0, 0, ceb, 0)
156 C(0xed19, CDB, RXE, Z, f1_o, m2_64, 0, 0, cdb, 0)
Richard Hendersona7e836d2012-08-16 15:20:51 -0700157/* COMPARE IMMEDIATE */
158 C(0xc20d, CFI, RIL_a, EI, r1, i2, 0, 0, 0, cmps32)
159 C(0xc20c, CGFI, RIL_a, EI, r1, i2, 0, 0, 0, cmps64)
Richard Henderson403e2172012-09-05 10:54:00 -0700160/* COMPARE RELATIVE LONG */
161 C(0xc60d, CRL, RIL_b, GIE, r1, mri2_32s, 0, 0, 0, cmps32)
162 C(0xc608, CGRL, RIL_b, GIE, r1, mri2_64, 0, 0, 0, cmps64)
163 C(0xc60c, CGFRL, RIL_b, GIE, r1, mri2_32s, 0, 0, 0, cmps64)
Richard Hendersona7e836d2012-08-16 15:20:51 -0700164/* COMPARE HALFWORD */
165 C(0x4900, CH, RX_a, Z, r1_o, m2_16s, 0, 0, 0, cmps32)
166 C(0xe379, CHY, RXY_a, LD, r1_o, m2_16s, 0, 0, 0, cmps32)
167 C(0xe334, CGH, RXY_a, GIE, r1_o, m2_16s, 0, 0, 0, cmps64)
168/* COMPARE HALFWORD IMMEDIATE */
169 C(0xa70e, CHI, RI_a, Z, r1_o, i2, 0, 0, 0, cmps32)
170 C(0xa70f, CGHI, RI_a, Z, r1_o, i2, 0, 0, 0, cmps64)
171 C(0xe554, CHHSI, SIL, GIE, m1_16s, i2, 0, 0, 0, cmps64)
172 C(0xe55c, CHSI, SIL, GIE, m1_32s, i2, 0, 0, 0, cmps64)
173 C(0xe558, CGHSI, SIL, GIE, m1_64, i2, 0, 0, 0, cmps64)
174/* COMPARE HALFWORD RELATIVE LONG */
Aurelien Jarno74266b42015-06-03 23:09:43 +0200175 C(0xc605, CHRL, RIL_b, GIE, r1_o, mri2_32s, 0, 0, 0, cmps32)
176 C(0xc604, CGHRL, RIL_b, GIE, r1_o, mri2_64, 0, 0, 0, cmps64)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200177/* COMPARE HIGH */
178 C(0xb9cd, CHHR, RRE, HW, r1_sr32, r2_sr32, 0, 0, 0, cmps32)
179 C(0xb9dd, CHLR, RRE, HW, r1_sr32, r2_o, 0, 0, 0, cmps32)
180 C(0xe3cd, CHF, RXY_a, HW, r1_sr32, m2_32s, 0, 0, 0, cmps32)
181/* COMPARE IMMEDIATE HIGH */
182 C(0xcc0d, CIH, RIL_a, HW, r1_sr32, i2, 0, 0, 0, cmps32)
Richard Hendersona7e836d2012-08-16 15:20:51 -0700183
184/* COMPARE LOGICAL */
185 C(0x1500, CLR, RR_a, Z, r1, r2, 0, 0, 0, cmpu32)
186 C(0x5500, CL, RX_a, Z, r1, m2_32s, 0, 0, 0, cmpu32)
187 C(0xe355, CLY, RXY_a, LD, r1, m2_32s, 0, 0, 0, cmpu32)
188 C(0xb921, CLGR, RRE, Z, r1, r2, 0, 0, 0, cmpu64)
189 C(0xb931, CLGFR, RRE, Z, r1, r2_32u, 0, 0, 0, cmpu64)
190 C(0xe321, CLG, RXY_a, Z, r1, m2_64, 0, 0, 0, cmpu64)
191 C(0xe331, CLGF, RXY_a, Z, r1, m2_32u, 0, 0, 0, cmpu64)
Richard Henderson4f7403d2012-08-22 12:54:07 -0700192 C(0xd500, CLC, SS_a, Z, la1, a2, 0, 0, clc, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200193/* COMPARE LOGICAL HIGH */
194 C(0xb9cf, CLHHR, RRE, HW, r1_sr32, r2_sr32, 0, 0, 0, cmpu32)
195 C(0xb9df, CLHLR, RRE, HW, r1_sr32, r2_o, 0, 0, 0, cmpu32)
196 C(0xe3cf, CLHF, RXY_a, HW, r1_sr32, m2_32s, 0, 0, 0, cmpu32)
Richard Hendersona7e836d2012-08-16 15:20:51 -0700197/* COMPARE LOGICAL IMMEDIATE */
198 C(0xc20f, CLFI, RIL_a, EI, r1, i2, 0, 0, 0, cmpu32)
199 C(0xc20e, CLGFI, RIL_a, EI, r1, i2_32u, 0, 0, 0, cmpu64)
200 C(0x9500, CLI, SI, Z, m1_8u, i2_8u, 0, 0, 0, cmpu64)
201 C(0xeb55, CLIY, SIY, LD, m1_8u, i2_8u, 0, 0, 0, cmpu64)
202 C(0xe555, CLHHSI, SIL, GIE, m1_16u, i2_16u, 0, 0, 0, cmpu64)
203 C(0xe55d, CLFHSI, SIL, GIE, m1_32u, i2_16u, 0, 0, 0, cmpu64)
204 C(0xe559, CLGHSI, SIL, GIE, m1_64, i2_16u, 0, 0, 0, cmpu64)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200205/* COMPARE LOGICAL IMMEDIATE HIGH */
206 C(0xcc0f, CLIH, RIL_a, HW, r1_sr32, i2, 0, 0, 0, cmpu32)
Richard Hendersona7e836d2012-08-16 15:20:51 -0700207/* COMPARE LOGICAL RELATIVE LONG */
208 C(0xc60f, CLRL, RIL_b, GIE, r1_o, mri2_32u, 0, 0, 0, cmpu32)
209 C(0xc60a, CLGRL, RIL_b, GIE, r1_o, mri2_64, 0, 0, 0, cmpu64)
210 C(0xc60e, CLGFRL, RIL_b, GIE, r1_o, mri2_32u, 0, 0, 0, cmpu64)
211 C(0xc607, CLHRL, RIL_b, GIE, r1_o, mri2_16u, 0, 0, 0, cmpu32)
212 C(0xc606, CLGHRL, RIL_b, GIE, r1_o, mri2_16u, 0, 0, 0, cmpu64)
Richard Hendersoneb66e6a2012-08-22 11:24:25 -0700213/* COMPARE LOGICAL LONG EXTENDED */
214 C(0xa900, CLCLE, RS_a, Z, 0, a2, 0, 0, clcle, 0)
Richard Henderson32a44d52012-08-22 14:59:22 -0700215/* COMPARE LOGICAL CHARACTERS UNDER MASK */
216 C(0xbd00, CLM, RS_b, Z, r1_o, a2, 0, 0, clm, 0)
217 C(0xeb21, CLMY, RSY_b, LD, r1_o, a2, 0, 0, clm, 0)
218 C(0xeb20, CLMH, RSY_b, Z, r1_sr32, a2, 0, 0, clm, 0)
Richard Hendersonaa31bf62012-09-05 10:20:53 -0700219/* COMPARE LOGICAL STRING */
220 C(0xb25d, CLST, RRE, Z, r1_o, r2_o, 0, 0, clst, 0)
Richard Hendersona7e836d2012-08-16 15:20:51 -0700221
Richard Henderson55503592012-08-31 10:53:49 -0700222/* COMPARE AND BRANCH */
223 D(0xecf6, CRB, RRS, GIE, r1_32s, r2_32s, 0, 0, cj, 0, 0)
224 D(0xece4, CGRB, RRS, GIE, r1_o, r2_o, 0, 0, cj, 0, 0)
225 D(0xec76, CRJ, RIE_b, GIE, r1_32s, r2_32s, 0, 0, cj, 0, 0)
226 D(0xec64, CGRJ, RIE_b, GIE, r1_o, r2_o, 0, 0, cj, 0, 0)
227 D(0xecfe, CIB, RIS, GIE, r1_32s, i2, 0, 0, cj, 0, 0)
228 D(0xecfc, CGIB, RIS, GIE, r1_o, i2, 0, 0, cj, 0, 0)
229 D(0xec7e, CIJ, RIE_c, GIE, r1_32s, i2, 0, 0, cj, 0, 0)
230 D(0xec7c, CGIJ, RIE_c, GIE, r1_o, i2, 0, 0, cj, 0, 0)
231/* COMPARE LOGICAL AND BRANCH */
232 D(0xecf7, CLRB, RRS, GIE, r1_32u, r2_32u, 0, 0, cj, 0, 1)
233 D(0xece5, CLGRB, RRS, GIE, r1_o, r2_o, 0, 0, cj, 0, 1)
234 D(0xec77, CLRJ, RIE_b, GIE, r1_32u, r2_32u, 0, 0, cj, 0, 1)
235 D(0xec65, CLGRJ, RIE_b, GIE, r1_o, r2_o, 0, 0, cj, 0, 1)
236 D(0xecff, CLIB, RIS, GIE, r1_32u, i2_8u, 0, 0, cj, 0, 1)
237 D(0xecfd, CLGIB, RIS, GIE, r1_o, i2_8u, 0, 0, cj, 0, 1)
238 D(0xec7f, CLIJ, RIE_c, GIE, r1_32u, i2_8u, 0, 0, cj, 0, 1)
239 D(0xec7d, CLGIJ, RIE_c, GIE, r1_o, i2_8u, 0, 0, cj, 0, 1)
240
Richard Hendersonf3de39c2012-08-22 14:46:55 -0700241/* COMPARE AND SWAP */
Richard Hendersonb7886de2012-09-20 17:09:35 -0700242 D(0xba00, CS, RS_a, Z, r3_32u, r1_32u, new, r1_32, cs, 0, 0)
243 D(0xeb14, CSY, RSY_a, LD, r3_32u, r1_32u, new, r1_32, cs, 0, 0)
244 D(0xeb30, CSG, RSY_a, Z, r3_o, r1_o, new, r1, cs, 0, 1)
Richard Hendersonf3de39c2012-08-22 14:46:55 -0700245/* COMPARE DOUBLE AND SWAP */
Richard Hendersonb7886de2012-09-20 17:09:35 -0700246 D(0xbb00, CDS, RS_a, Z, r3_D32, r1_D32, new, r1_D32, cs, 0, 1)
247 D(0xeb31, CDSY, RSY_a, LD, r3_D32, r1_D32, new, r1_D32, cs, 0, 1)
248 C(0xeb3e, CDSG, RSY_a, Z, 0, 0, 0, 0, cdsg, 0)
Richard Hendersonf3de39c2012-08-22 14:46:55 -0700249
Richard Henderson1c268752012-09-05 17:32:54 -0700250/* COMPARE AND TRAP */
251 D(0xb972, CRT, RRF_c, GIE, r1_32s, r2_32s, 0, 0, ct, 0, 0)
252 D(0xb960, CGRT, RRF_c, GIE, r1_o, r2_o, 0, 0, ct, 0, 0)
253 D(0xec72, CIT, RIE_a, GIE, r1_32s, i2, 0, 0, ct, 0, 0)
254 D(0xec70, CGIT, RIE_a, GIE, r1_o, i2, 0, 0, ct, 0, 0)
255/* COMPARE LOGICAL AND TRAP */
256 D(0xb973, CLRT, RRF_c, GIE, r1_32u, r2_32u, 0, 0, ct, 0, 1)
257 D(0xb961, CLGRT, RRF_c, GIE, r1_o, r2_o, 0, 0, ct, 0, 1)
Aurelien Jarno375ee582015-06-03 23:09:50 +0200258 D(0xeb23, CLT, RSY_b, MIE, r1_32u, m2_32u, 0, 0, ct, 0, 1)
259 D(0xeb2b, CLGT, RSY_b, MIE, r1_o, m2_64, 0, 0, ct, 0, 1)
Richard Henderson1c268752012-09-05 17:32:54 -0700260 D(0xec73, CLFIT, RIE_a, GIE, r1_32u, i2_32u, 0, 0, ct, 0, 1)
Aurelien Jarno1dedb9b2015-06-03 23:09:42 +0200261 D(0xec71, CLGIT, RIE_a, GIE, r1_o, i2_32u, 0, 0, ct, 0, 1)
Richard Henderson1c268752012-09-05 17:32:54 -0700262
Richard Hendersonc49daa52012-08-21 14:05:11 -0700263/* CONVERT TO DECIMAL */
264 C(0x4e00, CVD, RX_a, Z, r1_o, a2, 0, 0, cvd, 0)
265 C(0xe326, CVDY, RXY_a, LD, r1_o, a2, 0, 0, cvd, 0)
Richard Henderson68c8bd92012-08-23 15:17:35 -0700266/* CONVERT TO FIXED */
267 C(0xb398, CFEBR, RRF_e, Z, 0, e2, new, r1_32, cfeb, 0)
268 C(0xb399, CFDBR, RRF_e, Z, 0, f2_o, new, r1_32, cfdb, 0)
269 C(0xb39a, CFXBR, RRF_e, Z, 0, x2_o, new, r1_32, cfxb, 0)
270 C(0xb3a8, CGEBR, RRF_e, Z, 0, e2, r1, 0, cgeb, 0)
271 C(0xb3a9, CGDBR, RRF_e, Z, 0, f2_o, r1, 0, cgdb, 0)
272 C(0xb3aa, CGXBR, RRF_e, Z, 0, x2_o, r1, 0, cgxb, 0)
Richard Henderson683bb9a2012-08-23 21:08:22 -0700273/* CONVERT FROM FIXED */
274 C(0xb394, CEFBR, RRF_e, Z, 0, r2_32s, new, e1, cegb, 0)
275 C(0xb395, CDFBR, RRF_e, Z, 0, r2_32s, f1, 0, cdgb, 0)
276 C(0xb396, CXFBR, RRF_e, Z, 0, r2_32s, x1, 0, cxgb, 0)
277 C(0xb3a4, CEGBR, RRF_e, Z, 0, r2_o, new, e1, cegb, 0)
278 C(0xb3a5, CDGBR, RRF_e, Z, 0, r2_o, f1, 0, cdgb, 0)
279 C(0xb3a6, CXGBR, RRF_e, Z, 0, r2_o, x1, 0, cxgb, 0)
Richard Henderson6ac1b452012-09-01 10:42:54 -0700280/* CONVERT TO LOGICAL */
281 C(0xb39c, CLFEBR, RRF_e, FPE, 0, e2, new, r1_32, clfeb, 0)
282 C(0xb39d, CLFDBR, RRF_e, FPE, 0, f2_o, new, r1_32, clfdb, 0)
283 C(0xb39e, CLFXBR, RRF_e, FPE, 0, x2_o, new, r1_32, clfxb, 0)
284 C(0xb3ac, CLGEBR, RRF_e, FPE, 0, e2, r1, 0, clgeb, 0)
285 C(0xb3ad, CLGDBR, RRF_e, FPE, 0, f2_o, r1, 0, clgdb, 0)
286 C(0xb3ae, CLGXBR, RRF_e, FPE, 0, x2_o, r1, 0, clgxb, 0)
Richard Henderson2112bf12012-09-01 11:08:17 -0700287/* CONVERT FROM LOGICAL */
288 C(0xb390, CELFBR, RRF_e, FPE, 0, r2_32u, new, e1, celgb, 0)
289 C(0xb391, CDLFBR, RRF_e, FPE, 0, r2_32u, f1, 0, cdlgb, 0)
290 C(0xb392, CXLFBR, RRF_e, FPE, 0, r2_32u, x1, 0, cxlgb, 0)
291 C(0xb3a0, CELGBR, RRF_e, FPE, 0, r2_o, new, e1, celgb, 0)
292 C(0xb3a1, CDLGBR, RRF_e, FPE, 0, r2_o, f1, 0, cdlgb, 0)
293 C(0xb3a2, CXLGBR, RRF_e, FPE, 0, r2_o, x1, 0, cxlgb, 0)
Richard Hendersonc49daa52012-08-21 14:05:11 -0700294
Richard Henderson891452e2012-08-20 14:02:02 -0700295/* DIVIDE */
296 C(0x1d00, DR, RR_a, Z, r1_D32, r2_32s, new_P, r1_P32, divs32, 0)
297 C(0x5d00, D, RX_a, Z, r1_D32, m2_32s, new_P, r1_P32, divs32, 0)
Richard Hendersonf08a5c32012-09-07 11:41:12 -0700298 C(0xb30d, DEBR, RRE, Z, e1, e2, new, e1, deb, 0)
299 C(0xb31d, DDBR, RRE, Z, f1_o, f2_o, f1, 0, ddb, 0)
300 C(0xb34d, DXBR, RRE, Z, 0, x2_o, x1, 0, dxb, 0)
301 C(0xed0d, DEB, RXE, Z, e1, m2_32u, new, e1, deb, 0)
302 C(0xed1d, DDB, RXE, Z, f1_o, m2_64, f1, 0, ddb, 0)
Richard Henderson891452e2012-08-20 14:02:02 -0700303/* DIVIDE LOGICAL */
304 C(0xb997, DLR, RRE, Z, r1_D32, r2_32u, new_P, r1_P32, divu32, 0)
305 C(0xe397, DL, RXY_a, Z, r1_D32, m2_32u, new_P, r1_P32, divu32, 0)
306 C(0xb987, DLGR, RRE, Z, 0, r2_o, r1_P, 0, divu64, 0)
307 C(0xe387, DLG, RXY_a, Z, 0, m2_64, r1_P, 0, divu64, 0)
308/* DIVIDE SINGLE */
309 C(0xb90d, DSGR, RRE, Z, r1p1, r2, r1_P, 0, divs64, 0)
310 C(0xb91d, DSGFR, RRE, Z, r1p1, r2_32s, r1_P, 0, divs64, 0)
311 C(0xe30d, DSG, RXY_a, Z, r1p1, m2_64, r1_P, 0, divs64, 0)
312 C(0xe31d, DSGF, RXY_a, Z, r1p1, m2_32s, r1_P, 0, divs64, 0)
313
Richard Henderson3bbfbd12012-09-01 16:28:39 -0700314/* EXCLUSIVE OR */
315 C(0x1700, XR, RR_a, Z, r1, r2, new, r1_32, xor, nz32)
316 C(0xb9f7, XRK, RRF_a, DO, r2, r3, new, r1_32, xor, nz32)
317 C(0x5700, X, RX_a, Z, r1, m2_32s, new, r1_32, xor, nz32)
318 C(0xe357, XY, RXY_a, LD, r1, m2_32s, new, r1_32, xor, nz32)
319 C(0xb982, XGR, RRE, Z, r1, r2, r1, 0, xor, nz64)
320 C(0xb9e7, XGRK, RRF_a, DO, r2, r3, r1, 0, xor, nz64)
321 C(0xe382, XG, RXY_a, Z, r1, m2_64, r1, 0, xor, nz64)
Richard Hendersond074ac62012-09-19 13:48:46 -0700322 C(0xd700, XC, SS_a, Z, 0, 0, 0, 0, xc, 0)
Richard Hendersonfacfc862012-08-17 15:01:36 -0700323/* EXCLUSIVE OR IMMEDIATE */
324 D(0xc006, XIHF, RIL_a, EI, r1_o, i2_32u, r1, 0, xori, 0, 0x2020)
325 D(0xc007, XILF, RIL_a, EI, r1_o, i2_32u, r1, 0, xori, 0, 0x2000)
Richard Hendersona05d2b62012-08-22 10:57:56 -0700326 C(0x9700, XI, SI, Z, m1_8u, i2_8u, new, m1_8, xor, nz64)
327 C(0xeb57, XIY, SIY, LD, m1_8u, i2_8u, new, m1_8, xor, nz64)
Richard Hendersonfacfc862012-08-17 15:01:36 -0700328
Richard Henderson6e764e92012-08-21 13:48:38 -0700329/* EXECUTE */
330 C(0x4400, EX, RX_a, Z, r1_o, a2, 0, 0, ex, 0)
331/* EXECUTE RELATIVE LONG */
332 C(0xc600, EXRL, RIL_b, EE, r1_o, ri2, 0, 0, ex, 0)
333
Richard Hendersond62a4c92012-08-24 11:54:04 -0700334/* EXTRACT ACCESS */
335 C(0xb24f, EAR, RRE, Z, 0, 0, new, r1_32, ear, 0)
Richard Henderson07747102013-09-20 15:34:34 -0700336/* EXTRACT CPU ATTRIBUTE */
337 C(0xeb4c, ECAG, RSY_a, GIE, 0, a2, r1, 0, ecag, 0)
Richard Hendersonea204902012-08-22 14:09:05 -0700338/* EXTRACT FPC */
339 C(0xb38c, EFPC, RRE, Z, 0, 0, new, r1_32, efpc, 0)
Richard Hendersone30a9d32013-09-06 09:48:08 -0700340/* EXTRACT PSW */
341 C(0xb98d, EPSW, RRE, Z, 0, 0, 0, 0, epsw, 0)
Richard Hendersonea204902012-08-22 14:09:05 -0700342
Richard Henderson102bf2c2012-08-24 07:39:11 -0700343/* FIND LEFTMOST ONE */
344 C(0xb983, FLOGR, RRE, EI, 0, r2_o, r1_P, 0, flogr, 0)
345
Richard Hendersonafdc70b2012-08-21 07:12:29 -0700346/* INSERT CHARACTER */
347 C(0x4300, IC, RX_a, Z, 0, m2_8u, 0, r1_8, mov2, 0)
348 C(0xe373, ICY, RXY_a, LD, 0, m2_8u, 0, r1_8, mov2, 0)
Richard Henderson58a9e352012-08-21 13:13:09 -0700349/* INSERT CHARACTERS UNDER MASK */
350 D(0xbf00, ICM, RS_b, Z, 0, a2, r1, 0, icm, 0, 0)
351 D(0xeb81, ICMY, RSY_b, LD, 0, a2, r1, 0, icm, 0, 0)
352 D(0xeb80, ICMH, RSY_b, Z, 0, a2, r1, 0, icm, 0, 32)
Richard Hendersonfacfc862012-08-17 15:01:36 -0700353/* INSERT IMMEDIATE */
354 D(0xc008, IIHF, RIL_a, EI, r1_o, i2_32u, r1, 0, insi, 0, 0x2020)
355 D(0xc009, IILF, RIL_a, EI, r1_o, i2_32u, r1, 0, insi, 0, 0x2000)
356 D(0xa500, IIHH, RI_a, Z, r1_o, i2_16u, r1, 0, insi, 0, 0x1030)
357 D(0xa501, IIHL, RI_a, Z, r1_o, i2_16u, r1, 0, insi, 0, 0x1020)
358 D(0xa502, IILH, RI_a, Z, r1_o, i2_16u, r1, 0, insi, 0, 0x1010)
359 D(0xa503, IILL, RI_a, Z, r1_o, i2_16u, r1, 0, insi, 0, 0x1000)
Richard Henderson6e2704e2012-09-05 10:18:21 -0700360/* INSERT PROGRAM MASK */
361 C(0xb222, IPM, RRE, Z, 0, 0, r1, 0, ipm, 0)
Richard Henderson3bbfbd12012-09-01 16:28:39 -0700362
Richard Henderson22c37a02012-08-17 09:45:53 -0700363/* LOAD */
364 C(0x1800, LR, RR_a, Z, 0, r2_o, 0, cond_r1r2_32, mov2, 0)
365 C(0x5800, L, RX_a, Z, 0, a2, new, r1_32, ld32s, 0)
Aurelien Jarno92892332015-05-25 01:47:30 +0200366 C(0xe358, LY, RXY_a, LD, 0, a2, new, r1_32, ld32s, 0)
Richard Henderson22c37a02012-08-17 09:45:53 -0700367 C(0xb904, LGR, RRE, Z, 0, r2_o, 0, r1, mov2, 0)
368 C(0xb914, LGFR, RRE, Z, 0, r2_32s, 0, r1, mov2, 0)
369 C(0xe304, LG, RXY_a, Z, 0, a2, r1, 0, ld64, 0)
370 C(0xe314, LGF, RXY_a, Z, 0, a2, r1, 0, ld32s, 0)
Richard Hendersond764a8d2012-09-05 12:24:24 -0700371 C(0x2800, LDR, RR_a, Z, 0, f2_o, 0, f1, mov2, 0)
372 C(0x6800, LD, RX_a, Z, 0, m2_64, 0, f1, mov2, 0)
373 C(0xed65, LDY, RXY_a, LD, 0, m2_64, 0, f1, mov2, 0)
374 C(0x3800, LER, RR_a, Z, 0, e2, 0, cond_e1e2, mov2, 0)
375 C(0x7800, LE, RX_a, Z, 0, m2_32u, 0, e1, mov2, 0)
376 C(0xed64, LEY, RXY_a, LD, 0, m2_32u, 0, e1, mov2, 0)
377 C(0xb365, LXR, RRE, Z, 0, x2_o, 0, x1, movx, 0)
Richard Henderson22c37a02012-08-17 09:45:53 -0700378/* LOAD IMMEDIATE */
379 C(0xc001, LGFI, RIL_a, EI, 0, i2, 0, r1, mov2, 0)
380/* LOAD RELATIVE LONG */
381 C(0xc40d, LRL, RIL_b, GIE, 0, ri2, new, r1_32, ld32s, 0)
382 C(0xc408, LGRL, RIL_b, GIE, 0, ri2, r1, 0, ld64, 0)
383 C(0xc40c, LGFRL, RIL_b, GIE, 0, ri2, r1, 0, ld32s, 0)
Richard Hendersonaedec192012-08-17 09:57:07 -0700384/* LOAD ADDRESS */
385 C(0x4100, LA, RX_a, Z, 0, a2, 0, r1, mov2, 0)
386 C(0xe371, LAY, RXY_a, LD, 0, a2, 0, r1, mov2, 0)
Aurelien Jarnoa1c76102015-05-25 01:47:31 +0200387/* LOAD ADDRESS EXTENDED */
388 C(0x5100, LAE, RX_a, Z, 0, a2, 0, r1, mov2e, 0)
389 C(0xe375, LAEY, RXY_a, GIE, 0, a2, 0, r1, mov2e, 0)
Richard Hendersonaedec192012-08-17 09:57:07 -0700390/* LOAD ADDRESS RELATIVE LONG */
391 C(0xc000, LARL, RIL_b, Z, 0, ri2, 0, r1, mov2, 0)
Alexander Graf57af7282015-05-08 03:07:53 +0200392/* LOAD AND ADD */
393 C(0xebf8, LAA, RSY_a, ILA, r3_32s, m2_32s_atomic, new, m2_32_r1_atomic, add, adds32)
394 C(0xebe8, LAAG, RSY_a, ILA, r3, m2_64_atomic, new, m2_64_r1_atomic, add, adds64)
395/* LOAD AND ADD LOGICAL */
396 C(0xebfa, LAAL, RSY_a, ILA, r3_32s, m2_32s_atomic, new, m2_32_r1_atomic, add, addu32)
397 C(0xebea, LAALG, RSY_a, ILA, r3, m2_64_atomic, new, m2_64_r1_atomic, add, addu64)
398/* LOAD AND AND */
399 C(0xebf4, LAN, RSY_a, ILA, r3_32s, m2_32s_atomic, new, m2_32_r1_atomic, and, nz32)
400 C(0xebe4, LANG, RSY_a, ILA, r3, m2_64_atomic, new, m2_64_r1_atomic, and, nz64)
401/* LOAD AND EXCLUSIVE OR */
402 C(0xebf7, LAX, RSY_a, ILA, r3_32s, m2_32s_atomic, new, m2_32_r1_atomic, xor, nz32)
403 C(0xebe7, LAXG, RSY_a, ILA, r3, m2_64_atomic, new, m2_64_r1_atomic, xor, nz64)
404/* LOAD AND OR */
405 C(0xebf6, LAO, RSY_a, ILA, r3_32s, m2_32s_atomic, new, m2_32_r1_atomic, or, nz32)
406 C(0xebe6, LAOG, RSY_a, ILA, r3, m2_64_atomic, new, m2_64_r1_atomic, or, nz64)
Richard Henderson11bf2d72012-08-17 11:03:39 -0700407/* LOAD AND TEST */
408 C(0x1200, LTR, RR_a, Z, 0, r2_o, 0, cond_r1r2_32, mov2, s32)
409 C(0xb902, LTGR, RRE, Z, 0, r2_o, 0, r1, mov2, s64)
410 C(0xb912, LTGFR, RRE, Z, 0, r2_32s, 0, r1, mov2, s64)
411 C(0xe312, LT, RXY_a, EI, 0, a2, new, r1_32, ld32s, s64)
412 C(0xe302, LTG, RXY_a, EI, 0, a2, r1, 0, ld64, s64)
413 C(0xe332, LTGF, RXY_a, GIE, 0, a2, r1, 0, ld32s, s64)
Richard Henderson587626f2012-08-23 10:48:20 -0700414 C(0xb302, LTEBR, RRE, Z, 0, e2, 0, cond_e1e2, mov2, f32)
415 C(0xb312, LTDBR, RRE, Z, 0, f2_o, 0, f1, mov2, f64)
416 C(0xb342, LTXBR, RRE, Z, 0, x2_o, 0, x1, movx, f128)
Aurelien Jarno782a8472015-06-03 23:09:51 +0200417/* LOAD AND TRAP */
418 C(0xe39f, LAT, RXY_a, LAT, 0, m2_32u, r1, 0, lat, 0)
419 C(0xe385, LGAT, RXY_a, LAT, 0, a2, r1, 0, lgat, 0)
Richard Hendersonc698d872012-08-17 10:27:29 -0700420/* LOAD BYTE */
421 C(0xb926, LBR, RRE, EI, 0, r2_8s, 0, r1_32, mov2, 0)
422 C(0xb906, LGBR, RRE, EI, 0, r2_8s, 0, r1, mov2, 0)
423 C(0xe376, LB, RXY_a, LD, 0, a2, new, r1_32, ld8s, 0)
424 C(0xe377, LGB, RXY_a, LD, 0, a2, r1, 0, ld8s, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200425/* LOAD BYTE HIGH */
426 C(0xe3c0, LBH, RXY_a, HW, 0, a2, new, r1_32h, ld8s, 0)
Richard Hendersonb9bca3e2012-08-17 11:38:37 -0700427/* LOAD COMPLEMENT */
428 C(0x1300, LCR, RR_a, Z, 0, r2, new, r1_32, neg, neg32)
429 C(0xb903, LCGR, RRE, Z, 0, r2, r1, 0, neg, neg64)
430 C(0xb913, LCGFR, RRE, Z, 0, r2_32s, r1, 0, neg, neg64)
Richard Henderson5d7fd042012-09-05 15:58:27 -0700431 C(0xb303, LCEBR, RRE, Z, 0, e2, new, e1, negf32, f32)
432 C(0xb313, LCDBR, RRE, Z, 0, f2_o, f1, 0, negf64, f64)
433 C(0xb343, LCXBR, RRE, Z, 0, x2_o, x1, 0, negf128, f128)
Richard Henderson1d1f6302012-09-09 14:31:43 -0700434 C(0xb373, LCDFR, RRE, FPSSH, 0, f2_o, f1, 0, negf64, 0)
Richard Hendersonc698d872012-08-17 10:27:29 -0700435/* LOAD HALFWORD */
436 C(0xb927, LHR, RRE, EI, 0, r2_16s, 0, r1_32, mov2, 0)
437 C(0xb907, LGHR, RRE, EI, 0, r2_16s, 0, r1, mov2, 0)
438 C(0x4800, LH, RX_a, Z, 0, a2, new, r1_32, ld16s, 0)
439 C(0xe378, LHY, RXY_a, LD, 0, a2, new, r1_32, ld16s, 0)
440 C(0xe315, LGH, RXY_a, Z, 0, a2, r1, 0, ld16s, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200441/* LOAD HALFWORD HIGH */
442 C(0xe3c4, LHH, RXY_a, HW, 0, a2, new, r1_32h, ld16s, 0)
Richard Hendersonc698d872012-08-17 10:27:29 -0700443/* LOAD HALFWORD IMMEDIATE */
444 C(0xa708, LHI, RI_a, Z, 0, i2, 0, r1_32, mov2, 0)
445 C(0xa709, LGHI, RI_a, Z, 0, i2, 0, r1, mov2, 0)
446/* LOAD HALFWORD RELATIVE LONG */
447 C(0xc405, LHRL, RIL_b, GIE, 0, ri2, new, r1_32, ld16s, 0)
448 C(0xc404, LGHRL, RIL_b, GIE, 0, ri2, r1, 0, ld16s, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200449/* LOAD HIGH */
450 C(0xe3ca, LFH, RXY_a, HW, 0, a2, new, r1_32h, ld32u, 0)
Aurelien Jarno782a8472015-06-03 23:09:51 +0200451/* LOAG HIGH AND TRAP */
452 C(0xe3c8, LFHAT, RXY_a, LAT, 0, m2_32u, r1, 0, lfhat, 0)
Richard Henderson22c37a02012-08-17 09:45:53 -0700453/* LOAD LOGICAL */
454 C(0xb916, LLGFR, RRE, Z, 0, r2_32u, 0, r1, mov2, 0)
455 C(0xe316, LLGF, RXY_a, Z, 0, a2, r1, 0, ld32u, 0)
Aurelien Jarno782a8472015-06-03 23:09:51 +0200456/* LOAD LOGICAL AND TRAP */
457 C(0xe39d, LLGFAT, RXY_a, LAT, 0, a2, r1, 0, llgfat, 0)
Richard Henderson22c37a02012-08-17 09:45:53 -0700458/* LOAD LOGICAL RELATIVE LONG */
459 C(0xc40e, LLGFRL, RIL_b, GIE, 0, ri2, r1, 0, ld32u, 0)
Richard Hendersonc698d872012-08-17 10:27:29 -0700460/* LOAD LOGICAL CHARACTER */
461 C(0xb994, LLCR, RRE, EI, 0, r2_8u, 0, r1_32, mov2, 0)
462 C(0xb984, LLGCR, RRE, EI, 0, r2_8u, 0, r1, mov2, 0)
463 C(0xe394, LLC, RXY_a, EI, 0, a2, new, r1_32, ld8u, 0)
464 C(0xe390, LLGC, RXY_a, Z, 0, a2, r1, 0, ld8u, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200465/* LOAD LOGICAL CHARACTER HIGH */
466 C(0xe3c2, LLCH, RXY_a, HW, 0, a2, new, r1_32h, ld8u, 0)
Richard Hendersonc698d872012-08-17 10:27:29 -0700467/* LOAD LOGICAL HALFWORD */
468 C(0xb995, LLHR, RRE, EI, 0, r2_16u, 0, r1_32, mov2, 0)
469 C(0xb985, LLGHR, RRE, EI, 0, r2_16u, 0, r1, mov2, 0)
470 C(0xe395, LLH, RXY_a, EI, 0, a2, new, r1_32, ld16u, 0)
471 C(0xe391, LLGH, RXY_a, Z, 0, a2, r1, 0, ld16u, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200472/* LOAD LOGICAL HALFWORD HIGH */
473 C(0xe3c6, LLHH, RXY_a, HW, 0, a2, new, r1_32h, ld16u, 0)
Richard Hendersonc698d872012-08-17 10:27:29 -0700474/* LOAD LOGICAL HALFWORD RELATIVE LONG */
475 C(0xc402, LLHRL, RIL_b, GIE, 0, ri2, new, r1_32, ld16u, 0)
476 C(0xc406, LLGHRL, RIL_b, GIE, 0, ri2, r1, 0, ld16u, 0)
Richard Hendersonade9dea2012-08-17 11:20:33 -0700477/* LOAD LOGICAL IMMEDATE */
478 D(0xc00e, LLIHF, RIL_a, EI, 0, i2_32u_shl, 0, r1, mov2, 0, 32)
479 D(0xc00f, LLILF, RIL_a, EI, 0, i2_32u_shl, 0, r1, mov2, 0, 0)
480 D(0xa50c, LLIHH, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 48)
481 D(0xa50d, LLIHL, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 32)
482 D(0xa50e, LLILH, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 16)
483 D(0xa50f, LLILL, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 0)
Richard Henderson7691c232012-08-22 15:59:19 -0700484/* LOAD LOGICAL THIRTY ONE BITS */
485 C(0xb917, LLGTR, RRE, Z, 0, r2_o, r1, 0, llgt, 0)
486 C(0xe317, LLGT, RXY_a, Z, 0, m2_32u, r1, 0, llgt, 0)
Aurelien Jarno782a8472015-06-03 23:09:51 +0200487/* LOAD LOGICAL THIRTY ONE BITS AND TRAP */
488 C(0xe39c, LLGTAT, RXY_a, LAT, 0, m2_32u, r1, 0, llgtat, 0)
489
Richard Henderson143cbbc2012-09-05 10:52:08 -0700490/* LOAD FPR FROM GR */
491 C(0xb3c1, LDGR, RRE, FPRGR, 0, r2_o, 0, f1, mov2, 0)
492/* LOAD GR FROM FPR */
493 C(0xb3cd, LGDR, RRE, FPRGR, 0, f2_o, 0, r1, mov2, 0)
Richard Hendersonb9bca3e2012-08-17 11:38:37 -0700494/* LOAD NEGATIVE */
495 C(0x1100, LNR, RR_a, Z, 0, r2_32s, new, r1_32, nabs, nabs32)
496 C(0xb901, LNGR, RRE, Z, 0, r2, r1, 0, nabs, nabs64)
497 C(0xb911, LNGFR, RRE, Z, 0, r2_32s, r1, 0, nabs, nabs64)
Richard Henderson5d7fd042012-09-05 15:58:27 -0700498 C(0xb301, LNEBR, RRE, Z, 0, e2, new, e1, nabsf32, f32)
499 C(0xb311, LNDBR, RRE, Z, 0, f2_o, f1, 0, nabsf64, f64)
500 C(0xb341, LNXBR, RRE, Z, 0, x2_o, x1, 0, nabsf128, f128)
Aurelien Jarnodf462832015-06-03 23:09:49 +0200501 C(0xb371, LNDFR, RRE, FPSSH, 0, f2_o, f1, 0, nabsf64, 0)
Richard Henderson632086d2012-09-05 10:55:00 -0700502/* LOAD ON CONDITION */
503 C(0xb9f2, LOCR, RRF_c, LOC, r1, r2, new, r1_32, loc, 0)
504 C(0xb9e2, LOCGR, RRF_c, LOC, r1, r2, r1, 0, loc, 0)
505 C(0xebf2, LOC, RSY_b, LOC, r1, m2_32u, new, r1_32, loc, 0)
506 C(0xebe2, LOCG, RSY_b, LOC, r1, m2_64, r1, 0, loc, 0)
Alexander Graf57af7282015-05-08 03:07:53 +0200507/* LOAD PAIR DISJOINT TODO */
Richard Hendersonb9bca3e2012-08-17 11:38:37 -0700508/* LOAD POSITIVE */
509 C(0x1000, LPR, RR_a, Z, 0, r2_32s, new, r1_32, abs, abs32)
510 C(0xb900, LPGR, RRE, Z, 0, r2, r1, 0, abs, abs64)
511 C(0xb910, LPGFR, RRE, Z, 0, r2_32s, r1, 0, abs, abs64)
Richard Henderson5d7fd042012-09-05 15:58:27 -0700512 C(0xb300, LPEBR, RRE, Z, 0, e2, new, e1, absf32, f32)
513 C(0xb310, LPDBR, RRE, Z, 0, f2_o, f1, 0, absf64, f64)
514 C(0xb340, LPXBR, RRE, Z, 0, x2_o, x1, 0, absf128, f128)
Aurelien Jarnodf462832015-06-03 23:09:49 +0200515 C(0xb370, LPDFR, RRE, FPSSH, 0, f2_o, f1, 0, absf64, 0)
Richard Hendersond54f5862012-08-22 15:35:40 -0700516/* LOAD REVERSED */
517 C(0xb91f, LRVR, RRE, Z, 0, r2_32u, new, r1_32, rev32, 0)
518 C(0xb90f, LRVGR, RRE, Z, 0, r2_o, r1, 0, rev64, 0)
519 C(0xe31f, LRVH, RXY_a, Z, 0, m2_16u, new, r1_16, rev16, 0)
520 C(0xe31e, LRV, RXY_a, Z, 0, m2_32u, new, r1_32, rev32, 0)
521 C(0xe30f, LRVG, RXY_a, Z, 0, m2_64, r1, 0, rev64, 0)
Richard Henderson24db8412012-09-05 10:14:24 -0700522/* LOAD ZERO */
523 C(0xb374, LZER, RRE, Z, 0, 0, 0, e1, zero, 0)
524 C(0xb375, LZDR, RRE, Z, 0, 0, 0, f1, zero, 0)
525 C(0xb376, LZXR, RRE, Z, 0, 0, 0, x1, zero2, 0)
Richard Henderson22c37a02012-08-17 09:45:53 -0700526
Richard Henderson8379bfd2012-08-24 07:44:43 -0700527/* LOAD FPC */
528 C(0xb29d, LFPC, S, Z, 0, m2_32u, 0, 0, sfpc, 0)
Richard Henderson411edc22012-09-10 17:23:13 -0700529/* LOAD FPC AND SIGNAL */
530 C(0xb2bd, LFAS, S, IEEEE_SIM, 0, m2_32u, 0, 0, sfas, 0)
Aurelien Jarnoed0bcec2015-06-03 23:09:46 +0200531/* LOAD FP INTEGER */
532 C(0xb357, FIEBR, RRF_e, Z, 0, e2, new, e1, fieb, 0)
533 C(0xb35f, FIDBR, RRF_e, Z, 0, f2_o, f1, 0, fidb, 0)
534 C(0xb347, FIXBR, RRF_e, Z, 0, x2_o, x1, 0, fixb, 0)
Richard Henderson8379bfd2012-08-24 07:44:43 -0700535
Richard Henderson587626f2012-08-23 10:48:20 -0700536/* LOAD LENGTHENED */
537 C(0xb304, LDEBR, RRE, Z, 0, e2, f1, 0, ldeb, 0)
538 C(0xb305, LXDBR, RRE, Z, 0, f2_o, x1, 0, lxdb, 0)
539 C(0xb306, LXEBR, RRE, Z, 0, e2, x1, 0, lxeb, 0)
540 C(0xed04, LDEB, RXE, Z, 0, m2_32u, f1, 0, ldeb, 0)
541 C(0xed05, LXDB, RXE, Z, 0, m2_64, x1, 0, lxdb, 0)
542 C(0xed06, LXEB, RXE, Z, 0, m2_32u, x1, 0, lxeb, 0)
543/* LOAD ROUNDED */
544 C(0xb344, LEDBR, RRE, Z, 0, f2_o, new, e1, ledb, 0)
545 C(0xb345, LDXBR, RRE, Z, 0, x2_o, f1, 0, ldxb, 0)
546 C(0xb346, LEXBR, RRE, Z, 0, x2_o, new, e1, lexb, 0)
547
Richard Henderson77f8d6c2012-08-22 09:49:37 -0700548/* LOAD MULTIPLE */
549 C(0x9800, LM, RS_a, Z, 0, a2, 0, 0, lm32, 0)
550 C(0xeb98, LMY, RSY_a, LD, 0, a2, 0, 0, lm32, 0)
551 C(0xeb04, LMG, RSY_a, Z, 0, a2, 0, 0, lm64, 0)
552/* LOAD MULTIPLE HIGH */
553 C(0xeb96, LMH, RSY_a, Z, 0, a2, 0, 0, lmh, 0)
Richard Henderson7df3e932012-09-05 09:38:22 -0700554/* LOAD ACCESS MULTIPLE */
555 C(0x9a00, LAM, RS_a, Z, 0, a2, 0, 0, lam, 0)
556 C(0xeb9a, LAMY, RSY_a, LD, 0, a2, 0, 0, lam, 0)
Richard Henderson77f8d6c2012-08-22 09:49:37 -0700557
Richard Henderson6a04d762012-08-22 10:22:28 -0700558/* MOVE */
Richard Hendersonaf9e5a02012-08-22 11:43:06 -0700559 C(0xd200, MVC, SS_a, Z, la1, a2, 0, 0, mvc, 0)
Richard Henderson6a04d762012-08-22 10:22:28 -0700560 C(0xe544, MVHHI, SIL, GIE, la1, i2, 0, m1_16, mov2, 0)
561 C(0xe54c, MVHI, SIL, GIE, la1, i2, 0, m1_32, mov2, 0)
562 C(0xe548, MVGHI, SIL, GIE, la1, i2, 0, m1_64, mov2, 0)
563 C(0x9200, MVI, SI, Z, la1, i2, 0, m1_8, mov2, 0)
564 C(0xeb52, MVIY, SIY, LD, la1, i2, 0, m1_8, mov2, 0)
Richard Hendersone1eaada2012-08-20 16:46:49 -0700565/* MOVE LONG */
566 C(0x0e00, MVCL, RR_a, Z, 0, 0, 0, 0, mvcl, 0)
Richard Hendersoneb66e6a2012-08-22 11:24:25 -0700567/* MOVE LONG EXTENDED */
568 C(0xa800, MVCLE, RS_a, Z, 0, a2, 0, 0, mvcle, 0)
Richard Hendersonee6c38d2012-09-05 10:19:44 -0700569/* MOVE PAGE */
570 C(0xb254, MVPG, RRE, Z, r1_o, r2_o, 0, 0, mvpg, 0)
Richard Hendersonaa31bf62012-09-05 10:20:53 -0700571/* MOVE STRING */
572 C(0xb255, MVST, RRE, Z, r1_o, r2_o, 0, 0, mvst, 0)
Richard Hendersone1eaada2012-08-20 16:46:49 -0700573
Richard Hendersond87aaf92012-09-25 15:17:59 -0700574/* MULTIPLY */
575 C(0x1c00, MR, RR_a, Z, r1p1_32s, r2_32s, new, r1_D32, mul, 0)
576 C(0x5c00, M, RX_a, Z, r1p1_32s, m2_32s, new, r1_D32, mul, 0)
577 C(0xe35c, MFY, RXY_a, GIE, r1p1_32s, m2_32s, new, r1_D32, mul, 0)
Richard Henderson83b00732012-08-23 12:02:38 -0700578 C(0xb317, MEEBR, RRE, Z, e1, e2, new, e1, meeb, 0)
579 C(0xb31c, MDBR, RRE, Z, f1_o, f2_o, f1, 0, mdb, 0)
580 C(0xb34c, MXBR, RRE, Z, 0, x2_o, x1, 0, mxb, 0)
581 C(0xb30c, MDEBR, RRE, Z, f1_o, e2, f1, 0, mdeb, 0)
582 C(0xb307, MXDBR, RRE, Z, 0, f2_o, x1, 0, mxdb, 0)
583 C(0xed17, MEEB, RXE, Z, e1, m2_32u, new, e1, meeb, 0)
584 C(0xed1c, MDB, RXE, Z, f1_o, m2_64, f1, 0, mdb, 0)
585 C(0xed0c, MDEB, RXE, Z, f1_o, m2_32u, f1, 0, mdeb, 0)
586 C(0xed07, MXDB, RXE, Z, 0, m2_64, x1, 0, mxdb, 0)
Richard Hendersond1c04a22012-09-25 15:10:35 -0700587/* MULTIPLY HALFWORD */
588 C(0x4c00, MH, RX_a, Z, r1_o, m2_16s, new, r1_32, mul, 0)
589 C(0xe37c, MHY, RXY_a, GIE, r1_o, m2_16s, new, r1_32, mul, 0)
590/* MULTIPLY HALFWORD IMMEDIATE */
591 C(0xa70c, MHI, RI_a, Z, r1_o, i2, new, r1_32, mul, 0)
592 C(0xa70d, MGHI, RI_a, Z, r1_o, i2, r1, 0, mul, 0)
Richard Hendersond87aaf92012-09-25 15:17:59 -0700593/* MULTIPLY LOGICAL */
594 C(0xb996, MLR, RRE, Z, r1p1_32u, r2_32u, new, r1_D32, mul, 0)
595 C(0xe396, ML, RXY_a, Z, r1p1_32u, m2_32u, new, r1_D32, mul, 0)
Richard Henderson1ac58892012-09-25 15:26:59 -0700596 C(0xb986, MLGR, RRE, Z, r1p1, r2_o, r1_P, 0, mul128, 0)
597 C(0xe386, MLG, RXY_a, Z, r1p1, m2_64, r1_P, 0, mul128, 0)
Richard Hendersond1c04a22012-09-25 15:10:35 -0700598/* MULTIPLY SINGLE */
599 C(0xb252, MSR, RRE, Z, r1_o, r2_o, new, r1_32, mul, 0)
600 C(0x7100, MS, RX_a, Z, r1_o, m2_32s, new, r1_32, mul, 0)
601 C(0xe351, MSY, RXY_a, LD, r1_o, m2_32s, new, r1_32, mul, 0)
602 C(0xb90c, MSGR, RRE, Z, r1_o, r2_o, r1, 0, mul, 0)
603 C(0xb91c, MSGFR, RRE, Z, r1_o, r2_32s, r1, 0, mul, 0)
604 C(0xe30c, MSG, RXY_a, Z, r1_o, m2_64, r1, 0, mul, 0)
605 C(0xe31c, MSGF, RXY_a, Z, r1_o, m2_32s, r1, 0, mul, 0)
606/* MULTIPLY SINGLE IMMEDIATE */
607 C(0xc201, MSFI, RIL_a, GIE, r1_o, i2, new, r1_32, mul, 0)
608 C(0xc200, MSGFI, RIL_a, GIE, r1_o, i2, r1, 0, mul, 0)
609
Richard Henderson722bfec2012-08-23 12:30:12 -0700610/* MULTIPLY AND ADD */
611 C(0xb30e, MAEBR, RRD, Z, e1, e2, new, e1, maeb, 0)
612 C(0xb31e, MADBR, RRD, Z, f1_o, f2_o, f1, 0, madb, 0)
613 C(0xed0e, MAEB, RXF, Z, e1, m2_32u, new, e1, maeb, 0)
614 C(0xed1e, MADB, RXF, Z, f1_o, m2_64, f1, 0, madb, 0)
615/* MULTIPLY AND SUBTRACT */
616 C(0xb30f, MSEBR, RRD, Z, e1, e2, new, e1, mseb, 0)
617 C(0xb31f, MSDBR, RRD, Z, f1_o, f2_o, f1, 0, msdb, 0)
618 C(0xed0f, MSEB, RXF, Z, e1, m2_32u, new, e1, mseb, 0)
619 C(0xed1f, MSDB, RXF, Z, f1_o, m2_64, f1, 0, msdb, 0)
620
Richard Henderson3bbfbd12012-09-01 16:28:39 -0700621/* OR */
622 C(0x1600, OR, RR_a, Z, r1, r2, new, r1_32, or, nz32)
623 C(0xb9f6, ORK, RRF_a, DO, r2, r3, new, r1_32, or, nz32)
624 C(0x5600, O, RX_a, Z, r1, m2_32s, new, r1_32, or, nz32)
625 C(0xe356, OY, RXY_a, LD, r1, m2_32s, new, r1_32, or, nz32)
626 C(0xb981, OGR, RRE, Z, r1, r2, r1, 0, or, nz64)
627 C(0xb9e6, OGRK, RRF_a, DO, r2, r3, r1, 0, or, nz64)
628 C(0xe381, OG, RXY_a, Z, r1, m2_64, r1, 0, or, nz64)
Richard Henderson0a949032012-08-22 11:54:19 -0700629 C(0xd600, OC, SS_a, Z, la1, a2, 0, 0, oc, 0)
Richard Hendersonfacfc862012-08-17 15:01:36 -0700630/* OR IMMEDIATE */
631 D(0xc00c, OIHF, RIL_a, EI, r1_o, i2_32u, r1, 0, ori, 0, 0x2020)
632 D(0xc00d, OILF, RIL_a, EI, r1_o, i2_32u, r1, 0, ori, 0, 0x2000)
633 D(0xa508, OIHH, RI_a, Z, r1_o, i2_16u, r1, 0, ori, 0, 0x1030)
634 D(0xa509, OIHL, RI_a, Z, r1_o, i2_16u, r1, 0, ori, 0, 0x1020)
635 D(0xa50a, OILH, RI_a, Z, r1_o, i2_16u, r1, 0, ori, 0, 0x1010)
636 D(0xa50b, OILL, RI_a, Z, r1_o, i2_16u, r1, 0, ori, 0, 0x1000)
Richard Hendersona05d2b62012-08-22 10:57:56 -0700637 C(0x9600, OI, SI, Z, m1_8u, i2_8u, new, m1_8, or, nz64)
638 C(0xeb56, OIY, SIY, LD, m1_8u, i2_8u, new, m1_8, or, nz64)
Richard Henderson3bbfbd12012-09-01 16:28:39 -0700639
Richard Hendersone0def902012-08-31 14:10:05 -0700640/* PREFETCH */
641 /* Implemented as nops of course. */
642 C(0xe336, PFD, RXY_b, GIE, 0, 0, 0, 0, 0, 0)
643 C(0xc602, PFDRL, RIL_c, GIE, 0, 0, 0, 0, 0, 0)
644
Richard Henderson99b4f242012-09-01 11:14:04 -0700645/* POPULATION COUNT */
646 C(0xb9e1, POPCNT, RRE, PC, 0, r2_o, r1, 0, popcnt, nz64)
647
Richard Hendersoncbe24bf2012-08-22 09:15:19 -0700648/* ROTATE LEFT SINGLE LOGICAL */
649 C(0xeb1d, RLL, RSY_a, Z, r3_o, sh32, new, r1_32, rll32, 0)
650 C(0xeb1c, RLLG, RSY_a, Z, r3_o, sh64, r1, 0, rll64, 0)
651
Richard Henderson2d6a8692012-08-31 12:50:06 -0700652/* ROTATE THEN INSERT SELECTED BITS */
653 C(0xec55, RISBG, RIE_f, GIE, 0, r2, r1, 0, risbg, s64)
Aurelien Jarno375ee582015-06-03 23:09:50 +0200654 C(0xec59, RISBGN, RIE_f, MIE, 0, r2, r1, 0, risbg, 0)
Aurelien Jarno92892332015-05-25 01:47:30 +0200655 C(0xec5d, RISBHG, RIE_f, HW, 0, r2, r1, 0, risbg, 0)
656 C(0xec51, RISBLG, RIE_f, HW, 0, r2, r1, 0, risbg, 0)
Richard Hendersond6c63722012-08-31 13:54:13 -0700657/* ROTATE_THEN <OP> SELECTED BITS */
658 C(0xec54, RNSBG, RIE_f, GIE, 0, r2, r1, 0, rosbg, 0)
659 C(0xec56, ROSBG, RIE_f, GIE, 0, r2, r1, 0, rosbg, 0)
660 C(0xec57, RXSBG, RIE_f, GIE, 0, r2, r1, 0, rosbg, 0)
Richard Henderson2d6a8692012-08-31 12:50:06 -0700661
Richard Henderson4600c992012-08-24 14:27:42 -0700662/* SEARCH STRING */
663 C(0xb25e, SRST, RRE, Z, r1_o, r2_o, 0, 0, srst, 0)
664
Richard Hendersond62a4c92012-08-24 11:54:04 -0700665/* SET ACCESS */
666 C(0xb24e, SAR, RRE, Z, 0, r2_o, 0, 0, sar, 0)
Richard Henderson8612c932013-09-06 09:31:37 -0700667/* SET ADDRESSING MODE */
668 D(0x010c, SAM24, E, Z, 0, 0, 0, 0, sam, 0, 0)
669 D(0x010d, SAM31, E, Z, 0, 0, 0, 0, sam, 0, 1)
670 D(0x010e, SAM64, E, Z, 0, 0, 0, 0, sam, 0, 3)
Richard Henderson8379bfd2012-08-24 07:44:43 -0700671/* SET FPC */
672 C(0xb384, SFPC, RRE, Z, 0, r1_o, 0, 0, sfpc, 0)
Richard Henderson411edc22012-09-10 17:23:13 -0700673/* SET FPC AND SIGNAL */
674 C(0xb385, SFASR, RRE, IEEEE_SIM, 0, r1_o, 0, 0, sfas, 0)
Richard Hendersona12000b2012-09-10 16:26:35 -0700675/* SET BFP ROUNDING MODE */
676 C(0xb299, SRNM, S, Z, 0, 0, 0, 0, srnm, 0)
677 C(0xb2b8, SRNMB, S, FPE, 0, 0, 0, 0, srnm, 0)
678/* SET DFP ROUNDING MODE */
Aurelien Jarno91828862015-06-03 23:09:45 +0200679 C(0xb2b9, SRNMT, S, DFPR, 0, 0, 0, 0, srnm, 0)
Richard Henderson8379bfd2012-08-24 07:44:43 -0700680
Richard Hendersoncbe24bf2012-08-22 09:15:19 -0700681/* SHIFT LEFT SINGLE */
682 D(0x8b00, SLA, RS_a, Z, r1, sh32, new, r1_32, sla, 0, 31)
683 D(0xebdd, SLAK, RSY_a, DO, r3, sh32, new, r1_32, sla, 0, 31)
684 D(0xeb0b, SLAG, RSY_a, Z, r3, sh64, r1, 0, sla, 0, 63)
685/* SHIFT LEFT SINGLE LOGICAL */
686 C(0x8900, SLL, RS_a, Z, r1_o, sh32, new, r1_32, sll, 0)
687 C(0xebdf, SLLK, RSY_a, DO, r3_o, sh32, new, r1_32, sll, 0)
688 C(0xeb0d, SLLG, RSY_a, Z, r3_o, sh64, r1, 0, sll, 0)
689/* SHIFT RIGHT SINGLE */
690 C(0x8a00, SRA, RS_a, Z, r1_32s, sh32, new, r1_32, sra, s32)
691 C(0xebdc, SRAK, RSY_a, DO, r3_32s, sh32, new, r1_32, sra, s32)
692 C(0xeb0a, SRAG, RSY_a, Z, r3_o, sh64, r1, 0, sra, s64)
693/* SHIFT RIGHT SINGLE LOGICAL */
694 C(0x8800, SRL, RS_a, Z, r1_32u, sh32, new, r1_32, srl, 0)
695 C(0xebde, SRLK, RSY_a, DO, r3_32u, sh32, new, r1_32, srl, 0)
696 C(0xeb0c, SRLG, RSY_a, Z, r3_o, sh64, r1, 0, srl, 0)
Richard Hendersona79ba332012-08-22 09:22:23 -0700697/* SHIFT LEFT DOUBLE */
698 D(0x8f00, SLDA, RS_a, Z, r1_D32, sh64, new, r1_D32, sla, 0, 31)
699/* SHIFT LEFT DOUBLE LOGICAL */
700 C(0x8d00, SLDL, RS_a, Z, r1_D32, sh64, new, r1_D32, sll, 0)
701/* SHIFT RIGHT DOUBLE */
702 C(0x8e00, SRDA, RS_a, Z, r1_D32, sh64, new, r1_D32, sra, s64)
703/* SHIFT RIGHT DOUBLE LOGICAL */
704 C(0x8c00, SRDL, RS_a, Z, r1_D32, sh64, new, r1_D32, srl, 0)
Richard Hendersoncbe24bf2012-08-22 09:15:19 -0700705
Richard Henderson16d7b2a2012-08-23 14:33:03 -0700706/* SQUARE ROOT */
707 C(0xb314, SQEBR, RRE, Z, 0, e2, new, e1, sqeb, 0)
708 C(0xb315, SQDBR, RRE, Z, 0, f2_o, f1, 0, sqdb, 0)
709 C(0xb316, SQXBR, RRE, Z, 0, x2_o, x1, 0, sqxb, 0)
710 C(0xed14, SQEB, RXE, Z, 0, m2_32u, new, e1, sqeb, 0)
711 C(0xed15, SQDB, RXE, Z, 0, m2_64, f1, 0, sqdb, 0)
712
Richard Henderson2b280b92012-08-17 16:00:08 -0700713/* STORE */
714 C(0x5000, ST, RX_a, Z, r1_o, a2, 0, 0, st32, 0)
715 C(0xe350, STY, RXY_a, LD, r1_o, a2, 0, 0, st32, 0)
716 C(0xe324, STG, RXY_a, Z, r1_o, a2, 0, 0, st64, 0)
Richard Henderson00574262012-09-05 12:26:53 -0700717 C(0x6000, STD, RX_a, Z, f1_o, a2, 0, 0, st64, 0)
718 C(0xed67, STDY, RXY_a, LD, f1_o, a2, 0, 0, st64, 0)
719 C(0x7000, STE, RX_a, Z, e1, a2, 0, 0, st32, 0)
720 C(0xed66, STEY, RXY_a, LD, e1, a2, 0, 0, st32, 0)
Richard Henderson2b280b92012-08-17 16:00:08 -0700721/* STORE RELATIVE LONG */
722 C(0xc40f, STRL, RIL_b, GIE, r1_o, ri2, 0, 0, st32, 0)
723 C(0xc40b, STGRL, RIL_b, GIE, r1_o, ri2, 0, 0, st64, 0)
724/* STORE CHARACTER */
725 C(0x4200, STC, RX_a, Z, r1_o, a2, 0, 0, st8, 0)
726 C(0xe372, STCY, RXY_a, LD, r1_o, a2, 0, 0, st8, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200727/* STORE CHARACTER HIGH */
728 C(0xe3c3, STCH, RXY_a, HW, r1_sr32, a2, 0, 0, st8, 0)
Richard Henderson2ae68052012-08-22 15:11:53 -0700729/* STORE CHARACTERS UNDER MASK */
730 D(0xbe00, STCM, RS_b, Z, r1_o, a2, 0, 0, stcm, 0, 0)
731 D(0xeb2d, STCMY, RSY_b, LD, r1_o, a2, 0, 0, stcm, 0, 0)
Aurelien Jarno92892332015-05-25 01:47:30 +0200732 D(0xeb2c, STCMH, RSY_b, Z, r1_o, a2, 0, 0, stcm, 0, 32)
Richard Henderson2b280b92012-08-17 16:00:08 -0700733/* STORE HALFWORD */
734 C(0x4000, STH, RX_a, Z, r1_o, a2, 0, 0, st16, 0)
735 C(0xe370, STHY, RXY_a, LD, r1_o, a2, 0, 0, st16, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200736/* STORE HALFWORD HIGH */
737 C(0xe3c7, STHH, RXY_a, HW, r1_sr32, a2, 0, 0, st16, 0)
Richard Henderson2b280b92012-08-17 16:00:08 -0700738/* STORE HALFWORD RELATIVE LONG */
739 C(0xc407, STHRL, RIL_b, GIE, r1_o, ri2, 0, 0, st16, 0)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200740/* STORE HIGH */
741 C(0xe3cb, STFH, RXY_a, HW, r1_sr32, a2, 0, 0, st32, 0)
Richard Hendersonb92fa332012-09-01 09:45:20 -0700742/* STORE ON CONDITION */
743 D(0xebf3, STOC, RSY_b, LOC, 0, 0, 0, 0, soc, 0, 0)
744 D(0xebe3, STOCG, RSY_b, LOC, 0, 0, 0, 0, soc, 0, 1)
Richard Hendersone025e522012-08-22 15:52:55 -0700745/* STORE REVERSED */
746 C(0xe33f, STRVH, RXY_a, Z, la2, r1_16u, new, m1_16, rev16, 0)
747 C(0xe33e, STRV, RXY_a, Z, la2, r1_32u, new, m1_32, rev32, 0)
748 C(0xe32f, STRVG, RXY_a, Z, la2, r1_o, new, m1_64, rev64, 0)
Richard Henderson2b280b92012-08-17 16:00:08 -0700749
Richard Hendersonea204902012-08-22 14:09:05 -0700750/* STORE FPC */
751 C(0xb29c, STFPC, S, Z, 0, a2, new, m2_32, efpc, 0)
752
Richard Henderson77f8d6c2012-08-22 09:49:37 -0700753/* STORE MULTIPLE */
754 D(0x9000, STM, RS_a, Z, 0, a2, 0, 0, stm, 0, 4)
755 D(0xeb90, STMY, RSY_a, LD, 0, a2, 0, 0, stm, 0, 4)
756 D(0xeb24, STMG, RSY_a, Z, 0, a2, 0, 0, stm, 0, 8)
757/* STORE MULTIPLE HIGH */
758 C(0xeb26, STMH, RSY_a, Z, 0, a2, 0, 0, stmh, 0)
Richard Henderson7df3e932012-09-05 09:38:22 -0700759/* STORE ACCESS MULTIPLE */
760 C(0x9b00, STAM, RS_a, Z, 0, a2, 0, 0, stam, 0)
761 C(0xeb9b, STAMY, RSY_a, LD, 0, a2, 0, 0, stam, 0)
Richard Henderson77f8d6c2012-08-22 09:49:37 -0700762
Richard Hendersonad044d02012-08-15 17:16:22 -0700763/* SUBTRACT */
764 C(0x1b00, SR, RR_a, Z, r1, r2, new, r1_32, sub, subs32)
765 C(0xb9f9, SRK, RRF_a, DO, r2, r3, new, r1_32, sub, subs32)
766 C(0x5b00, S, RX_a, Z, r1, m2_32s, new, r1_32, sub, subs32)
767 C(0xe35b, SY, RXY_a, LD, r1, m2_32s, new, r1_32, sub, subs32)
768 C(0xb909, SGR, RRE, Z, r1, r2, r1, 0, sub, subs64)
769 C(0xb919, SGFR, RRE, Z, r1, r2_32s, r1, 0, sub, subs64)
770 C(0xb9e9, SGRK, RRF_a, DO, r2, r3, r1, 0, sub, subs64)
771 C(0xe309, SG, RXY_a, Z, r1, m2_64, r1, 0, sub, subs64)
772 C(0xe319, SGF, RXY_a, Z, r1, m2_32s, r1, 0, sub, subs64)
Richard Henderson1a800a22012-08-23 11:05:03 -0700773 C(0xb30b, SEBR, RRE, Z, e1, e2, new, e1, seb, f32)
774 C(0xb31b, SDBR, RRE, Z, f1_o, f2_o, f1, 0, sdb, f64)
775 C(0xb34b, SXBR, RRE, Z, 0, x2_o, x1, 0, sxb, f128)
776 C(0xed0b, SEB, RXE, Z, e1, m2_32u, new, e1, seb, f32)
777 C(0xed1b, SDB, RXE, Z, f1_o, m2_64, f1, 0, sdb, f64)
Richard Henderson3f4cb562012-08-27 14:46:42 -0700778/* SUBTRACT HALFWORD */
779 C(0x4b00, SH, RX_a, Z, r1, m2_16s, new, r1_32, sub, subs32)
780 C(0xe37b, SHY, RXY_a, LD, r1, m2_16s, new, r1_32, sub, subs32)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200781/* SUBTRACT HIGH */
782 C(0xb9c9, SHHHR, RRF_a, HW, r2_sr32, r3_sr32, new, r1_32h, sub, subs32)
783 C(0xb9d9, SHHLR, RRF_a, HW, r2_sr32, r3, new, r1_32h, sub, subs32)
Richard Hendersonad044d02012-08-15 17:16:22 -0700784/* SUBTRACT LOGICAL */
785 C(0x1f00, SLR, RR_a, Z, r1, r2, new, r1_32, sub, subu32)
786 C(0xb9fb, SLRK, RRF_a, DO, r2, r3, new, r1_32, sub, subu32)
787 C(0x5f00, SL, RX_a, Z, r1, m2_32u, new, r1_32, sub, subu32)
788 C(0xe35f, SLY, RXY_a, LD, r1, m2_32u, new, r1_32, sub, subu32)
789 C(0xb90b, SLGR, RRE, Z, r1, r2, r1, 0, sub, subu64)
790 C(0xb91b, SLGFR, RRE, Z, r1, r2_32u, r1, 0, sub, subu64)
791 C(0xb9eb, SLGRK, RRF_a, DO, r2, r3, r1, 0, sub, subu64)
792 C(0xe30b, SLG, RXY_a, Z, r1, m2_64, r1, 0, sub, subu64)
793 C(0xe31b, SLGF, RXY_a, Z, r1, m2_32u, r1, 0, sub, subu64)
Aurelien Jarnoa1f12d82015-06-03 23:09:52 +0200794/* SUBTRACT LOCICAL HIGH */
795 C(0xb9cb, SLHHHR, RRF_a, HW, r2_sr32, r3_sr32, new, r1_32h, sub, subu32)
796 C(0xb9db, SLHHLR, RRF_a, HW, r2_sr32, r3, new, r1_32h, sub, subu32)
Richard Hendersonad044d02012-08-15 17:16:22 -0700797/* SUBTRACT LOGICAL IMMEDIATE */
798 C(0xc205, SLFI, RIL_a, EI, r1, i2_32u, new, r1_32, sub, subu32)
799 C(0xc204, SLGFI, RIL_a, EI, r1, i2_32u, r1, 0, sub, subu64)
Richard Henderson4e4bb432012-08-17 18:52:33 -0700800/* SUBTRACT LOGICAL WITH BORROW */
801 C(0xb999, SLBR, RRE, Z, r1, r2, new, r1_32, subb, subb32)
802 C(0xb989, SLBGR, RRE, Z, r1, r2, r1, 0, subb, subb64)
803 C(0xe399, SLB, RXY_a, Z, r1, m2_32u, new, r1_32, subb, subb32)
804 C(0xe389, SLBG, RXY_a, Z, r1, m2_64, r1, 0, subb, subb64)
Richard Henderson00d2dc12012-08-20 16:20:58 -0700805
Richard Hendersonb9836c12012-08-20 16:41:05 -0700806/* SUPERVISOR CALL */
807 C(0x0a00, SVC, I, Z, 0, 0, 0, 0, svc, 0)
808
Richard Henderson31aa97d2012-08-23 12:40:09 -0700809/* TEST DATA CLASS */
810 C(0xed10, TCEB, RXE, Z, e1, a2, 0, 0, tceb, 0)
811 C(0xed11, TCDB, RXE, Z, f1_o, a2, 0, 0, tcdb, 0)
812 C(0xed12, TCXB, RXE, Z, x1_o, a2, 0, 0, tcxb, 0)
813
Richard Henderson00d2dc12012-08-20 16:20:58 -0700814/* TEST UNDER MASK */
815 C(0x9100, TM, SI, Z, m1_8u, i2_8u, 0, 0, 0, tm32)
816 C(0xeb51, TMY, SIY, LD, m1_8u, i2_8u, 0, 0, 0, tm32)
817 D(0xa702, TMHH, RI_a, Z, r1_o, i2_16u_shl, 0, 0, 0, tm64, 48)
818 D(0xa703, TMHL, RI_a, Z, r1_o, i2_16u_shl, 0, 0, 0, tm64, 32)
819 D(0xa700, TMLH, RI_a, Z, r1_o, i2_16u_shl, 0, 0, 0, tm64, 16)
820 D(0xa701, TMLL, RI_a, Z, r1_o, i2_16u_shl, 0, 0, 0, tm64, 0)
Richard Hendersond9a39922012-08-20 16:28:56 -0700821
Richard Henderson0a949032012-08-22 11:54:19 -0700822/* TRANSLATE */
823 C(0xdc00, TR, SS_a, Z, la1, a2, 0, 0, tr, 0)
Aurelien Jarno54f00772015-06-03 23:09:47 +0200824/* TRANSLATE AND TEST */
825 C(0xdd00, TRT, SS_a, Z, la1, a2, 0, 0, trt, 0)
Aurelien Jarno3f4de672015-06-03 23:09:48 +0200826/* TRANSLATE EXTENDED */
827 C(0xb2a5, TRE, RRE, Z, 0, r2, r1_P, 0, tre, 0)
Richard Henderson0a949032012-08-22 11:54:19 -0700828
829/* UNPACK */
830 /* Really format SS_b, but we pack both lengths into one argument
831 for the helper call, so we might as well leave one 8-bit field. */
832 C(0xf300, UNPK, SS_a, Z, la1, a2, 0, 0, unpk, 0)
833
Richard Hendersond9a39922012-08-20 16:28:56 -0700834#ifndef CONFIG_USER_ONLY
Richard Henderson3d596f42012-08-27 09:57:18 -0700835/* COMPARE AND SWAP AND PURGE */
836 C(0xb250, CSP, RRE, Z, 0, ra2, 0, 0, csp, 0)
Richard Henderson972e35b2012-08-21 14:41:36 -0700837/* DIAGNOSE (KVM hypercall) */
Aurelien Jarno8df7eef2015-06-15 17:57:07 +0200838 C(0x8300, DIAG, RSI, Z, 0, 0, 0, 0, diag, 0)
Richard Henderson80264172012-08-27 09:13:38 -0700839/* INSERT STORAGE KEY EXTENDED */
840 C(0xb229, ISKE, RRE, Z, 0, r2_o, new, r1_8, iske, 0)
Richard Hendersoncfef53e2012-08-24 16:25:28 -0700841/* INVALIDATE PAGE TABLE ENTRY */
842 C(0xb221, IPTE, RRF_a, Z, r1_o, r2_o, 0, 0, ipte, 0)
Richard Henderson504488b2012-08-22 14:17:58 -0700843/* LOAD CONTROL */
844 C(0xb700, LCTL, RS_a, Z, 0, a2, 0, 0, lctl, 0)
Richard Henderson3e398cf2012-09-02 10:12:48 -0700845 C(0xeb2f, LCTLG, RSY_a, Z, 0, a2, 0, 0, lctlg, 0)
Richard Henderson8b5ff572012-08-21 14:33:36 -0700846/* LOAD PSW */
847 C(0x8200, LPSW, S, Z, 0, a2, 0, 0, lpsw, 0)
Richard Henderson7ab938d2012-08-27 11:04:48 -0700848/* LOAD PSW EXTENDED */
849 C(0xb2b2, LPSWE, S, Z, 0, a2, 0, 0, lpswe, 0)
Richard Hendersond8fe4a92012-08-22 13:15:10 -0700850/* LOAD REAL ADDRESS */
851 C(0xb100, LRA, RX_a, Z, 0, a2, r1, 0, lra, 0)
852 C(0xe313, LRAY, RXY_a, LD, 0, a2, r1, 0, lra, 0)
853 C(0xe303, LRAG, RXY_a, Z, 0, a2, r1, 0, lra, 0)
Richard Henderson9c3fd852013-09-20 13:04:28 -0700854/* LOAD USING REAL ADDRESS */
855 C(0xb24b, LURA, RRE, Z, 0, r2, new, r1_32, lura, 0)
856 C(0xb905, LURAG, RRE, Z, 0, r2, r1, 0, lurag, 0)
Richard Henderson97c3ab62012-08-22 13:00:27 -0700857/* MOVE TO PRIMARY */
858 C(0xda00, MVCP, SS_d, Z, la1, a2, 0, 0, mvcp, 0)
859/* MOVE TO SECONDARY */
860 C(0xdb00, MVCS, SS_d, Z, la1, a2, 0, 0, mvcs, 0)
Richard Henderson0568d8a2012-08-24 15:59:26 -0700861/* PURGE TLB */
862 C(0xb20d, PTLB, S, Z, 0, 0, 0, 0, ptlb, 0)
Richard Henderson5cc69c52012-08-27 09:22:13 -0700863/* RESET REFERENCE BIT EXTENDED */
864 C(0xb22a, RRBE, RRE, Z, 0, r2_o, 0, 0, rrbe, 0)
Richard Hendersondc458df2012-08-27 11:12:40 -0700865/* SERVICE CALL LOGICAL PROCESSOR (PV hypercall) */
866 C(0xb220, SERVC, RRE, Z, r1_o, r2_o, 0, 0, servc, 0)
Richard Henderson14244b22012-08-27 10:17:16 -0700867/* SET ADDRESS SPACE CONTROL FAST */
868 C(0xb279, SACF, S, Z, 0, a2, 0, 0, sacf, 0)
Richard Henderson35289792012-08-24 15:20:49 -0700869/* SET CLOCK */
870 /* ??? Not implemented - is it necessary? */
871 C(0xb204, SCK, S, Z, 0, 0, 0, 0, 0, 0)
Richard Hendersondd3eb7b2012-08-24 15:36:58 -0700872/* SET CLOCK COMPARATOR */
873 C(0xb206, SCKC, S, Z, 0, m2_64, 0, 0, sckc, 0)
Richard Hendersonc4f0a862012-08-24 15:47:26 -0700874/* SET CPU TIMER */
875 C(0xb208, SPT, S, Z, 0, m2_64, 0, 0, spt, 0)
Richard Hendersone805a0d2012-08-24 16:11:32 -0700876/* SET PREFIX */
877 C(0xb210, SPX, S, Z, 0, m2_32u, 0, 0, spx, 0)
Richard Henderson28d555562012-08-24 15:55:34 -0700878/* SET PSW KEY FROM ADDRESS */
879 C(0xb20a, SPKA, S, Z, 0, a2, 0, 0, spka, 0)
Richard Henderson2bbde272012-08-27 09:18:01 -0700880/* SET STORAGE KEY EXTENDED */
881 C(0xb22b, SSKE, RRF_c, Z, r1_o, r2_o, 0, 0, sske, 0)
Richard Henderson7d30bb72012-08-21 14:12:50 -0700882/* SET SYSTEM MASK */
883 C(0x8000, SSM, S, Z, 0, m2_8u, 0, 0, ssm, 0)
Richard Henderson0c240012012-08-22 13:52:23 -0700884/* SIGNAL PROCESSOR */
885 C(0xae00, SIGP, RS_a, Z, r3_o, a2, 0, 0, sigp, 0)
Richard Henderson434c91a2012-08-24 15:31:07 -0700886/* STORE CLOCK */
887 C(0xb205, STCK, S, Z, la2, 0, new, m1_64, stck, 0)
Aurelien Jarnof7c21142015-06-03 23:09:44 +0200888 C(0xb27c, STCKF, S, SCF, la2, 0, new, m1_64, stck, 0)
Richard Henderson39a50032012-08-27 10:11:36 -0700889/* STORE CLOCK EXTENDED */
890 C(0xb278, STCKE, S, Z, 0, a2, 0, 0, stcke, 0)
Richard Hendersondd3eb7b2012-08-24 15:36:58 -0700891/* STORE CLOCK COMPARATOR */
892 C(0xb207, STCKC, S, Z, la2, 0, new, m1_64, stckc, 0)
Richard Henderson504488b2012-08-22 14:17:58 -0700893/* STORE CONTROL */
894 C(0xb600, STCTL, RS_a, Z, 0, a2, 0, 0, stctl, 0)
Richard Henderson3e398cf2012-09-02 10:12:48 -0700895 C(0xeb25, STCTG, RSY_a, Z, 0, a2, 0, 0, stctg, 0)
Richard Henderson411fea32012-08-24 16:18:33 -0700896/* STORE CPU ADDRESS */
897 C(0xb212, STAP, S, Z, la2, 0, new, m1_16, stap, 0)
Richard Henderson71bd6662012-09-05 10:21:47 -0700898/* STORE CPU ID */
899 C(0xb202, STIDP, S, Z, la2, 0, new, m1_64, stidp, 0)
Richard Hendersonc4f0a862012-08-24 15:47:26 -0700900/* STORE CPU TIMER */
901 C(0xb209, STPT, S, Z, la2, 0, new, m1_64, stpt, 0)
Richard Hendersonfc778b52012-08-27 10:58:59 -0700902/* STORE FACILITY LIST */
903 C(0xb2b1, STFL, S, Z, 0, 0, 0, 0, stfl, 0)
Richard Hendersone805a0d2012-08-24 16:11:32 -0700904/* STORE PREFIX */
905 C(0xb211, STPX, S, Z, la2, 0, new, m1_32, stpx, 0)
Richard Hendersond14b3e02012-08-27 10:43:38 -0700906/* STORE SYSTEM INFORMATION */
907 C(0xb27d, STSI, S, Z, 0, a2, 0, 0, stsi, 0)
Richard Henderson145cdb42012-08-22 11:08:40 -0700908/* STORE THEN AND SYSTEM MASK */
909 C(0xac00, STNSM, SI, Z, la1, 0, 0, 0, stnosm, 0)
910/* STORE THEN OR SYSTEM MASK */
911 C(0xad00, STOSM, SI, Z, la1, 0, 0, 0, stnosm, 0)
Richard Henderson204504e2012-08-27 09:45:38 -0700912/* STORE USING REAL ADDRESS */
913 C(0xb246, STURA, RRE, Z, r1_o, r2_o, 0, 0, stura, 0)
Richard Henderson9c3fd852013-09-20 13:04:28 -0700914 C(0xb925, STURG, RRE, Z, r1_o, r2_o, 0, 0, sturg, 0)
Richard Henderson112bf072012-08-22 15:15:59 -0700915/* TEST PROTECTION */
916 C(0xe501, TPROT, SSE, Z, la1, a2, 0, 0, tprot, 0)
Richard Henderson2c423fc2012-08-27 09:36:20 -0700917
Alexander Grafad8a4572015-06-15 17:57:09 +0200918/* CCW I/O Instructions */
919 C(0xb276, XSCH, S, Z, 0, 0, 0, 0, xsch, 0)
920 C(0xb230, CSCH, S, Z, 0, 0, 0, 0, csch, 0)
921 C(0xb231, HSCH, S, Z, 0, 0, 0, 0, hsch, 0)
922 C(0xb232, MSCH, S, Z, 0, insn, 0, 0, msch, 0)
923 C(0xb23b, RCHP, S, Z, 0, 0, 0, 0, rchp, 0)
924 C(0xb238, RSCH, S, Z, 0, 0, 0, 0, rsch, 0)
925 C(0xb233, SSCH, S, Z, 0, insn, 0, 0, ssch, 0)
926 C(0xb234, STSCH, S, Z, 0, insn, 0, 0, stsch, 0)
927 C(0xb235, TSCH, S, Z, 0, insn, 0, 0, tsch, 0)
Richard Henderson2c423fc2012-08-27 09:36:20 -0700928 /* ??? Not listed in PoO ninth edition, but there's a linux driver that
929 uses it: "A CHSC subchannel is usually present on LPAR only." */
Alexander Grafad8a4572015-06-15 17:57:09 +0200930 C(0xb25f, CHSC, RRE, Z, 0, insn, 0, 0, chsc, 0)
Richard Hendersond9a39922012-08-20 16:28:56 -0700931#endif /* CONFIG_USER_ONLY */