summaryrefslogtreecommitdiff
path: root/opcodes/s390-dis.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2003-07-01 14:47:58 +0000
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2003-07-01 14:47:58 +0000
commit4fcd6c264204368c3b79bd0d9f21d79413d482e0 (patch)
tree7f5f40ebca136f9bf6371f457f510488a06a0e1f /opcodes/s390-dis.c
parent56b5bc03091acbb12012447aceff337030726fc2 (diff)
downloadbinutils-redhat-4fcd6c264204368c3b79bd0d9f21d79413d482e0.tar.gz
* s390-dis.c (s390_extract_operand): Add support for long displacements.
* s390-mkopc.c (s390_opcode_cpu_val): Add support for cpu type z990. * s390-opc.c (D20_20): Add define for 20 bit displacements. (INSTR_RRF_R0RR, INSTR_RSL_R0RD, INSTR_RSY_RRRD, INSTR_RSY_RURD, INSTR_RSY_AARD, INSTR_RXY_RRRD, INSTR_RXY_FRRD, INSTR_SIY_URD): Add new instruction formats. (MASK_RRF_R0RR, MASK_RSL_R0RD, MASK_RSY_RRRD, MASK_RSY_RURD, MASK_RSY_AARD, MASK_RXY_RRRD, MASK_RXY_FRRD, MASK_SIY_URD): Likewise. (s390_opformats): Likewise. * s390-opc.txt: Add new instructions for cpu type z990. Add missing hfp instructions. Add missing instructions pgin, pgout and xsch.
Diffstat (limited to 'opcodes/s390-dis.c')
-rw-r--r--opcodes/s390-dis.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/opcodes/s390-dis.c b/opcodes/s390-dis.c
index 33121c78b7..42f5151d3f 100644
--- a/opcodes/s390-dis.c
+++ b/opcodes/s390-dis.c
@@ -89,6 +89,10 @@ s390_extract_operand (insn, operand)
val >>= -bits;
val &= ((1U << (operand->bits - 1)) << 1) - 1;
+ /* Check for special long displacement case. */
+ if (operand->bits == 20 && operand->shift == 20)
+ val = (val & 0xff) << 12 | (val & 0xfff00) >> 8;
+
/* Sign extend value if the operand is signed or pc relative. */
if ((operand->flags & (S390_OPERAND_SIGNED | S390_OPERAND_PCREL))
&& (val & (1U << (operand->bits - 1))))