diff options
-rw-r--r-- | arch/s390/include/asm/dis.h | 13 | ||||
-rw-r--r-- | arch/s390/kernel/dis.c | 245 |
2 files changed, 249 insertions, 9 deletions
diff --git a/arch/s390/include/asm/dis.h b/arch/s390/include/asm/dis.h index 04a83f5773cd..60323c21938b 100644 --- a/arch/s390/include/asm/dis.h +++ b/arch/s390/include/asm/dis.h | |||
@@ -13,12 +13,13 @@ | |||
13 | #define OPERAND_FPR 0x2 /* Operand printed as %fx */ | 13 | #define OPERAND_FPR 0x2 /* Operand printed as %fx */ |
14 | #define OPERAND_AR 0x4 /* Operand printed as %ax */ | 14 | #define OPERAND_AR 0x4 /* Operand printed as %ax */ |
15 | #define OPERAND_CR 0x8 /* Operand printed as %cx */ | 15 | #define OPERAND_CR 0x8 /* Operand printed as %cx */ |
16 | #define OPERAND_DISP 0x10 /* Operand printed as displacement */ | 16 | #define OPERAND_VR 0x10 /* Operand printed as %vx */ |
17 | #define OPERAND_BASE 0x20 /* Operand printed as base register */ | 17 | #define OPERAND_DISP 0x20 /* Operand printed as displacement */ |
18 | #define OPERAND_INDEX 0x40 /* Operand printed as index register */ | 18 | #define OPERAND_BASE 0x40 /* Operand printed as base register */ |
19 | #define OPERAND_PCREL 0x80 /* Operand printed as pc-relative symbol */ | 19 | #define OPERAND_INDEX 0x80 /* Operand printed as index register */ |
20 | #define OPERAND_SIGNED 0x100 /* Operand printed as signed value */ | 20 | #define OPERAND_PCREL 0x100 /* Operand printed as pc-relative symbol */ |
21 | #define OPERAND_LENGTH 0x200 /* Operand printed as length (+1) */ | 21 | #define OPERAND_SIGNED 0x200 /* Operand printed as signed value */ |
22 | #define OPERAND_LENGTH 0x400 /* Operand printed as length (+1) */ | ||
22 | 23 | ||
23 | 24 | ||
24 | struct s390_operand { | 25 | struct s390_operand { |
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 993efe6a887c..f3762937dd82 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -60,6 +60,11 @@ enum { | |||
60 | A_28, /* Access reg. starting at position 28 */ | 60 | A_28, /* Access reg. starting at position 28 */ |
61 | C_8, /* Control reg. starting at position 8 */ | 61 | C_8, /* Control reg. starting at position 8 */ |
62 | C_12, /* Control reg. starting at position 12 */ | 62 | C_12, /* Control reg. starting at position 12 */ |
63 | V_8, /* Vector reg. starting at position 8, extension bit at 36 */ | ||
64 | V_12, /* Vector reg. starting at position 12, extension bit at 37 */ | ||
65 | V_16, /* Vector reg. starting at position 16, extension bit at 38 */ | ||
66 | V_32, /* Vector reg. starting at position 32, extension bit at 39 */ | ||
67 | W_12, /* Vector reg. at bit 12, extension at bit 37, used as index */ | ||
63 | B_16, /* Base register starting at position 16 */ | 68 | B_16, /* Base register starting at position 16 */ |
64 | B_32, /* Base register starting at position 32 */ | 69 | B_32, /* Base register starting at position 32 */ |
65 | X_12, /* Index register starting at position 12 */ | 70 | X_12, /* Index register starting at position 12 */ |
@@ -82,6 +87,8 @@ enum { | |||
82 | U8_24, /* 8 bit unsigned value starting at 24 */ | 87 | U8_24, /* 8 bit unsigned value starting at 24 */ |
83 | U8_32, /* 8 bit unsigned value starting at 32 */ | 88 | U8_32, /* 8 bit unsigned value starting at 32 */ |
84 | I8_8, /* 8 bit signed value starting at 8 */ | 89 | I8_8, /* 8 bit signed value starting at 8 */ |
90 | I8_16, /* 8 bit signed value starting at 16 */ | ||
91 | I8_24, /* 8 bit signed value starting at 24 */ | ||
85 | I8_32, /* 8 bit signed value starting at 32 */ | 92 | I8_32, /* 8 bit signed value starting at 32 */ |
86 | J12_12, /* PC relative offset at 12 */ | 93 | J12_12, /* PC relative offset at 12 */ |
87 | I16_16, /* 16 bit signed value starting at 16 */ | 94 | I16_16, /* 16 bit signed value starting at 16 */ |
@@ -96,6 +103,9 @@ enum { | |||
96 | U32_16, /* 32 bit unsigned value starting at 16 */ | 103 | U32_16, /* 32 bit unsigned value starting at 16 */ |
97 | M_16, /* 4 bit optional mask starting at 16 */ | 104 | M_16, /* 4 bit optional mask starting at 16 */ |
98 | M_20, /* 4 bit optional mask starting at 20 */ | 105 | M_20, /* 4 bit optional mask starting at 20 */ |
106 | M_24, /* 4 bit optional mask starting at 24 */ | ||
107 | M_28, /* 4 bit optional mask starting at 28 */ | ||
108 | M_32, /* 4 bit optional mask starting at 32 */ | ||
99 | RO_28, /* optional GPR starting at position 28 */ | 109 | RO_28, /* optional GPR starting at position 28 */ |
100 | }; | 110 | }; |
101 | 111 | ||
@@ -130,7 +140,7 @@ enum { | |||
130 | INSTR_RSY_RDRM, | 140 | INSTR_RSY_RDRM, |
131 | INSTR_RS_AARD, INSTR_RS_CCRD, INSTR_RS_R0RD, INSTR_RS_RRRD, | 141 | INSTR_RS_AARD, INSTR_RS_CCRD, INSTR_RS_R0RD, INSTR_RS_RRRD, |
132 | INSTR_RS_RURD, | 142 | INSTR_RS_RURD, |
133 | INSTR_RXE_FRRD, INSTR_RXE_RRRD, | 143 | INSTR_RXE_FRRD, INSTR_RXE_RRRD, INSTR_RXE_RRRDM, |
134 | INSTR_RXF_FRRDF, | 144 | INSTR_RXF_FRRDF, |
135 | INSTR_RXY_FRRD, INSTR_RXY_RRRD, INSTR_RXY_URRD, | 145 | INSTR_RXY_FRRD, INSTR_RXY_RRRD, INSTR_RXY_URRD, |
136 | INSTR_RX_FRRD, INSTR_RX_RRRD, INSTR_RX_URRD, | 146 | INSTR_RX_FRRD, INSTR_RX_RRRD, INSTR_RX_URRD, |
@@ -143,6 +153,17 @@ enum { | |||
143 | INSTR_SS_L0RDRD, INSTR_SS_LIRDRD, INSTR_SS_LLRDRD, INSTR_SS_RRRDRD, | 153 | INSTR_SS_L0RDRD, INSTR_SS_LIRDRD, INSTR_SS_LLRDRD, INSTR_SS_RRRDRD, |
144 | INSTR_SS_RRRDRD2, INSTR_SS_RRRDRD3, | 154 | INSTR_SS_RRRDRD2, INSTR_SS_RRRDRD3, |
145 | INSTR_S_00, INSTR_S_RD, | 155 | INSTR_S_00, INSTR_S_RD, |
156 | INSTR_VRI_V0IM, INSTR_VRI_V0I0, INSTR_VRI_V0IIM, INSTR_VRI_VVIM, | ||
157 | INSTR_VRI_VVV0IM, INSTR_VRI_VVV0I0, INSTR_VRI_VVIMM, | ||
158 | INSTR_VRR_VV00MMM, INSTR_VRR_VV000MM, INSTR_VRR_VV0000M, | ||
159 | INSTR_VRR_VV00000, INSTR_VRR_VVV0M0M, INSTR_VRR_VV00M0M, | ||
160 | INSTR_VRR_VVV000M, INSTR_VRR_VVV000V, INSTR_VRR_VVV0000, | ||
161 | INSTR_VRR_VVV0MMM, INSTR_VRR_VVV00MM, INSTR_VRR_VVVMM0V, | ||
162 | INSTR_VRR_VVVM0MV, INSTR_VRR_VVVM00V, INSTR_VRR_VRR0000, | ||
163 | INSTR_VRS_VVRDM, INSTR_VRS_VVRD0, INSTR_VRS_VRRDM, INSTR_VRS_VRRD0, | ||
164 | INSTR_VRS_RVRDM, | ||
165 | INSTR_VRV_VVRDM, INSTR_VRV_VWRDM, | ||
166 | INSTR_VRX_VRRDM, INSTR_VRX_VRRD0, | ||
146 | }; | 167 | }; |
147 | 168 | ||
148 | static const struct s390_operand operands[] = | 169 | static const struct s390_operand operands[] = |
@@ -168,6 +189,11 @@ static const struct s390_operand operands[] = | |||
168 | [A_28] = { 4, 28, OPERAND_AR }, | 189 | [A_28] = { 4, 28, OPERAND_AR }, |
169 | [C_8] = { 4, 8, OPERAND_CR }, | 190 | [C_8] = { 4, 8, OPERAND_CR }, |
170 | [C_12] = { 4, 12, OPERAND_CR }, | 191 | [C_12] = { 4, 12, OPERAND_CR }, |
192 | [V_8] = { 4, 8, OPERAND_VR }, | ||
193 | [V_12] = { 4, 12, OPERAND_VR }, | ||
194 | [V_16] = { 4, 16, OPERAND_VR }, | ||
195 | [V_32] = { 4, 32, OPERAND_VR }, | ||
196 | [W_12] = { 4, 12, OPERAND_INDEX | OPERAND_VR }, | ||
171 | [B_16] = { 4, 16, OPERAND_BASE | OPERAND_GPR }, | 197 | [B_16] = { 4, 16, OPERAND_BASE | OPERAND_GPR }, |
172 | [B_32] = { 4, 32, OPERAND_BASE | OPERAND_GPR }, | 198 | [B_32] = { 4, 32, OPERAND_BASE | OPERAND_GPR }, |
173 | [X_12] = { 4, 12, OPERAND_INDEX | OPERAND_GPR }, | 199 | [X_12] = { 4, 12, OPERAND_INDEX | OPERAND_GPR }, |
@@ -190,6 +216,11 @@ static const struct s390_operand operands[] = | |||
190 | [U8_24] = { 8, 24, 0 }, | 216 | [U8_24] = { 8, 24, 0 }, |
191 | [U8_32] = { 8, 32, 0 }, | 217 | [U8_32] = { 8, 32, 0 }, |
192 | [J12_12] = { 12, 12, OPERAND_PCREL }, | 218 | [J12_12] = { 12, 12, OPERAND_PCREL }, |
219 | [I8_8] = { 8, 8, OPERAND_SIGNED }, | ||
220 | [I8_16] = { 8, 16, OPERAND_SIGNED }, | ||
221 | [I8_24] = { 8, 24, OPERAND_SIGNED }, | ||
222 | [I8_32] = { 8, 32, OPERAND_SIGNED }, | ||
223 | [I16_32] = { 16, 32, OPERAND_SIGNED }, | ||
193 | [I16_16] = { 16, 16, OPERAND_SIGNED }, | 224 | [I16_16] = { 16, 16, OPERAND_SIGNED }, |
194 | [U16_16] = { 16, 16, 0 }, | 225 | [U16_16] = { 16, 16, 0 }, |
195 | [U16_32] = { 16, 32, 0 }, | 226 | [U16_32] = { 16, 32, 0 }, |
@@ -202,6 +233,9 @@ static const struct s390_operand operands[] = | |||
202 | [U32_16] = { 32, 16, 0 }, | 233 | [U32_16] = { 32, 16, 0 }, |
203 | [M_16] = { 4, 16, 0 }, | 234 | [M_16] = { 4, 16, 0 }, |
204 | [M_20] = { 4, 20, 0 }, | 235 | [M_20] = { 4, 20, 0 }, |
236 | [M_24] = { 4, 24, 0 }, | ||
237 | [M_28] = { 4, 28, 0 }, | ||
238 | [M_32] = { 4, 32, 0 }, | ||
205 | [RO_28] = { 4, 28, OPERAND_GPR } | 239 | [RO_28] = { 4, 28, OPERAND_GPR } |
206 | }; | 240 | }; |
207 | 241 | ||
@@ -283,6 +317,7 @@ static const unsigned char formats[][7] = { | |||
283 | [INSTR_RS_RURD] = { 0xff, R_8,U4_12,D_20,B_16,0,0 }, | 317 | [INSTR_RS_RURD] = { 0xff, R_8,U4_12,D_20,B_16,0,0 }, |
284 | [INSTR_RXE_FRRD] = { 0xff, F_8,D_20,X_12,B_16,0,0 }, | 318 | [INSTR_RXE_FRRD] = { 0xff, F_8,D_20,X_12,B_16,0,0 }, |
285 | [INSTR_RXE_RRRD] = { 0xff, R_8,D_20,X_12,B_16,0,0 }, | 319 | [INSTR_RXE_RRRD] = { 0xff, R_8,D_20,X_12,B_16,0,0 }, |
320 | [INSTR_RXE_RRRDM] = { 0xff, R_8,D_20,X_12,B_16,M_32,0 }, | ||
286 | [INSTR_RXF_FRRDF] = { 0xff, F_32,F_8,D_20,X_12,B_16,0 }, | 321 | [INSTR_RXF_FRRDF] = { 0xff, F_32,F_8,D_20,X_12,B_16,0 }, |
287 | [INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 }, | 322 | [INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 }, |
288 | [INSTR_RXY_RRRD] = { 0xff, R_8,D20_20,X_12,B_16,0,0 }, | 323 | [INSTR_RXY_RRRD] = { 0xff, R_8,D20_20,X_12,B_16,0,0 }, |
@@ -307,6 +342,37 @@ static const unsigned char formats[][7] = { | |||
307 | [INSTR_SS_RRRDRD] = { 0xff, D_20,R_8,B_16,D_36,B_32,R_12 }, | 342 | [INSTR_SS_RRRDRD] = { 0xff, D_20,R_8,B_16,D_36,B_32,R_12 }, |
308 | [INSTR_S_00] = { 0xff, 0,0,0,0,0,0 }, | 343 | [INSTR_S_00] = { 0xff, 0,0,0,0,0,0 }, |
309 | [INSTR_S_RD] = { 0xff, D_20,B_16,0,0,0,0 }, | 344 | [INSTR_S_RD] = { 0xff, D_20,B_16,0,0,0,0 }, |
345 | [INSTR_VRI_V0IM] = { 0xff, V_8,I16_16,M_32,0,0,0 }, | ||
346 | [INSTR_VRI_V0I0] = { 0xff, V_8,I16_16,0,0,0,0 }, | ||
347 | [INSTR_VRI_V0IIM] = { 0xff, V_8,I8_16,I8_24,M_32,0,0 }, | ||
348 | [INSTR_VRI_VVIM] = { 0xff, V_8,I16_16,V_12,M_32,0,0 }, | ||
349 | [INSTR_VRI_VVV0IM]= { 0xff, V_8,V_12,V_16,I8_24,M_32,0 }, | ||
350 | [INSTR_VRI_VVV0I0]= { 0xff, V_8,V_12,V_16,I8_24,0,0 }, | ||
351 | [INSTR_VRI_VVIMM] = { 0xff, V_8,V_12,I16_16,M_32,M_28,0 }, | ||
352 | [INSTR_VRR_VV00MMM]={ 0xff, V_8,V_12,M_32,M_28,M_24,0 }, | ||
353 | [INSTR_VRR_VV000MM]={ 0xff, V_8,V_12,M_32,M_28,0,0 }, | ||
354 | [INSTR_VRR_VV0000M]={ 0xff, V_8,V_12,M_32,0,0,0 }, | ||
355 | [INSTR_VRR_VV00000]={ 0xff, V_8,V_12,0,0,0,0 }, | ||
356 | [INSTR_VRR_VVV0M0M]={ 0xff, V_8,V_12,V_16,M_32,M_24,0 }, | ||
357 | [INSTR_VRR_VV00M0M]={ 0xff, V_8,V_12,M_32,M_24,0,0 }, | ||
358 | [INSTR_VRR_VVV000M]={ 0xff, V_8,V_12,V_16,M_32,0,0 }, | ||
359 | [INSTR_VRR_VVV000V]={ 0xff, V_8,V_12,V_16,V_32,0,0 }, | ||
360 | [INSTR_VRR_VVV0000]={ 0xff, V_8,V_12,V_16,0,0,0 }, | ||
361 | [INSTR_VRR_VVV0MMM]={ 0xff, V_8,V_12,V_16,M_32,M_28,M_24 }, | ||
362 | [INSTR_VRR_VVV00MM]={ 0xff, V_8,V_12,V_16,M_32,M_28,0 }, | ||
363 | [INSTR_VRR_VVVMM0V]={ 0xff, V_8,V_12,V_16,V_32,M_20,M_24 }, | ||
364 | [INSTR_VRR_VVVM0MV]={ 0xff, V_8,V_12,V_16,V_32,M_28,M_20 }, | ||
365 | [INSTR_VRR_VVVM00V]={ 0xff, V_8,V_12,V_16,V_32,M_20,0 }, | ||
366 | [INSTR_VRR_VRR0000]={ 0xff, V_8,R_12,R_16,0,0,0 }, | ||
367 | [INSTR_VRS_VVRDM] = { 0xff, V_8,V_12,D_20,B_16,M_32,0 }, | ||
368 | [INSTR_VRS_VVRD0] = { 0xff, V_8,V_12,D_20,B_16,0,0 }, | ||
369 | [INSTR_VRS_VRRDM] = { 0xff, V_8,R_12,D_20,B_16,M_32,0 }, | ||
370 | [INSTR_VRS_VRRD0] = { 0xff, V_8,R_12,D_20,B_16,0,0 }, | ||
371 | [INSTR_VRS_RVRDM] = { 0xff, R_8,V_12,D_20,B_16,M_32,0 }, | ||
372 | [INSTR_VRV_VVRDM] = { 0xff, V_8,V_12,D_20,B_16,M_32,0 }, | ||
373 | [INSTR_VRV_VWRDM] = { 0xff, V_8,D_20,W_12,B_16,M_32,0 }, | ||
374 | [INSTR_VRX_VRRDM] = { 0xff, V_8,D_20,X_12,B_16,M_32,0 }, | ||
375 | [INSTR_VRX_VRRD0] = { 0xff, V_8,D_20,X_12,B_16,0,0 }, | ||
310 | }; | 376 | }; |
311 | 377 | ||
312 | enum { | 378 | enum { |
@@ -381,6 +447,11 @@ enum { | |||
381 | LONG_INSN_MPCIFC, | 447 | LONG_INSN_MPCIFC, |
382 | LONG_INSN_STPCIFC, | 448 | LONG_INSN_STPCIFC, |
383 | LONG_INSN_PCISTB, | 449 | LONG_INSN_PCISTB, |
450 | LONG_INSN_VPOPCT, | ||
451 | LONG_INSN_VERLLV, | ||
452 | LONG_INSN_VESRAV, | ||
453 | LONG_INSN_VESRLV, | ||
454 | LONG_INSN_VSBCBI | ||
384 | }; | 455 | }; |
385 | 456 | ||
386 | static char *long_insn_name[] = { | 457 | static char *long_insn_name[] = { |
@@ -455,6 +526,11 @@ static char *long_insn_name[] = { | |||
455 | [LONG_INSN_MPCIFC] = "mpcifc", | 526 | [LONG_INSN_MPCIFC] = "mpcifc", |
456 | [LONG_INSN_STPCIFC] = "stpcifc", | 527 | [LONG_INSN_STPCIFC] = "stpcifc", |
457 | [LONG_INSN_PCISTB] = "pcistb", | 528 | [LONG_INSN_PCISTB] = "pcistb", |
529 | [LONG_INSN_VPOPCT] = "vpopct", | ||
530 | [LONG_INSN_VERLLV] = "verllv", | ||
531 | [LONG_INSN_VESRAV] = "vesrav", | ||
532 | [LONG_INSN_VESRLV] = "vesrlv", | ||
533 | [LONG_INSN_VSBCBI] = "vsbcbi", | ||
458 | }; | 534 | }; |
459 | 535 | ||
460 | static struct s390_insn opcode[] = { | 536 | static struct s390_insn opcode[] = { |
@@ -1369,6 +1445,150 @@ static struct s390_insn opcode_e5[] = { | |||
1369 | { "", 0, INSTR_INVALID } | 1445 | { "", 0, INSTR_INVALID } |
1370 | }; | 1446 | }; |
1371 | 1447 | ||
1448 | static struct s390_insn opcode_e7[] = { | ||
1449 | #ifdef CONFIG_64BIT | ||
1450 | { "lcbb", 0x27, INSTR_RXE_RRRDM }, | ||
1451 | { "vgef", 0x13, INSTR_VRV_VVRDM }, | ||
1452 | { "vgeg", 0x12, INSTR_VRV_VVRDM }, | ||
1453 | { "vgbm", 0x44, INSTR_VRI_V0I0 }, | ||
1454 | { "vgm", 0x46, INSTR_VRI_V0IIM }, | ||
1455 | { "vl", 0x06, INSTR_VRX_VRRD0 }, | ||
1456 | { "vlr", 0x56, INSTR_VRR_VV00000 }, | ||
1457 | { "vlrp", 0x05, INSTR_VRX_VRRDM }, | ||
1458 | { "vleb", 0x00, INSTR_VRX_VRRDM }, | ||
1459 | { "vleh", 0x01, INSTR_VRX_VRRDM }, | ||
1460 | { "vlef", 0x03, INSTR_VRX_VRRDM }, | ||
1461 | { "vleg", 0x02, INSTR_VRX_VRRDM }, | ||
1462 | { "vleib", 0x40, INSTR_VRI_V0IM }, | ||
1463 | { "vleih", 0x41, INSTR_VRI_V0IM }, | ||
1464 | { "vleif", 0x43, INSTR_VRI_V0IM }, | ||
1465 | { "vleig", 0x42, INSTR_VRI_V0IM }, | ||
1466 | { "vlgv", 0x21, INSTR_VRS_RVRDM }, | ||
1467 | { "vllez", 0x04, INSTR_VRX_VRRDM }, | ||
1468 | { "vlm", 0x36, INSTR_VRS_VVRD0 }, | ||
1469 | { "vlbb", 0x07, INSTR_VRX_VRRDM }, | ||
1470 | { "vlvg", 0x22, INSTR_VRS_VRRDM }, | ||
1471 | { "vlvgp", 0x62, INSTR_VRR_VRR0000 }, | ||
1472 | { "vll", 0x37, INSTR_VRS_VRRD0 }, | ||
1473 | { "vmrh", 0x61, INSTR_VRR_VVV000M }, | ||
1474 | { "vmrl", 0x60, INSTR_VRR_VVV000M }, | ||
1475 | { "vpk", 0x94, INSTR_VRR_VVV000M }, | ||
1476 | { "vpks", 0x97, INSTR_VRR_VVV0M0M }, | ||
1477 | { "vpkls", 0x95, INSTR_VRR_VVV0M0M }, | ||
1478 | { "vperm", 0x8c, INSTR_VRR_VVV000V }, | ||
1479 | { "vpdi", 0x84, INSTR_VRR_VVV000M }, | ||
1480 | { "vrep", 0x4d, INSTR_VRI_VVIM }, | ||
1481 | { "vrepi", 0x45, INSTR_VRI_V0IM }, | ||
1482 | { "vscef", 0x1b, INSTR_VRV_VWRDM }, | ||
1483 | { "vsceg", 0x1a, INSTR_VRV_VWRDM }, | ||
1484 | { "vsel", 0x8d, INSTR_VRR_VVV000V }, | ||
1485 | { "vseg", 0x5f, INSTR_VRR_VV0000M }, | ||
1486 | { "vst", 0x0e, INSTR_VRX_VRRD0 }, | ||
1487 | { "vsteb", 0x08, INSTR_VRX_VRRDM }, | ||
1488 | { "vsteh", 0x09, INSTR_VRX_VRRDM }, | ||
1489 | { "vstef", 0x0b, INSTR_VRX_VRRDM }, | ||
1490 | { "vsteg", 0x0a, INSTR_VRX_VRRDM }, | ||
1491 | { "vstm", 0x3e, INSTR_VRS_VVRD0 }, | ||
1492 | { "vstl", 0x3f, INSTR_VRS_VRRD0 }, | ||
1493 | { "vuph", 0xd7, INSTR_VRR_VV0000M }, | ||
1494 | { "vuplh", 0xd5, INSTR_VRR_VV0000M }, | ||
1495 | { "vupl", 0xd6, INSTR_VRR_VV0000M }, | ||
1496 | { "vupll", 0xd4, INSTR_VRR_VV0000M }, | ||
1497 | { "va", 0xf3, INSTR_VRR_VVV000M }, | ||
1498 | { "vacc", 0xf1, INSTR_VRR_VVV000M }, | ||
1499 | { "vac", 0xbb, INSTR_VRR_VVVM00V }, | ||
1500 | { "vaccc", 0xb9, INSTR_VRR_VVVM00V }, | ||
1501 | { "vn", 0x68, INSTR_VRR_VVV0000 }, | ||
1502 | { "vnc", 0x69, INSTR_VRR_VVV0000 }, | ||
1503 | { "vavg", 0xf2, INSTR_VRR_VVV000M }, | ||
1504 | { "vavgl", 0xf0, INSTR_VRR_VVV000M }, | ||
1505 | { "vcksm", 0x66, INSTR_VRR_VVV0000 }, | ||
1506 | { "vec", 0xdb, INSTR_VRR_VV0000M }, | ||
1507 | { "vecl", 0xd9, INSTR_VRR_VV0000M }, | ||
1508 | { "vceq", 0xf8, INSTR_VRR_VVV0M0M }, | ||
1509 | { "vch", 0xfb, INSTR_VRR_VVV0M0M }, | ||
1510 | { "vchl", 0xf9, INSTR_VRR_VVV0M0M }, | ||
1511 | { "vclz", 0x53, INSTR_VRR_VV0000M }, | ||
1512 | { "vctz", 0x52, INSTR_VRR_VV0000M }, | ||
1513 | { "vx", 0x6d, INSTR_VRR_VVV0000 }, | ||
1514 | { "vgfm", 0xb4, INSTR_VRR_VVV000M }, | ||
1515 | { "vgfma", 0xbc, INSTR_VRR_VVVM00V }, | ||
1516 | { "vlc", 0xde, INSTR_VRR_VV0000M }, | ||
1517 | { "vlp", 0xdf, INSTR_VRR_VV0000M }, | ||
1518 | { "vmx", 0xff, INSTR_VRR_VVV000M }, | ||
1519 | { "vmxl", 0xfd, INSTR_VRR_VVV000M }, | ||
1520 | { "vmn", 0xfe, INSTR_VRR_VVV000M }, | ||
1521 | { "vmnl", 0xfc, INSTR_VRR_VVV000M }, | ||
1522 | { "vmal", 0xaa, INSTR_VRR_VVVM00V }, | ||
1523 | { "vmae", 0xae, INSTR_VRR_VVVM00V }, | ||
1524 | { "vmale", 0xac, INSTR_VRR_VVVM00V }, | ||
1525 | { "vmah", 0xab, INSTR_VRR_VVVM00V }, | ||
1526 | { "vmalh", 0xa9, INSTR_VRR_VVVM00V }, | ||
1527 | { "vmao", 0xaf, INSTR_VRR_VVVM00V }, | ||
1528 | { "vmalo", 0xad, INSTR_VRR_VVVM00V }, | ||
1529 | { "vmh", 0xa3, INSTR_VRR_VVV000M }, | ||
1530 | { "vmlh", 0xa1, INSTR_VRR_VVV000M }, | ||
1531 | { "vml", 0xa2, INSTR_VRR_VVV000M }, | ||
1532 | { "vme", 0xa6, INSTR_VRR_VVV000M }, | ||
1533 | { "vmle", 0xa4, INSTR_VRR_VVV000M }, | ||
1534 | { "vmo", 0xa7, INSTR_VRR_VVV000M }, | ||
1535 | { "vmlo", 0xa5, INSTR_VRR_VVV000M }, | ||
1536 | { "vno", 0x6b, INSTR_VRR_VVV0000 }, | ||
1537 | { "vo", 0x6a, INSTR_VRR_VVV0000 }, | ||
1538 | { { 0, LONG_INSN_VPOPCT }, 0x50, INSTR_VRR_VV0000M }, | ||
1539 | { { 0, LONG_INSN_VERLLV }, 0x73, INSTR_VRR_VVV000M }, | ||
1540 | { "verll", 0x33, INSTR_VRS_VVRDM }, | ||
1541 | { "verim", 0x72, INSTR_VRI_VVV0IM }, | ||
1542 | { "veslv", 0x70, INSTR_VRR_VVV000M }, | ||
1543 | { "vesl", 0x30, INSTR_VRS_VVRDM }, | ||
1544 | { { 0, LONG_INSN_VESRAV }, 0x7a, INSTR_VRR_VVV000M }, | ||
1545 | { "vesra", 0x3a, INSTR_VRS_VVRDM }, | ||
1546 | { { 0, LONG_INSN_VESRLV }, 0x78, INSTR_VRR_VVV000M }, | ||
1547 | { "vesrl", 0x38, INSTR_VRS_VVRDM }, | ||
1548 | { "vsl", 0x74, INSTR_VRR_VVV0000 }, | ||
1549 | { "vslb", 0x75, INSTR_VRR_VVV0000 }, | ||
1550 | { "vsldb", 0x77, INSTR_VRI_VVV0I0 }, | ||
1551 | { "vsra", 0x7e, INSTR_VRR_VVV0000 }, | ||
1552 | { "vsrab", 0x7f, INSTR_VRR_VVV0000 }, | ||
1553 | { "vsrl", 0x7c, INSTR_VRR_VVV0000 }, | ||
1554 | { "vsrlb", 0x7d, INSTR_VRR_VVV0000 }, | ||
1555 | { "vs", 0xf7, INSTR_VRR_VVV000M }, | ||
1556 | { "vscb", 0xf5, INSTR_VRR_VVV000M }, | ||
1557 | { "vsb", 0xbf, INSTR_VRR_VVVM00V }, | ||
1558 | { { 0, LONG_INSN_VSBCBI }, 0xbd, INSTR_VRR_VVVM00V }, | ||
1559 | { "vsumg", 0x65, INSTR_VRR_VVV000M }, | ||
1560 | { "vsumq", 0x67, INSTR_VRR_VVV000M }, | ||
1561 | { "vsum", 0x64, INSTR_VRR_VVV000M }, | ||
1562 | { "vtm", 0xd8, INSTR_VRR_VV00000 }, | ||
1563 | { "vfae", 0x82, INSTR_VRR_VVV0M0M }, | ||
1564 | { "vfee", 0x80, INSTR_VRR_VVV0M0M }, | ||
1565 | { "vfene", 0x81, INSTR_VRR_VVV0M0M }, | ||
1566 | { "vistr", 0x5c, INSTR_VRR_VV00M0M }, | ||
1567 | { "vstrc", 0x8a, INSTR_VRR_VVVMM0V }, | ||
1568 | { "vfa", 0xe3, INSTR_VRR_VVV00MM }, | ||
1569 | { "wfc", 0xcb, INSTR_VRR_VV000MM }, | ||
1570 | { "wfk", 0xca, INSTR_VRR_VV000MM }, | ||
1571 | { "vfce", 0xe8, INSTR_VRR_VVV0MMM }, | ||
1572 | { "vfch", 0xeb, INSTR_VRR_VVV0MMM }, | ||
1573 | { "vfche", 0xea, INSTR_VRR_VVV0MMM }, | ||
1574 | { "vcdg", 0xc3, INSTR_VRR_VV00MMM }, | ||
1575 | { "vcdlg", 0xc1, INSTR_VRR_VV00MMM }, | ||
1576 | { "vcgd", 0xc2, INSTR_VRR_VV00MMM }, | ||
1577 | { "vclgd", 0xc0, INSTR_VRR_VV00MMM }, | ||
1578 | { "vfd", 0xe5, INSTR_VRR_VVV00MM }, | ||
1579 | { "vfi", 0xc7, INSTR_VRR_VV00MMM }, | ||
1580 | { "vlde", 0xc4, INSTR_VRR_VV000MM }, | ||
1581 | { "vled", 0xc5, INSTR_VRR_VV00MMM }, | ||
1582 | { "vfm", 0xe7, INSTR_VRR_VVV00MM }, | ||
1583 | { "vfma", 0x8f, INSTR_VRR_VVVM0MV }, | ||
1584 | { "vfms", 0x8e, INSTR_VRR_VVVM0MV }, | ||
1585 | { "vfpso", 0xcc, INSTR_VRR_VV00MMM }, | ||
1586 | { "vfsq", 0xce, INSTR_VRR_VV000MM }, | ||
1587 | { "vfs", 0xe2, INSTR_VRR_VVV00MM }, | ||
1588 | { "vftci", 0x4a, INSTR_VRI_VVIMM }, | ||
1589 | #endif | ||
1590 | }; | ||
1591 | |||
1372 | static struct s390_insn opcode_eb[] = { | 1592 | static struct s390_insn opcode_eb[] = { |
1373 | #ifdef CONFIG_64BIT | 1593 | #ifdef CONFIG_64BIT |
1374 | { "lmg", 0x04, INSTR_RSY_RRRD }, | 1594 | { "lmg", 0x04, INSTR_RSY_RRRD }, |
@@ -1552,16 +1772,17 @@ static struct s390_insn opcode_ed[] = { | |||
1552 | static unsigned int extract_operand(unsigned char *code, | 1772 | static unsigned int extract_operand(unsigned char *code, |
1553 | const struct s390_operand *operand) | 1773 | const struct s390_operand *operand) |
1554 | { | 1774 | { |
1775 | unsigned char *cp; | ||
1555 | unsigned int val; | 1776 | unsigned int val; |
1556 | int bits; | 1777 | int bits; |
1557 | 1778 | ||
1558 | /* Extract fragments of the operand byte for byte. */ | 1779 | /* Extract fragments of the operand byte for byte. */ |
1559 | code += operand->shift / 8; | 1780 | cp = code + operand->shift / 8; |
1560 | bits = (operand->shift & 7) + operand->bits; | 1781 | bits = (operand->shift & 7) + operand->bits; |
1561 | val = 0; | 1782 | val = 0; |
1562 | do { | 1783 | do { |
1563 | val <<= 8; | 1784 | val <<= 8; |
1564 | val |= (unsigned int) *code++; | 1785 | val |= (unsigned int) *cp++; |
1565 | bits -= 8; | 1786 | bits -= 8; |
1566 | } while (bits > 0); | 1787 | } while (bits > 0); |
1567 | val >>= -bits; | 1788 | val >>= -bits; |
@@ -1571,6 +1792,18 @@ static unsigned int extract_operand(unsigned char *code, | |||
1571 | if (operand->bits == 20 && operand->shift == 20) | 1792 | if (operand->bits == 20 && operand->shift == 20) |
1572 | val = (val & 0xff) << 12 | (val & 0xfff00) >> 8; | 1793 | val = (val & 0xff) << 12 | (val & 0xfff00) >> 8; |
1573 | 1794 | ||
1795 | /* Check for register extensions bits for vector registers. */ | ||
1796 | if (operand->flags & OPERAND_VR) { | ||
1797 | if (operand->shift == 8) | ||
1798 | val |= (code[4] & 8) << 1; | ||
1799 | else if (operand->shift == 12) | ||
1800 | val |= (code[4] & 4) << 2; | ||
1801 | else if (operand->shift == 16) | ||
1802 | val |= (code[4] & 2) << 3; | ||
1803 | else if (operand->shift == 32) | ||
1804 | val |= (code[4] & 1) << 4; | ||
1805 | } | ||
1806 | |||
1574 | /* Sign extend value if the operand is signed or pc relative. */ | 1807 | /* Sign extend value if the operand is signed or pc relative. */ |
1575 | if ((operand->flags & (OPERAND_SIGNED | OPERAND_PCREL)) && | 1808 | if ((operand->flags & (OPERAND_SIGNED | OPERAND_PCREL)) && |
1576 | (val & (1U << (operand->bits - 1)))) | 1809 | (val & (1U << (operand->bits - 1)))) |
@@ -1639,6 +1872,10 @@ struct s390_insn *find_insn(unsigned char *code) | |||
1639 | case 0xe5: | 1872 | case 0xe5: |
1640 | table = opcode_e5; | 1873 | table = opcode_e5; |
1641 | break; | 1874 | break; |
1875 | case 0xe7: | ||
1876 | table = opcode_e7; | ||
1877 | opfrag = code[5]; | ||
1878 | break; | ||
1642 | case 0xeb: | 1879 | case 0xeb: |
1643 | table = opcode_eb; | 1880 | table = opcode_eb; |
1644 | opfrag = code[5]; | 1881 | opfrag = code[5]; |
@@ -1734,6 +1971,8 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr) | |||
1734 | ptr += sprintf(ptr, "%%a%i", value); | 1971 | ptr += sprintf(ptr, "%%a%i", value); |
1735 | else if (operand->flags & OPERAND_CR) | 1972 | else if (operand->flags & OPERAND_CR) |
1736 | ptr += sprintf(ptr, "%%c%i", value); | 1973 | ptr += sprintf(ptr, "%%c%i", value); |
1974 | else if (operand->flags & OPERAND_VR) | ||
1975 | ptr += sprintf(ptr, "%%v%i", value); | ||
1737 | else if (operand->flags & OPERAND_PCREL) | 1976 | else if (operand->flags & OPERAND_PCREL) |
1738 | ptr += sprintf(ptr, "%lx", (signed int) value | 1977 | ptr += sprintf(ptr, "%lx", (signed int) value |
1739 | + addr); | 1978 | + addr); |