]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - opcodes/s390-opc.c
s390: Print base register 0 as "0" in disassembly
[thirdparty/binutils-gdb.git] / opcodes / s390-opc.c
CommitLineData
a85d7ed0 1/* s390-opc.c -- S390 opcode list
fd67aa11 2 Copyright (C) 2000-2024 Free Software Foundation, Inc.
a85d7ed0
NC
3 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
4
9b201bb5 5 This file is part of the GNU opcodes library.
a85d7ed0 6
9b201bb5 7 This library is free software; you can redistribute it and/or modify
a85d7ed0 8 it under the terms of the GNU General Public License as published by
9b201bb5
NC
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
a85d7ed0 11
9b201bb5
NC
12 It is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
a85d7ed0
NC
16
17 You should have received a copy of the GNU General Public License
9b201bb5
NC
18 along with this file; see the file COPYING. If not, write to the
19 Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
a85d7ed0
NC
21
22#include <stdio.h>
23#include "ansidecl.h"
24#include "opcode/s390.h"
25
26/* This file holds the S390 opcode table. The opcode table
27 includes almost all of the extended instruction mnemonics. This
28 permits the disassembler to use them, and simplifies the assembler
29 logic, at the cost of increasing the table size. The table is
30 strictly constant data, so the compiler should be able to put it in
31 the .text section.
32
33 This file also holds the operand table. All knowledge about
34 inserting operands into instructions and vice-versa is kept in this
35 file. */
36
eeafc619
JR
37/* Build-time checks are preferrable over runtime ones. Use this construct
38 in preference where possible. */
39#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
40
41#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
42
a85d7ed0
NC
43/* The operands table.
44 The fields are bits, shift, insert, extract, flags. */
45
46const struct s390_operand s390_operands[] =
47{
eeafc619 48#define UNUSED 0
a85d7ed0
NC
49 { 0, 0, 0 }, /* Indicates the end of the operand list */
50
5746fb46
AK
51/* General purpose register operands. */
52
eeafc619 53#define R_8 (UNUSED + 1) /* GPR starting at position 8 */
a85d7ed0 54 { 4, 8, S390_OPERAND_GPR },
eeafc619 55#define R_12 (R_8 + 1) /* GPR starting at position 12 */
355d475e 56 { 4, 12, S390_OPERAND_GPR },
eeafc619 57#define R_16 (R_12 + 1) /* GPR starting at position 16 */
355d475e 58 { 4, 16, S390_OPERAND_GPR },
eeafc619 59#define R_20 (R_16 + 1) /* GPR starting at position 20 */
355d475e 60 { 4, 20, S390_OPERAND_GPR },
eeafc619 61#define R_24 (R_20 + 1) /* GPR starting at position 24 */
355d475e 62 { 4, 24, S390_OPERAND_GPR },
eeafc619 63#define R_28 (R_24 + 1) /* GPR starting at position 28 */
355d475e 64 { 4, 28, S390_OPERAND_GPR },
2bf1f788
JR
65#define R_CP16_28 (R_28 + 1) /* GPR starting at position 28 */
66 { 4, 28, S390_OPERAND_GPR | S390_OPERAND_CP16 }, /* with a copy at pos 16 */
67#define R_32 (R_CP16_28+1) /* GPR starting at position 32 */
a85d7ed0
NC
68 { 4, 32, S390_OPERAND_GPR },
69
5e4b319c
AK
70/* General purpose register pair operands. */
71
eeafc619 72#define RE_8 (R_32 + 1) /* GPR starting at position 8 */
c8fa16ed 73 { 4, 8, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR },
eeafc619 74#define RE_12 (RE_8 + 1) /* GPR starting at position 12 */
c8fa16ed 75 { 4, 12, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR },
eeafc619 76#define RE_16 (RE_12 + 1) /* GPR starting at position 16 */
c8fa16ed 77 { 4, 16, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR },
eeafc619 78#define RE_20 (RE_16 + 1) /* GPR starting at position 20 */
c8fa16ed 79 { 4, 20, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR },
eeafc619 80#define RE_24 (RE_20 + 1) /* GPR starting at position 24 */
c8fa16ed 81 { 4, 24, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR },
eeafc619 82#define RE_28 (RE_24 + 1) /* GPR starting at position 28 */
c8fa16ed 83 { 4, 28, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR },
eeafc619 84#define RE_32 (RE_28 + 1) /* GPR starting at position 32 */
c8fa16ed 85 { 4, 32, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR },
5e4b319c 86
5746fb46
AK
87/* Floating point register operands. */
88
eeafc619 89#define F_8 (RE_32 + 1) /* FPR starting at position 8 */
a85d7ed0 90 { 4, 8, S390_OPERAND_FPR },
eeafc619 91#define F_12 (F_8 + 1) /* FPR starting at position 12 */
a85d7ed0 92 { 4, 12, S390_OPERAND_FPR },
eeafc619 93#define F_16 (F_12 + 1) /* FPR starting at position 16 */
a85d7ed0 94 { 4, 16, S390_OPERAND_FPR },
eeafc619 95#define F_24 (F_16 + 1) /* FPR starting at position 24 */
a85d7ed0 96 { 4, 24, S390_OPERAND_FPR },
eeafc619 97#define F_28 (F_24 + 1) /* FPR starting at position 28 */
a85d7ed0 98 { 4, 28, S390_OPERAND_FPR },
eeafc619 99#define F_32 (F_28 + 1) /* FPR starting at position 32 */
a85d7ed0
NC
100 { 4, 32, S390_OPERAND_FPR },
101
5e4b319c
AK
102/* Floating point register pair operands. */
103
eeafc619 104#define FE_8 (F_32 + 1) /* FPR starting at position 8 */
c8fa16ed 105 { 4, 8, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR },
eeafc619 106#define FE_12 (FE_8 + 1) /* FPR starting at position 12 */
c8fa16ed 107 { 4, 12, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR },
eeafc619 108#define FE_16 (FE_12 + 1) /* FPR starting at position 16 */
c8fa16ed 109 { 4, 16, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR },
eeafc619 110#define FE_24 (FE_16 + 1) /* FPR starting at position 24 */
c8fa16ed 111 { 4, 24, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR },
eeafc619 112#define FE_28 (FE_24 + 1) /* FPR starting at position 28 */
c8fa16ed 113 { 4, 28, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR },
eeafc619 114#define FE_32 (FE_28 + 1) /* FPR starting at position 32 */
c8fa16ed 115 { 4, 32, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR },
5e4b319c 116
1e2e8c52
AK
117/* Vector register operands. */
118
119/* For each of these operands and additional bit in the RXB operand is
120 needed. */
121
eeafc619 122#define V_8 (FE_32 + 1) /* Vector reg. starting at position 8 */
1e2e8c52 123 { 4, 8, S390_OPERAND_VR },
eeafc619 124#define V_12 (V_8 + 1) /* Vector reg. starting at position 12 */
1e2e8c52 125 { 4, 12, S390_OPERAND_VR },
eeafc619 126#define V_CP16_12 (V_12 + 1) /* Vector reg. starting at position 12 */
1e2e8c52 127 { 4, 12, S390_OPERAND_VR | S390_OPERAND_CP16 }, /* with a copy at pos 16 */
eeafc619 128#define V_16 (V_CP16_12+1) /* Vector reg. starting at position 16 */
1e2e8c52 129 { 4, 16, S390_OPERAND_VR },
eeafc619 130#define V_32 (V_16 + 1) /* Vector reg. starting at position 32 */
1e2e8c52 131 { 4, 32, S390_OPERAND_VR },
5e4b319c 132
5746fb46
AK
133/* Access register operands. */
134
eeafc619 135#define A_8 (V_32 + 1) /* Access reg. starting at position 8 */
a85d7ed0 136 { 4, 8, S390_OPERAND_AR },
eeafc619 137#define A_12 (A_8 + 1) /* Access reg. starting at position 12 */
a85d7ed0 138 { 4, 12, S390_OPERAND_AR },
eeafc619 139#define A_24 (A_12 + 1) /* Access reg. starting at position 24 */
a85d7ed0 140 { 4, 24, S390_OPERAND_AR },
eeafc619 141#define A_28 (A_24 + 1) /* Access reg. starting at position 28 */
a85d7ed0
NC
142 { 4, 28, S390_OPERAND_AR },
143
5746fb46
AK
144/* Control register operands. */
145
eeafc619 146#define C_8 (A_28 + 1) /* Control reg. starting at position 8 */
a85d7ed0 147 { 4, 8, S390_OPERAND_CR },
eeafc619 148#define C_12 (C_8 + 1) /* Control reg. starting at position 12 */
a85d7ed0
NC
149 { 4, 12, S390_OPERAND_CR },
150
5746fb46
AK
151/* Base register operands. */
152
eeafc619 153#define B_16 (C_12 + 1) /* Base register starting at position 16 */
5e4b319c 154 { 4, 16, S390_OPERAND_BASE | S390_OPERAND_GPR },
eeafc619 155#define B_32 (B_16 + 1) /* Base register starting at position 32 */
5e4b319c 156 { 4, 32, S390_OPERAND_BASE | S390_OPERAND_GPR },
a85d7ed0 157
eeafc619 158#define X_12 (B_32 + 1) /* Index register starting at position 12 */
5e4b319c 159 { 4, 12, S390_OPERAND_INDEX | S390_OPERAND_GPR },
a85d7ed0 160
eeafc619 161#define VX_12 (X_12+1) /* Vector index register starting at position 12 */
1e2e8c52
AK
162 { 4, 12, S390_OPERAND_INDEX | S390_OPERAND_VR },
163
5746fb46
AK
164/* Address displacement operands. */
165
eeafc619 166#define D_20 (VX_12 + 1) /* Displacement starting at position 20 */
355d475e 167 { 12, 20, S390_OPERAND_DISP },
eeafc619 168#define D_36 (D_20 + 1) /* Displacement starting at position 36 */
355d475e 169 { 12, 36, S390_OPERAND_DISP },
eeafc619 170#define D20_20 (D_36 + 1) /* 20 bit displacement starting at 20 */
5e4b319c 171 { 20, 20, S390_OPERAND_DISP | S390_OPERAND_SIGNED },
a85d7ed0 172
5746fb46
AK
173/* Length operands. */
174
eeafc619 175#define L4_8 (D20_20 + 1) /* 4 bit length starting at position 8 */
355d475e 176 { 4, 8, S390_OPERAND_LENGTH },
eeafc619 177#define L4_12 (L4_8 + 1) /* 4 bit length starting at position 12 */
a85d7ed0 178 { 4, 12, S390_OPERAND_LENGTH },
eeafc619 179#define L8_8 (L4_12 + 1) /* 8 bit length starting at position 8 */
355d475e 180 { 8, 8, S390_OPERAND_LENGTH },
a85d7ed0 181
5746fb46
AK
182/* Signed immediate operands. */
183
eeafc619 184#define I8_8 (L8_8 + 1) /* 8 bit signed value starting at 8 */
5746fb46 185 { 8, 8, S390_OPERAND_SIGNED },
eeafc619 186#define I8_32 (I8_8 + 1) /* 8 bit signed value starting at 32 */
5746fb46 187 { 8, 32, S390_OPERAND_SIGNED },
eeafc619 188#define I12_12 (I8_32 + 1) /* 12 bit signed value starting at 12 */
cfc72779 189 { 12, 12, S390_OPERAND_SIGNED },
eeafc619 190#define I16_16 (I12_12 + 1) /* 16 bit signed value starting at 16 */
5746fb46 191 { 16, 16, S390_OPERAND_SIGNED },
eeafc619 192#define I16_32 (I16_16 + 1) /* 16 bit signed value starting at 32 */
5746fb46 193 { 16, 32, S390_OPERAND_SIGNED },
eeafc619 194#define I24_24 (I16_32 + 1) /* 24 bit signed value starting at 24 */
cfc72779 195 { 24, 24, S390_OPERAND_SIGNED },
eeafc619 196#define I32_16 (I24_24 + 1) /* 32 bit signed value starting at 16 */
5746fb46
AK
197 { 32, 16, S390_OPERAND_SIGNED },
198
199/* Unsigned immediate operands. */
200
eeafc619 201#define U4_8 (I32_16 + 1) /* 4 bit unsigned value starting at 8 */
a85d7ed0 202 { 4, 8, 0 },
eeafc619 203#define U4_12 (U4_8 + 1) /* 4 bit unsigned value starting at 12 */
a85d7ed0 204 { 4, 12, 0 },
eeafc619 205#define U4_16 (U4_12 + 1) /* 4 bit unsigned value starting at 16 */
a85d7ed0 206 { 4, 16, 0 },
eeafc619 207#define U4_20 (U4_16 + 1) /* 4 bit unsigned value starting at 20 */
a85d7ed0 208 { 4, 20, 0 },
eeafc619 209#define U4_24 (U4_20 + 1) /* 4 bit unsigned value starting at 24 */
cfc72779 210 { 4, 24, 0 },
eeafc619 211#define U4_OR1_24 (U4_24 + 1) /* 4 bit unsigned value ORed with 1 */
08f3c711 212 { 4, 24, S390_OPERAND_OR1 }, /* starting at 24 */
eeafc619 213#define U4_OR2_24 (U4_OR1_24+1) /* 4 bit unsigned value ORed with 2 */
08f3c711 214 { 4, 24, S390_OPERAND_OR2 }, /* starting at 24 */
eeafc619 215#define U4_OR3_24 (U4_OR2_24+1) /* 4 bit unsigned value ORed with 3 */
08f3c711 216 { 4, 24, S390_OPERAND_OR1 | S390_OPERAND_OR2 }, /* starting at 24 */
eeafc619 217#define U4_28 (U4_OR3_24+1) /* 4 bit unsigned value starting at 28 */
cfc72779 218 { 4, 28, 0 },
eeafc619 219#define U4_OR8_28 (U4_28 + 1) /* 4 bit unsigned value ORed with 8 */
08f3c711 220 { 4, 28, S390_OPERAND_OR8 }, /* starting at 28 */
eeafc619 221#define U4_32 (U4_OR8_28+1) /* 4 bit unsigned value starting at 32 */
5746fb46 222 { 4, 32, 0 },
eeafc619 223#define U4_36 (U4_32 + 1) /* 4 bit unsigned value starting at 36 */
cfc72779 224 { 4, 36, 0 },
eeafc619 225#define U8_8 (U4_36 + 1) /* 8 bit unsigned value starting at 8 */
355d475e 226 { 8, 8, 0 },
2bf1f788
JR
227#define U6_18 (U8_8 + 1) /* 6 bit unsigned value starting at 18 */
228 { 6, 18, 0 },
229#define U8_16 (U6_18 + 1) /* 8 bit unsigned value starting at 16 */
a85d7ed0 230 { 8, 16, 0 },
2bf1f788
JR
231#define U5_27 (U8_16 + 1) /* 5 bit unsigned value starting at 27 */
232 { 5, 27, 0 },
233#define U6_26 (U5_27 + 1) /* 6 bit unsigned value starting at 26 */
c524d11e 234 { 6, 26, 0 },
eeafc619 235#define U8_24 (U6_26 + 1) /* 8 bit unsigned value starting at 24 */
5746fb46 236 { 8, 24, 0 },
eeafc619 237#define U8_28 (U8_24 + 1) /* 8 bit unsigned value starting at 28 */
64025b4e 238 { 8, 28, 0 },
eeafc619 239#define U8_32 (U8_28 + 1) /* 8 bit unsigned value starting at 32 */
5746fb46 240 { 8, 32, 0 },
eeafc619 241#define U12_16 (U8_32 + 1) /* 12 bit unsigned value starting at 16 */
1e2e8c52 242 { 12, 16, 0 },
eeafc619 243#define U16_16 (U12_16 + 1) /* 16 bit unsigned value starting at 16 */
355d475e 244 { 16, 16, 0 },
eeafc619 245#define U16_32 (U16_16 + 1) /* 16 bit unsigned value starting at 32 */
5746fb46 246 { 16, 32, 0 },
eeafc619 247#define U32_16 (U16_32 + 1) /* 32 bit unsigned value starting at 16 */
5746fb46
AK
248 { 32, 16, 0 },
249
250/* PC-relative address operands. */
251
eeafc619 252#define J12_12 (U32_16 + 1) /* 12 bit PC relative offset at 12 */
cfc72779 253 { 12, 12, S390_OPERAND_PCREL },
eeafc619 254#define J16_16 (J12_12 + 1) /* 16 bit PC relative offset at 16 */
355d475e 255 { 16, 16, S390_OPERAND_PCREL },
eeafc619 256#define J16_32 (J16_16 + 1) /* 16 bit PC relative offset at 32 */
cfc72779 257 { 16, 32, S390_OPERAND_PCREL },
eeafc619 258#define J24_24 (J16_32 + 1) /* 24 bit PC relative offset at 24 */
fb798c50 259 { 24, 24, S390_OPERAND_PCREL },
eeafc619 260#define J32_16 (J24_24 + 1) /* 32 bit PC relative offset at 16 */
ad101263 261 { 32, 16, S390_OPERAND_PCREL },
5746fb46 262
a85d7ed0
NC
263};
264
6c0c7d48
NC
265static inline void ATTRIBUTE_UNUSED
266unused_s390_operands_static_asserts (void)
eeafc619 267{
6c0c7d48 268 static_assert (ARRAY_SIZE (s390_operands) - 1 == J32_16);
eeafc619 269}
a85d7ed0
NC
270
271/* Macros used to form opcodes. */
272
b6849f55 273/* 8/16/48 bit opcodes. */
a85d7ed0 274#define OP8(x) { x, 0x00, 0x00, 0x00, 0x00, 0x00 }
82b66b23 275#define OP16(x) { x >> 8, x & 255, 0x00, 0x00, 0x00, 0x00 }
d660d565
AK
276#define OP32(x) { x >> 24, (x >> 16) & 255, (x >> 8) & 255, x & 255, \
277 0x00, 0x00 }
82b66b23 278#define OP48(x) { x >> 40, (x >> 32) & 255, (x >> 24) & 255, \
1e2e8c52 279 (x >> 16) & 255, (x >> 8) & 255, x & 255}
a85d7ed0 280
b6849f55
NC
281/* The new format of the INSTR_x_y and MASK_x_y defines is based
282 on the following rules:
283 1) the middle part of the definition (x in INSTR_x_y) is the official
284 names of the instruction format that you can find in the principals
285 of operation.
286 2) the last part of the definition (y in INSTR_x_y) gives you an idea
287 which operands the binary represenation of the instruction has.
288 The meanings of the letters in y are:
289 a - access register
290 c - control register
291 d - displacement, 12 bit
292 f - floating pointer register
cfc72779 293 fe - fpr extended operand, a valid floating pointer register pair
ad101263 294 i - signed integer, 4, 8, 16 or 32 bit
b6849f55
NC
295 l - length, 4 or 8 bit
296 p - pc relative
297 r - general purpose register
cfc72779 298 re - gpr extended operand, a valid general purpose register pair
2bf1f788 299 u - unsigned integer, 4, 6, 8, 16 or 32 bit
ad101263 300 m - mode field, 4 bit
b6849f55
NC
301 0 - operand skipped.
302 The order of the letters reflects the layout of the format in
303 storage and not the order of the paramaters of the instructions.
304 The use of the letters is not a 100% match with the PoP but it is
305 quite close.
306
307 For example the instruction "mvo" is defined in the PoP as follows:
1e2e8c52 308
b6849f55
NC
309 MVO D1(L1,B1),D2(L2,B2) [SS]
310
311 --------------------------------------
312 | 'F1' | L1 | L2 | B1 | D1 | B2 | D2 |
313 --------------------------------------
314 0 8 12 16 20 32 36
315
316 The instruction format is: INSTR_SS_LLRDRD / MASK_SS_LLRDRD. */
317
1e2e8c52
AK
318#define INSTR_E 2, { 0,0,0,0,0,0 } /* e.g. pr */
319#define INSTR_IE_UU 4, { U4_24,U4_28,0,0,0,0 } /* e.g. niai */
320#define INSTR_MII_UPP 6, { U4_8,J12_12,J24_24 } /* e.g. bprp */
321#define INSTR_RIE_RRP 6, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxhg */
322#define INSTR_RIE_RRPU 6, { R_8,R_12,U4_32,J16_16,0,0 } /* e.g. crj */
323#define INSTR_RIE_RRP0 6, { R_8,R_12,J16_16,0,0,0 } /* e.g. cgrjne */
324#define INSTR_RIE_RRI0 6, { R_8,R_12,I16_16,0,0,0 } /* e.g. ahik */
325#define INSTR_RIE_RUPI 6, { R_8,I8_32,U4_12,J16_16,0,0 } /* e.g. cij */
326#define INSTR_RIE_R0PI 6, { R_8,I8_32,J16_16,0,0,0 } /* e.g. cijne */
327#define INSTR_RIE_RUPU 6, { R_8,U8_32,U4_12,J16_16,0,0 } /* e.g. clij */
328#define INSTR_RIE_R0PU 6, { R_8,U8_32,J16_16,0,0,0 } /* e.g. clijne */
329#define INSTR_RIE_R0IU 6, { R_8,I16_16,U4_32,0,0,0 } /* e.g. cit */
330#define INSTR_RIE_R0I0 6, { R_8,I16_16,0,0,0,0 } /* e.g. citne */
331#define INSTR_RIE_R0UU 6, { R_8,U16_16,U4_32,0,0,0 } /* e.g. clfit */
332#define INSTR_RIE_R0U0 6, { R_8,U16_16,0,0,0,0 } /* e.g. clfitne */
6b1d7593 333#define INSTR_RIE_RUI0 6, { R_8,I16_16,U4_12,0,0,0 } /* e.g. lochi */
1e2e8c52 334#define INSTR_RIE_RRUUU 6, { R_8,R_12,U8_16,U8_24,U8_32,0 } /* e.g. rnsbg */
2bf1f788
JR
335#define INSTR_RIE_RRUUU2 6, { R_8,R_12,U8_16,U6_26,U8_32,0 } /* e.g. risbgz */
336#define INSTR_RIE_RRUUU3 6, { R_8,R_12,U8_16,U5_27,U8_32,0 } /* e.g. risbhg */
337#define INSTR_RIE_RRUUU4 6, { R_8,R_12,U6_18,U8_24,U8_32,0 } /* e.g. rnsbgt */
1e2e8c52
AK
338#define INSTR_RIL_0P 6, { J32_16,0,0,0,0 } /* e.g. jg */
339#define INSTR_RIL_RP 6, { R_8,J32_16,0,0,0,0 } /* e.g. brasl */
340#define INSTR_RIL_UP 6, { U4_8,J32_16,0,0,0,0 } /* e.g. brcl */
341#define INSTR_RIL_RI 6, { R_8,I32_16,0,0,0,0 } /* e.g. afi */
342#define INSTR_RIL_RU 6, { R_8,U32_16,0,0,0,0 } /* e.g. alfi */
343#define INSTR_RI_0P 4, { J16_16,0,0,0,0,0 } /* e.g. j */
344#define INSTR_RI_RI 4, { R_8,I16_16,0,0,0,0 } /* e.g. ahi */
345#define INSTR_RI_RP 4, { R_8,J16_16,0,0,0,0 } /* e.g. brct */
346#define INSTR_RI_RU 4, { R_8,U16_16,0,0,0,0 } /* e.g. tml */
347#define INSTR_RI_UP 4, { U4_8,J16_16,0,0,0,0 } /* e.g. brc */
348#define INSTR_RIS_RURDI 6, { R_8,I8_32,U4_12,D_20,B_16,0 } /* e.g. cib */
349#define INSTR_RIS_R0RDI 6, { R_8,I8_32,D_20,B_16,0,0 } /* e.g. cibne */
350#define INSTR_RIS_RURDU 6, { R_8,U8_32,U4_12,D_20,B_16,0 } /* e.g. clib */
351#define INSTR_RIS_R0RDU 6, { R_8,U8_32,D_20,B_16,0,0 } /* e.g. clibne*/
352#define INSTR_RRE_00 4, { 0,0,0,0,0,0 } /* e.g. palb */
353#define INSTR_RRE_0R 4, { R_28,0,0,0,0,0 } /* e.g. tb */
354#define INSTR_RRE_AA 4, { A_24,A_28,0,0,0,0 } /* e.g. cpya */
355#define INSTR_RRE_AR 4, { A_24,R_28,0,0,0,0 } /* e.g. sar */
356#define INSTR_RRE_F0 4, { F_24,0,0,0,0,0 } /* e.g. lzer */
357#define INSTR_RRE_FE0 4, { FE_24,0,0,0,0,0 } /* e.g. lzxr */
358#define INSTR_RRE_FF 4, { F_24,F_28,0,0,0,0 } /* e.g. debr */
359#define INSTR_RRE_FEF 4, { FE_24,F_28,0,0,0,0 } /* e.g. lxdbr */
360#define INSTR_RRE_FFE 4, { F_24,FE_28,0,0,0,0 } /* e.g. lexr */
361#define INSTR_RRE_FEFE 4, { FE_24,FE_28,0,0,0,0 } /* e.g. dxr */
362#define INSTR_RRE_R0 4, { R_24,0,0,0,0,0 } /* e.g. ipm */
363#define INSTR_RRE_RA 4, { R_24,A_28,0,0,0,0 } /* e.g. ear */
364#define INSTR_RRE_RF 4, { R_24,F_28,0,0,0,0 } /* e.g. lgdr */
365#define INSTR_RRE_RFE 4, { R_24,FE_28,0,0,0,0 } /* e.g. csxtr */
366#define INSTR_RRE_RR 4, { R_24,R_28,0,0,0,0 } /* e.g. lura */
367#define INSTR_RRE_RER 4, { RE_24,R_28,0,0,0,0 } /* e.g. tre */
368#define INSTR_RRE_RERE 4, { RE_24,RE_28,0,0,0,0 } /* e.g. cuse */
369#define INSTR_RRE_FR 4, { F_24,R_28,0,0,0,0 } /* e.g. ldgr */
370#define INSTR_RRE_FER 4, { FE_24,R_28,0,0,0,0 } /* e.g. cxfbr */
371#define INSTR_RRF_F0FF 4, { F_16,F_24,F_28,0,0,0 } /* e.g. madbr */
372#define INSTR_RRF_FE0FF 4, { F_16,F_24,F_28,0,0,0 } /* e.g. myr */
373#define INSTR_RRF_F0FF2 4, { F_24,F_16,F_28,0,0,0 } /* e.g. cpsdr */
374#define INSTR_RRF_F0FR 4, { F_24,F_16,R_28,0,0,0 } /* e.g. iedtr */
375#define INSTR_RRF_FE0FER 4, { FE_24,FE_16,R_28,0,0,0 } /* e.g. iextr */
376#define INSTR_RRF_FUFF 4, { F_24,F_16,F_28,U4_20,0,0 } /* e.g. didbr */
377#define INSTR_RRF_FEUFEFE 4, { FE_24,FE_16,FE_28,U4_20,0,0 } /* e.g. qaxtr */
378#define INSTR_RRF_FUFF2 4, { F_24,F_28,F_16,U4_20,0,0 } /* e.g. adtra */
379#define INSTR_RRF_FEUFEFE2 4, { FE_24,FE_28,FE_16,U4_20,0,0 } /* e.g. axtra */
ffc61c5d 380#define INSTR_RRF_RURR 4, { R_24,R_28,R_16,U4_20,0,0 } /* e.g. ipte */
1e2e8c52
AK
381#define INSTR_RRF_RURR2 4, { R_24,R_16,R_28,U4_20,0,0 } /* e.g. lptea */
382#define INSTR_RRF_R0RR 4, { R_24,R_16,R_28,0,0,0 } /* e.g. idte */
383#define INSTR_RRF_R0RR2 4, { R_24,R_28,R_16,0,0,0 } /* e.g. ark */
c54a6211 384#define INSTR_RRF_R0RER 4, { RE_24,R_28,R_16,0,0,0 } /* e.g. mgrk */
fc60b8c8 385#define INSTR_RRF_R0RR3 4, { R_24,R_28,R_16,0,0,0 } /* e.g. selrz */
2bf1f788 386#define INSTR_RRF_R0RR4 4, { R_24,R_CP16_28,0,0,0,0 } /* e.g. notr */
1e2e8c52
AK
387#define INSTR_RRF_U0FF 4, { F_24,U4_16,F_28,0,0,0 } /* e.g. fidbr */
388#define INSTR_RRF_U0FEFE 4, { FE_24,U4_16,FE_28,0,0,0 } /* e.g. fixbr */
389#define INSTR_RRF_U0RF 4, { R_24,U4_16,F_28,0,0,0 } /* e.g. cfebr */
390#define INSTR_RRF_U0RFE 4, { R_24,U4_16,FE_28,0,0,0 } /* e.g. cfxbr */
391#define INSTR_RRF_UUFF 4, { F_24,U4_16,F_28,U4_20,0,0 } /* e.g. fidtr */
392#define INSTR_RRF_UUFFE 4, { F_24,U4_16,FE_28,U4_20,0,0 } /* e.g. ldxtr */
393#define INSTR_RRF_UUFEFE 4, { FE_24,U4_16,FE_28,U4_20,0,0 } /* e.g. fixtr */
394#define INSTR_RRF_0UFF 4, { F_24,F_28,U4_20,0,0,0 } /* e.g. ldetr */
395#define INSTR_RRF_0UFEF 4, { FE_24,F_28,U4_20,0,0,0 } /* e.g. lxdtr */
396#define INSTR_RRF_FFRU 4, { F_24,F_16,R_28,U4_20,0,0 } /* e.g. rrdtr */
397#define INSTR_RRF_FEFERU 4, { FE_24,FE_16,R_28,U4_20,0,0 } /* e.g. rrxtr */
398#define INSTR_RRF_U0RR 4, { R_24,R_28,U4_16,0,0,0 } /* e.g. sske */
399#define INSTR_RRF_U0RER 4, { RE_24,R_28,U4_16,0,0,0 } /* e.g. trte */
c46eb7b8 400#define INSTR_RRF_U0RERE 4, { RE_24,RE_28,U4_16,0,0,0 } /* e.g. cu24 */
1e2e8c52 401#define INSTR_RRF_00RR 4, { R_24,R_28,0,0,0,0 } /* e.g. clrtne */
ca87ae74
AK
402#define INSTR_RRF_0URF 4, { R_24,F_28,U4_20,0,0,0 } /* e.g. csdtr */
403#define INSTR_RRF_0UREFE 4, { RE_24,FE_28,U4_20,0,0,0 } /* e.g. csxtr */
1e2e8c52
AK
404#define INSTR_RRF_UUFR 4, { F_24,U4_16,R_28,U4_20,0,0 } /* e.g. cdgtra */
405#define INSTR_RRF_UUFER 4, { FE_24,U4_16,R_28,U4_20,0,0 } /* e.g. cxfbra */
406#define INSTR_RRF_UURF 4, { R_24,U4_16,F_28,U4_20,0,0 } /* e.g. cgdtra */
407#define INSTR_RRF_UURFE 4, { R_24,U4_16,FE_28,U4_20,0,0 } /* e.g. cfxbra */
408#define INSTR_RR_0R 2, { R_12, 0,0,0,0,0 } /* e.g. br */
409#define INSTR_RR_FF 2, { F_8,F_12,0,0,0,0 } /* e.g. adr */
410#define INSTR_RR_FEF 2, { FE_8,F_12,0,0,0,0 } /* e.g. mxdr */
411#define INSTR_RR_FFE 2, { F_8,FE_12,0,0,0,0 } /* e.g. ldxr */
412#define INSTR_RR_FEFE 2, { FE_8,FE_12,0,0,0,0 } /* e.g. axr */
413#define INSTR_RR_R0 2, { R_8, 0,0,0,0,0 } /* e.g. spm */
414#define INSTR_RR_RR 2, { R_8,R_12,0,0,0,0 } /* e.g. lr */
415#define INSTR_RR_RER 2, { RE_8,R_12,0,0,0,0 } /* e.g. dr */
416#define INSTR_RR_U0 2, { U8_8, 0,0,0,0,0 } /* e.g. svc */
417#define INSTR_RR_UR 2, { U4_8,R_12,0,0,0,0 } /* e.g. bcr */
418#define INSTR_RRR_F0FF 4, { F_24,F_28,F_16,0,0,0 } /* e.g. ddtr */
419#define INSTR_RRR_FE0FEFE 4, { FE_24,FE_28,FE_16,0,0,0 } /* e.g. axtr */
420#define INSTR_RRS_RRRDU 6, { R_8,R_12,U4_32,D_20,B_16 } /* e.g. crb */
421#define INSTR_RRS_RRRD0 6, { R_8,R_12,D_20,B_16,0 } /* e.g. crbne */
422#define INSTR_RSE_RRRD 6, { R_8,R_12,D_20,B_16,0,0 } /* e.g. lmh */
423#define INSTR_RSE_RERERD 6, { RE_8,RE_12,D_20,B_16,0,0 } /* e.g. mvclu */
424#define INSTR_RSE_CCRD 6, { C_8,C_12,D_20,B_16,0,0 } /* e.g. stctg */
425#define INSTR_RSE_RURD 6, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icmh */
426#define INSTR_RSL_R0RD 6, { D_20,L4_8,B_16,0,0,0 } /* e.g. tp */
427#define INSTR_RSL_LRDFU 6, { F_32,D_20,L8_8,B_16,U4_36,0 } /* e.g. cdzt */
428#define INSTR_RSL_LRDFEU 6, { FE_32,D_20,L8_8,B_16,U4_36,0 } /* e.g. cxzt */
429#define INSTR_RSI_RRP 4, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxh */
430#define INSTR_RSY_RRRD 6, { R_8,R_12,D20_20,B_16,0,0 } /* e.g. stmy */
431#define INSTR_RSY_RERERD 6, { RE_8,RE_12,D20_20,B_16,0,0 } /* e.g. cdsy */
432#define INSTR_RSY_RURD 6, { R_8,U4_12,D20_20,B_16,0,0 } /* e.g. icmh */
433#define INSTR_RSY_RURD2 6, { R_8,D20_20,B_16,U4_12,0,0 } /* e.g. loc */
434#define INSTR_RSY_R0RD 6, { R_8,D20_20,B_16,0,0,0 } /* e.g. locne */
435#define INSTR_RSY_AARD 6, { A_8,A_12,D20_20,B_16,0,0 } /* e.g. lamy */
436#define INSTR_RSY_CCRD 6, { C_8,C_12,D20_20,B_16,0,0 } /* e.g. stctg */
437#define INSTR_RS_AARD 4, { A_8,A_12,D_20,B_16,0,0 } /* e.g. lam */
438#define INSTR_RS_CCRD 4, { C_8,C_12,D_20,B_16,0,0 } /* e.g. lctl */
439#define INSTR_RS_R0RD 4, { R_8,D_20,B_16,0,0,0 } /* e.g. sll */
440#define INSTR_RS_RE0RD 4, { RE_8,D_20,B_16,0,0,0 } /* e.g. slda */
441#define INSTR_RS_RRRD 4, { R_8,R_12,D_20,B_16,0,0 } /* e.g. cs */
442#define INSTR_RS_RERERD 4, { RE_8,RE_12,D_20,B_16,0,0 } /* e.g. cds */
443#define INSTR_RS_RURD 4, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icm */
444#define INSTR_RXE_FRRD 6, { F_8,D_20,X_12,B_16,0,0 } /* e.g. adb */
445#define INSTR_RXE_FERRD 6, { FE_8,D_20,X_12,B_16,0,0 } /* e.g. lxdb */
446#define INSTR_RXE_RRRD 6, { R_8,D_20,X_12,B_16,0,0 } /* e.g. lg */
447#define INSTR_RXE_RRRDU 6, { R_8,D_20,X_12,B_16,U4_32,0 } /* e.g. lcbb */
448#define INSTR_RXE_RERRD 6, { RE_8,D_20,X_12,B_16,0,0 } /* e.g. dsg */
449#define INSTR_RXF_FRRDF 6, { F_32,F_8,D_20,X_12,B_16,0 } /* e.g. madb */
450#define INSTR_RXF_FRRDFE 6, { FE_32,F_8,D_20,X_12,B_16,0 } /* e.g. my */
451#define INSTR_RXF_FERRDFE 6, { FE_32,FE_8,D_20,X_12,B_16,0 } /* e.g. slxt */
452#define INSTR_RXF_RRRDR 6, { R_32,R_8,D_20,X_12,B_16,0 } /* e.g. .insn */
453#define INSTR_RXY_RRRD 6, { R_8,D20_20,X_12,B_16,0,0 } /* e.g. ly */
454#define INSTR_RXY_RERRD 6, { RE_8,D20_20,X_12,B_16,0,0 } /* e.g. dsg */
455#define INSTR_RXY_FRRD 6, { F_8,D20_20,X_12,B_16,0,0 } /* e.g. ley */
456#define INSTR_RXY_URRD 6, { U4_8,D20_20,X_12,B_16,0,0 } /* e.g. pfd */
64025b4e 457#define INSTR_RXY_0RRD 6, { D20_20,X_12,B_16,0,0 } /* e.g. bic */
1e2e8c52
AK
458#define INSTR_RX_0RRD 4, { D_20,X_12,B_16,0,0,0 } /* e.g. be */
459#define INSTR_RX_FRRD 4, { F_8,D_20,X_12,B_16,0,0 } /* e.g. ae */
460#define INSTR_RX_FERRD 4, { FE_8,D_20,X_12,B_16,0,0 } /* e.g. mxd */
461#define INSTR_RX_RRRD 4, { R_8,D_20,X_12,B_16,0,0 } /* e.g. l */
462#define INSTR_RX_RERRD 4, { RE_8,D_20,X_12,B_16,0,0 } /* e.g. d */
463#define INSTR_RX_URRD 4, { U4_8,D_20,X_12,B_16,0,0 } /* e.g. bc */
ee6767da 464#define INSTR_SI_RD 4, { D_20,B_16,0,0,0,0 } /* e.g. lpsw */
1e2e8c52 465#define INSTR_SI_URD 4, { D_20,B_16,U8_8,0,0,0 } /* e.g. cli */
a164bbda 466#define INSTR_SIY_RD 6, { D20_20,B_16,0,0,0,0 } /* e.g. lpswey*/
1e2e8c52
AK
467#define INSTR_SIY_URD 6, { D20_20,B_16,U8_8,0,0,0 } /* e.g. tmy */
468#define INSTR_SIY_IRD 6, { D20_20,B_16,I8_8,0,0,0 } /* e.g. asi */
469#define INSTR_SIL_RDI 6, { D_20,B_16,I16_32,0,0,0 } /* e.g. chhsi */
470#define INSTR_SIL_RDU 6, { D_20,B_16,U16_32,0,0,0 } /* e.g. clfhsi */
471#define INSTR_SMI_U0RDP 6, { U4_8,J16_32,D_20,B_16,0,0 } /* e.g. bpp */
472#define INSTR_SSE_RDRD 6, { D_20,B_16,D_36,B_32,0,0 } /* e.g. mvcdk */
473#define INSTR_SS_L0RDRD 6, { D_20,L8_8,B_16,D_36,B_32,0 } /* e.g. mvc */
474#define INSTR_SS_L2RDRD 6, { D_20,B_16,D_36,L8_8,B_32,0 } /* e.g. pka */
475#define INSTR_SS_LIRDRD 6, { D_20,L4_8,B_16,D_36,B_32,U4_12 } /* e.g. srp */
476#define INSTR_SS_LLRDRD 6, { D_20,L4_8,B_16,D_36,L4_12,B_32 } /* e.g. pack */
477#define INSTR_SS_RRRDRD 6, { D_20,R_8,B_16,D_36,B_32,R_12 } /* e.g. mvck */
478#define INSTR_SS_RRRDRD2 6, { R_8,D_20,B_16,R_12,D_36,B_32 } /* e.g. plo */
479#define INSTR_SS_RRRDRD3 6, { R_8,R_12,D_20,B_16,D_36,B_32 } /* e.g. lmd */
480#define INSTR_SSF_RRDRD 6, { D_20,B_16,D_36,B_32,R_8,0 } /* e.g. mvcos */
481#define INSTR_SSF_RERDRD2 6, { RE_8,D_20,B_16,D_36,B_32,0 } /* e.g. lpd */
482#define INSTR_S_00 4, { 0,0,0,0,0,0 } /* e.g. hsch */
ee6767da 483#define INSTR_S_RD 4, { D_20,B_16,0,0,0,0 } /* e.g. stck */
1e2e8c52
AK
484#define INSTR_VRV_VVXRDU 6, { V_8,D_20,VX_12,B_16,U4_32,0 } /* e.g. vgef */
485#define INSTR_VRI_V0U 6, { V_8,U16_16,0,0,0,0 } /* e.g. vgbm */
486#define INSTR_VRI_V 6, { V_8,0,0,0,0,0 } /* e.g. vzero */
487#define INSTR_VRI_V0UUU 6, { V_8,U8_16,U8_24,U4_32,0,0 } /* e.g. vgm */
488#define INSTR_VRI_V0UU 6, { V_8,U8_16,U8_24,0,0,0 } /* e.g. vgmb */
64025b4e 489#define INSTR_VRI_V0UU2 6, { V_8,U16_16,U4_32,0,0,0 } /* e.g. vlip */
1e2e8c52
AK
490#define INSTR_VRI_VVUU 6, { V_8,V_12,U16_16,U4_32,0,0 } /* e.g. vrep */
491#define INSTR_VRI_VVU 6, { V_8,V_12,U16_16,0,0,0 } /* e.g. vrepb */
492#define INSTR_VRI_VVU2 6, { V_8,V_12,U12_16,0,0,0 } /* e.g. vftcidb */
493#define INSTR_VRI_V0IU 6, { V_8,I16_16,U4_32,0,0,0 } /* e.g. vrepi */
494#define INSTR_VRI_V0I 6, { V_8,I16_16,0,0,0,0 } /* e.g. vrepib */
495#define INSTR_VRI_VVV0UU 6, { V_8,V_12,V_16,U8_24,U4_32,0 } /* e.g. verim */
64025b4e 496#define INSTR_VRI_VVV0UU2 6, { V_8,V_12,V_16,U8_28,U4_24,0 } /* e.g. vap */
1e2e8c52
AK
497#define INSTR_VRI_VVV0U 6, { V_8,V_12,V_16,U8_24,0,0 } /* e.g. verimb*/
498#define INSTR_VRI_VVUUU 6, { V_8,V_12,U12_16,U4_32,U4_28,0 } /* e.g. vftci */
64025b4e
AK
499#define INSTR_VRI_VVUUU2 6, { V_8,V_12,U8_28,U8_16,U4_24,0 } /* e.g. vpsop */
500#define INSTR_VRI_VR0UU 6, { V_8,R_12,U8_28,U4_24,0,0 } /* e.g. vcvd */
1e2e8c52
AK
501#define INSTR_VRX_VRRD 6, { V_8,D_20,X_12,B_16,0,0 } /* e.g. vl */
502#define INSTR_VRX_VV 6, { V_8,V_12,0,0,0,0 } /* e.g. vlr */
64025b4e 503#define INSTR_VRX_VRRDU 6, { V_8,D_20,X_12,B_16,U4_32,0 } /* e.g. vlrep */
1e2e8c52
AK
504#define INSTR_VRS_RVRDU 6, { R_8,V_12,D_20,B_16,U4_32,0 } /* e.g. vlgv */
505#define INSTR_VRS_RVRD 6, { R_8,V_12,D_20,B_16,0,0 } /* e.g. vlgvb */
506#define INSTR_VRS_VVRDU 6, { V_8,V_12,D_20,B_16,U4_32,0 } /* e.g. verll */
507#define INSTR_VRS_VVRD 6, { V_8,V_12,D_20,B_16,0,0 } /* e.g. vlm */
508#define INSTR_VRS_VRRDU 6, { V_8,R_12,D_20,B_16,U4_32,0 } /* e.g. vlvg */
509#define INSTR_VRS_VRRD 6, { V_8,R_12,D_20,B_16,0,0 } /* e.g. vlvgb */
64025b4e
AK
510#define INSTR_VRS_RRDV 6, { V_32,R_12,D_20,B_16,0,0 } /* e.g. vlrlr */
511#define INSTR_VRR_0V 6, { V_12,0,0,0,0,0 } /* e.g. vtp */
1e2e8c52
AK
512#define INSTR_VRR_VRR 6, { V_8,R_12,R_16,0,0,0 } /* e.g. vlvgp */
513#define INSTR_VRR_VVV0U 6, { V_8,V_12,V_16,U4_32,0,0 } /* e.g. vmrh */
514#define INSTR_VRR_VVV0U0 6, { V_8,V_12,V_16,U4_24,0,0 } /* e.g. vfaeb */
515#define INSTR_VRR_VVV0U1 6, { V_8,V_12,V_16,U4_OR1_24,0,0 } /* e.g. vfaebs*/
516#define INSTR_VRR_VVV0U2 6, { V_8,V_12,V_16,U4_OR2_24,0,0 } /* e.g. vfaezb*/
517#define INSTR_VRR_VVV0U3 6, { V_8,V_12,V_16,U4_OR3_24,0,0 } /* e.g. vfaezbs*/
518#define INSTR_VRR_VVV 6, { V_8,V_12,V_16,0,0,0 } /* e.g. vmrhb */
519#define INSTR_VRR_VVV2 6, { V_8,V_CP16_12,0,0,0,0 } /* e.g. vnot */
520#define INSTR_VRR_VV0U 6, { V_8,V_12,U4_32,0,0,0 } /* e.g. vseg */
521#define INSTR_VRR_VV0U2 6, { V_8,V_12,U4_24,0,0,0 } /* e.g. vistrb*/
522#define INSTR_VRR_VV0UU 6, { V_8,V_12,U4_28,U4_24,0,0 } /* e.g. vcdgb */
3b78cfe1 523#define INSTR_VRR_VV0UU2 6, { V_8,V_12,U4_32,U4_28,0,0 } /* e.g. wfc */
1e2e8c52
AK
524#define INSTR_VRR_VV0UU8 6, { V_8,V_12,U4_OR8_28,U4_24,0,0 } /* e.g. wcdgb */
525#define INSTR_VRR_VV 6, { V_8,V_12,0,0,0,0 } /* e.g. vsegb */
526#define INSTR_VRR_VVVUU0V 6, { V_8,V_12,V_16,V_32,U4_20,U4_24 } /* e.g. vstrc */
527#define INSTR_VRR_VVVU0V 6, { V_8,V_12,V_16,V_32,U4_20,0 } /* e.g. vac */
528#define INSTR_VRR_VVVU0VB 6, { V_8,V_12,V_16,V_32,U4_24,0 } /* e.g. vstrcb*/
529#define INSTR_VRR_VVVU0VB1 6, { V_8,V_12,V_16,V_32,U4_OR1_24,0 } /* e.g. vstrcbs*/
530#define INSTR_VRR_VVVU0VB2 6, { V_8,V_12,V_16,V_32,U4_OR2_24,0 } /* e.g. vstrczb*/
531#define INSTR_VRR_VVVU0VB3 6, { V_8,V_12,V_16,V_32,U4_OR3_24,0 } /* e.g. vstrczbs*/
532#define INSTR_VRR_VVV0V 6, { V_8,V_12,V_16,V_32,0,0 } /* e.g. vacq */
533#define INSTR_VRR_VVV0U0U 6, { V_8,V_12,V_16,U4_32,U4_24,0 } /* e.g. vfae */
534#define INSTR_VRR_VVVV 6, { V_8,V_12,V_16,V_32,0,0 } /* e.g. vfmadb*/
535#define INSTR_VRR_VVV0UUU 6, { V_8,V_12,V_16,U4_32,U4_28,U4_24 }/* e.g. vfch */
536#define INSTR_VRR_VVV0UU 6, { V_8,V_12,V_16,U4_32,U4_28,0 } /* e.g. vfa */
537#define INSTR_VRR_VV0UUU 6, { V_8,V_12,U4_32,U4_28,U4_24,0 } /* e.g. vcdg */
538#define INSTR_VRR_VVVU0UV 6, { V_8,V_12,V_16,V_32,U4_28,U4_20 } /* e.g. vfma */
539#define INSTR_VRR_VV0U0U 6, { V_8,V_12,U4_32,U4_24,0,0 } /* e.g. vistr */
64025b4e
AK
540#define INSTR_VRR_0VV0U 6, { V_12,V_16,U4_24,0,0,0 } /* e.g. vcp */
541#define INSTR_VRR_RV0U 6, { R_8,V_12,U4_24,0,0,0 } /* e.g. vcvb */
fc60b8c8 542#define INSTR_VRR_RV0UU 6, { R_8,V_12,U4_24,U4_28,0,0 } /* e.g. vcvb */
64025b4e 543#define INSTR_VSI_URDV 6, { V_32,D_20,B_16,U8_8,0,0 } /* e.g. vlrl */
1e2e8c52
AK
544
545#define MASK_E { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
546#define MASK_IE_UU { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
547#define MASK_MII_UPP { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
548#define MASK_RIE_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
549#define MASK_RIE_RRPU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
550#define MASK_RIE_RRP0 { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
551#define MASK_RIE_RRI0 { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
552#define MASK_RIE_RUPI { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
9c1c2a0b 553#define MASK_RIE_R0PI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
1e2e8c52 554#define MASK_RIE_RUPU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
9c1c2a0b 555#define MASK_RIE_R0PU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
1e2e8c52
AK
556#define MASK_RIE_R0IU { 0xff, 0x0f, 0x00, 0x00, 0x0f, 0xff }
557#define MASK_RIE_R0I0 { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff }
558#define MASK_RIE_R0UU { 0xff, 0x0f, 0x00, 0x00, 0x0f, 0xff }
559#define MASK_RIE_R0U0 { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff }
6b1d7593 560#define MASK_RIE_RUI0 { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
1e2e8c52 561#define MASK_RIE_RRUUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
c524d11e 562#define MASK_RIE_RRUUU2 { 0xff, 0x00, 0x00, 0xc0, 0x00, 0xff }
2bf1f788
JR
563#define MASK_RIE_RRUUU3 { 0xff, 0x00, 0x00, 0xe0, 0x00, 0xff }
564#define MASK_RIE_RRUUU4 { 0xff, 0x00, 0xc0, 0x00, 0x00, 0xff }
1e2e8c52
AK
565#define MASK_RIL_0P { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
566#define MASK_RIL_RP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
567#define MASK_RIL_UP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
568#define MASK_RIL_RI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
569#define MASK_RIL_RU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
570#define MASK_RI_0P { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
571#define MASK_RI_RI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
572#define MASK_RI_RP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
573#define MASK_RI_RU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
574#define MASK_RI_UP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
575#define MASK_RIS_RURDI { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
576#define MASK_RIS_R0RDI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
577#define MASK_RIS_RURDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
578#define MASK_RIS_R0RDU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
579#define MASK_RRE_00 { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
580#define MASK_RRE_0R { 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00 }
581#define MASK_RRE_AA { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
582#define MASK_RRE_AR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
583#define MASK_RRE_F0 { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
584#define MASK_RRE_FE0 { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
585#define MASK_RRE_FF { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
586#define MASK_RRE_FEF { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
587#define MASK_RRE_FFE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
588#define MASK_RRE_FEFE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
589#define MASK_RRE_R0 { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
590#define MASK_RRE_RA { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
591#define MASK_RRE_RF { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
592#define MASK_RRE_RFE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
593#define MASK_RRE_RR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
594#define MASK_RRE_RER { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
595#define MASK_RRE_RERE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
596#define MASK_RRE_FR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
597#define MASK_RRE_FER { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
598#define MASK_RRF_F0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
599#define MASK_RRF_FE0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
600#define MASK_RRF_F0FF2 { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
601#define MASK_RRF_F0FR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
602#define MASK_RRF_FE0FER { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
603#define MASK_RRF_FUFF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
604#define MASK_RRF_FEUFEFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
605#define MASK_RRF_FUFF2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
5e4b319c 606#define MASK_RRF_FEUFEFE2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
1e2e8c52
AK
607#define MASK_RRF_RURR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
608#define MASK_RRF_RURR2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
609#define MASK_RRF_R0RR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
610#define MASK_RRF_R0RR2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
c54a6211 611#define MASK_RRF_R0RER { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
fc60b8c8 612#define MASK_RRF_R0RR3 { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
2bf1f788 613#define MASK_RRF_R0RR4 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
1e2e8c52
AK
614#define MASK_RRF_U0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
615#define MASK_RRF_U0FEFE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
616#define MASK_RRF_U0RF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
617#define MASK_RRF_U0RFE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
618#define MASK_RRF_UUFF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
619#define MASK_RRF_UUFFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
620#define MASK_RRF_UUFEFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
621#define MASK_RRF_0UFF { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 }
622#define MASK_RRF_0UFEF { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 }
623#define MASK_RRF_FFRU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
624#define MASK_RRF_FEFERU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
625#define MASK_RRF_U0RR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
626#define MASK_RRF_U0RER { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
627#define MASK_RRF_U0RERE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
628#define MASK_RRF_00RR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
ca87ae74
AK
629#define MASK_RRF_0URF { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 }
630#define MASK_RRF_0UREFE { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 }
1e2e8c52
AK
631#define MASK_RRF_UUFR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
632#define MASK_RRF_UUFER { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
633#define MASK_RRF_UURF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
634#define MASK_RRF_UURFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
635#define MASK_RR_0R { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 }
636#define MASK_RR_FF { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
637#define MASK_RR_FEF { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
638#define MASK_RR_FFE { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
639#define MASK_RR_FEFE { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
640#define MASK_RR_R0 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
641#define MASK_RR_RR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
642#define MASK_RR_RER { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
643#define MASK_RR_U0 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
644#define MASK_RR_UR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
645#define MASK_RRR_F0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
646#define MASK_RRR_FE0FEFE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
647#define MASK_RRS_RRRDU { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff }
648#define MASK_RRS_RRRD0 { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
649#define MASK_RSE_RRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
650#define MASK_RSE_RERERD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
651#define MASK_RSE_CCRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
652#define MASK_RSE_RURD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
653#define MASK_RSL_R0RD { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff }
654#define MASK_RSL_LRDFU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
655#define MASK_RSL_LRDFEU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
656#define MASK_RSI_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
657#define MASK_RS_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
658#define MASK_RS_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
659#define MASK_RS_R0RD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
660#define MASK_RS_RE0RD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
661#define MASK_RS_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
662#define MASK_RS_RERERD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
663#define MASK_RS_RURD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
664#define MASK_RSY_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
665#define MASK_RSY_RERERD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
666#define MASK_RSY_RURD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
667#define MASK_RSY_RURD2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
668#define MASK_RSY_R0RD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
669#define MASK_RSY_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
670#define MASK_RSY_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
671#define MASK_RXE_FRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
672#define MASK_RXE_FERRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
673#define MASK_RXE_RRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
674#define MASK_RXE_RRRDU { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff }
675#define MASK_RXE_RERRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff }
676#define MASK_RXF_FRRDF { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff }
677#define MASK_RXF_FRRDFE { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff }
678#define MASK_RXF_FERRDFE { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff }
679#define MASK_RXF_RRRDR { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff }
680#define MASK_RXY_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
681#define MASK_RXY_RERRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
682#define MASK_RXY_FRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
683#define MASK_RXY_URRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
64025b4e 684#define MASK_RXY_0RRD { 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff }
1e2e8c52
AK
685#define MASK_RX_0RRD { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 }
686#define MASK_RX_FRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
687#define MASK_RX_FERRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
688#define MASK_RX_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
689#define MASK_RX_RERRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
690#define MASK_RX_URRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
ee6767da 691#define MASK_SI_RD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
1e2e8c52 692#define MASK_SI_URD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
a164bbda 693#define MASK_SIY_RD { 0xff, 0xff, 0x00, 0x00, 0x00, 0xff }
1e2e8c52
AK
694#define MASK_SIY_URD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
695#define MASK_SIY_IRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
696#define MASK_SIL_RDI { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
697#define MASK_SIL_RDU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
698#define MASK_SMI_U0RDP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
699#define MASK_SSE_RDRD { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
700#define MASK_SS_L0RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
701#define MASK_SS_L2RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
702#define MASK_SS_LIRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
703#define MASK_SS_LLRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
704#define MASK_SS_RRRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
705#define MASK_SS_RRRDRD2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
706#define MASK_SS_RRRDRD3 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
707#define MASK_SSF_RRDRD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
708#define MASK_SSF_RERDRD2 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
709#define MASK_S_00 { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
710#define MASK_S_RD { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
711#define MASK_VRV_VVXRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
712#define MASK_VRI_V0U { 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff }
713#define MASK_VRI_V { 0xff, 0x0f, 0xff, 0xff, 0xf0, 0xff }
714#define MASK_VRI_V0UUU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
715#define MASK_VRI_V0UU { 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff }
64025b4e 716#define MASK_VRI_V0UU2 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
1e2e8c52
AK
717#define MASK_VRI_VVUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
718#define MASK_VRI_VVU { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
719#define MASK_VRI_VVU2 { 0xff, 0x00, 0x00, 0x0f, 0xf0, 0xff }
720#define MASK_VRI_V0IU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff }
721#define MASK_VRI_V0I { 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff }
722#define MASK_VRI_VVV0UU { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff }
64025b4e 723#define MASK_VRI_VVV0UU2 { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff }
1e2e8c52
AK
724#define MASK_VRI_VVV0U { 0xff, 0x00, 0x0f, 0x00, 0xf0, 0xff }
725#define MASK_VRI_VVUUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
64025b4e
AK
726#define MASK_VRI_VVUUU2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
727#define MASK_VRI_VR0UU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff }
1e2e8c52
AK
728#define MASK_VRX_VRRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
729#define MASK_VRX_VV { 0xff, 0x00, 0xff, 0xff, 0xf0, 0xff }
730#define MASK_VRX_VRRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
731#define MASK_VRS_RVRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
732#define MASK_VRS_RVRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
733#define MASK_VRS_VVRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
734#define MASK_VRS_VVRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
735#define MASK_VRS_VRRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
736#define MASK_VRS_VRRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff }
64025b4e
AK
737#define MASK_VRS_RRDV { 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff }
738#define MASK_VRR_0V { 0xff, 0xf0, 0xff, 0xff, 0xf0, 0xff }
1e2e8c52
AK
739#define MASK_VRR_VRR { 0xff, 0x00, 0x0f, 0xff, 0xf0, 0xff }
740#define MASK_VRR_VVV0U { 0xff, 0x00, 0x0f, 0xff, 0x00, 0xff }
741#define MASK_VRR_VVV0U0 { 0xff, 0x00, 0x0f, 0x0f, 0xf0, 0xff }
742#define MASK_VRR_VVV0U1 { 0xff, 0x00, 0x0f, 0x1f, 0xf0, 0xff }
743#define MASK_VRR_VVV0U2 { 0xff, 0x00, 0x0f, 0x2f, 0xf0, 0xff }
744#define MASK_VRR_VVV0U3 { 0xff, 0x00, 0x0f, 0x3f, 0xf0, 0xff }
745#define MASK_VRR_VVV { 0xff, 0x00, 0x0f, 0xff, 0xf0, 0xff }
746#define MASK_VRR_VVV2 { 0xff, 0x00, 0x0f, 0xff, 0xf0, 0xff }
747#define MASK_VRR_VVV0V { 0xff, 0x00, 0x0f, 0xff, 0x00, 0xff }
748#define MASK_VRR_VV0U { 0xff, 0x00, 0xff, 0xff, 0x00, 0xff }
749#define MASK_VRR_VV0U2 { 0xff, 0x00, 0xff, 0x0f, 0xf0, 0xff }
750#define MASK_VRR_VV0UU { 0xff, 0x00, 0xff, 0x00, 0xf0, 0xff }
3b78cfe1 751#define MASK_VRR_VV0UU2 { 0xff, 0x00, 0xff, 0xf0, 0x00, 0xff }
1e2e8c52
AK
752#define MASK_VRR_VV0UU8 { 0xff, 0x00, 0xff, 0x08, 0xf0, 0xff }
753#define MASK_VRR_VV { 0xff, 0x00, 0xff, 0xff, 0xf0, 0xff }
754#define MASK_VRR_VVVUU0V { 0xff, 0x00, 0x00, 0x0f, 0x00, 0xff }
755#define MASK_VRR_VVVU0V { 0xff, 0x00, 0x00, 0xff, 0x00, 0xff }
756#define MASK_VRR_VVVU0VB { 0xff, 0x00, 0x0f, 0x0f, 0x00, 0xff }
757#define MASK_VRR_VVVU0VB1 { 0xff, 0x00, 0x0f, 0x1f, 0x00, 0xff }
758#define MASK_VRR_VVVU0VB2 { 0xff, 0x00, 0x0f, 0x2f, 0x00, 0xff }
759#define MASK_VRR_VVVU0VB3 { 0xff, 0x00, 0x0f, 0x3f, 0x00, 0xff }
760#define MASK_VRR_VVV0U0U { 0xff, 0x00, 0x0f, 0x0f, 0x00, 0xff }
761#define MASK_VRR_VVVV { 0xff, 0x00, 0x0f, 0xff, 0x00, 0xff }
762#define MASK_VRR_VVV0UUU { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff }
763#define MASK_VRR_VVV0UU { 0xff, 0x00, 0x0f, 0xf0, 0x00, 0xff }
764#define MASK_VRR_VV0UUU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff }
765#define MASK_VRR_VVVU0UV { 0xff, 0x00, 0x00, 0xf0, 0x00, 0xff }
766#define MASK_VRR_VV0U0U { 0xff, 0x00, 0xff, 0x0f, 0x00, 0xff }
64025b4e
AK
767#define MASK_VRR_0VV0U { 0xff, 0xf0, 0x0f, 0x0f, 0xf0, 0xff }
768#define MASK_VRR_RV0U { 0xff, 0x00, 0xff, 0x0f, 0xf0, 0xff }
fc60b8c8 769#define MASK_VRR_RV0UU { 0xff, 0x00, 0xff, 0x00, 0xf0, 0xff }
64025b4e
AK
770#define MASK_VSI_URDV { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
771
b6849f55
NC
772
773/* The opcode formats table (blueprints for .insn pseudo mnemonic). */
a85d7ed0 774
82b66b23
NC
775const struct s390_opcode s390_opformats[] =
776 {
dfa4ac97
JR
777 { "e", OP8(0x00LL), MASK_E, INSTR_E, 3, 0, 256, NULL },
778 { "ri", OP8(0x00LL), MASK_RI_RI, INSTR_RI_RI, 3, 0, 256, NULL },
779 { "rie", OP8(0x00LL), MASK_RIE_RRP, INSTR_RIE_RRP, 3, 0, 256, NULL },
780 { "ril", OP8(0x00LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 0, 256, NULL },
781 { "rilu", OP8(0x00LL), MASK_RIL_RU, INSTR_RIL_RU, 3, 0, 256, NULL },
782 { "ris", OP8(0x00LL), MASK_RIS_RURDI, INSTR_RIS_RURDI, 3, 6, 256, NULL },
783 { "rr", OP8(0x00LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 256, NULL },
784 { "rre", OP8(0x00LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 256, NULL },
785 { "rrf", OP8(0x00LL), MASK_RRF_RURR, INSTR_RRF_RURR, 3, 0, 256, NULL },
786 { "rrs", OP8(0x00LL), MASK_RRS_RRRDU, INSTR_RRS_RRRDU, 3, 6, 256, NULL },
787 { "rs", OP8(0x00LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 256, NULL },
788 { "rse", OP8(0x00LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 3, 0, 256, NULL },
789 { "rsi", OP8(0x00LL), MASK_RSI_RRP, INSTR_RSI_RRP, 3, 0, 256, NULL },
790 { "rsy", OP8(0x00LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 3, 3, 256, NULL },
791 { "rx", OP8(0x00LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 256, NULL },
792 { "rxe", OP8(0x00LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 0, 256, NULL },
793 { "rxf", OP8(0x00LL), MASK_RXF_RRRDR, INSTR_RXF_RRRDR, 3, 0, 256, NULL },
794 { "rxy", OP8(0x00LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 256, NULL },
795 { "s", OP8(0x00LL), MASK_S_RD, INSTR_S_RD, 3, 0, 256, NULL },
796 { "si", OP8(0x00LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 256, NULL },
797 { "siy", OP8(0x00LL), MASK_SIY_URD, INSTR_SIY_URD, 3, 3, 256, NULL },
798 { "sil", OP8(0x00LL), MASK_SIL_RDI, INSTR_SIL_RDI, 3, 6, 256, NULL },
799 { "ss", OP8(0x00LL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 256, NULL },
800 { "sse", OP8(0x00LL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0, 256, NULL },
801 { "ssf", OP8(0x00LL), MASK_SSF_RRDRD, INSTR_SSF_RRDRD, 3, 0, 256, NULL },
802 { "vrv", OP8(0x00LL), MASK_VRV_VVXRDU, INSTR_VRV_VVXRDU, 3, 9, 256, NULL },
803 { "vri", OP8(0x00LL), MASK_VRI_VVUUU, INSTR_VRI_VVUUU, 3, 9, 256, NULL },
804 { "vrx", OP8(0x00LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 3, 9, 256, NULL },
805 { "vrs", OP8(0x00LL), MASK_VRS_RVRDU, INSTR_VRS_RVRDU, 3, 9, 256, NULL },
806 { "vrr", OP8(0x00LL), MASK_VRR_VVV0UUU, INSTR_VRR_VVV0UUU, 3, 9, 256, NULL },
807 { "vsi", OP8(0x00LL), MASK_VSI_URDV, INSTR_VSI_URDV, 3, 10, 256, NULL },
a85d7ed0
NC
808};
809
810const int s390_num_opformats =
811 sizeof (s390_opformats) / sizeof (s390_opformats[0]);
812
b6849f55 813#include "s390-opc.tab"