diff options
author | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-01-15 15:41:23 +0000 |
---|---|---|
committer | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-01-15 15:41:23 +0000 |
commit | a660f11eb1f801477e8b363eb5c16dfa247f09d3 (patch) | |
tree | 1dd2387e914559b04ecd6aefed4a051c936a33d5 /opcodes/arm-dis.c | |
parent | fcd6d8d6b7e31802df813e0cec64f5063aab2e83 (diff) | |
download | gdb-a660f11eb1f801477e8b363eb5c16dfa247f09d3.zip gdb-a660f11eb1f801477e8b363eb5c16dfa247f09d3.tar.gz gdb-a660f11eb1f801477e8b363eb5c16dfa247f09d3.tar.bz2 |
* arm-opc.h (arm_opcodes): Add patterns for VFP instructions.
* arm-dis.c (print_insn_arm): Support new disassembly qualifiers for
VFP bitfields.
Diffstat (limited to 'opcodes/arm-dis.c')
-rw-r--r-- | opcodes/arm-dis.c | 80 |
1 files changed, 79 insertions, 1 deletions
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index 104b933..b2807c5 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -630,7 +630,85 @@ print_insn_arm (pc, info, given) abort (); } break; - + + case 'y': + case 'z': + { + int single = *c == 'y'; + int regno; + + switch (bitstart) + { + case 4: /* Sm pair */ + func (stream, "{"); + /* Fall through. */ + case 0: /* Sm, Dm */ + regno = given & 0x0000000f; + if (single) + { + regno <<= 1; + regno += (given >> 5) & 1; + } + break; + + case 1: /* Sd, Dd */ + regno = (given >> 12) & 0x0000000f; + if (single) + { + regno <<= 1; + regno += (given >> 22) & 1; + } + break; + + case 2: /* Sn, Dn */ + regno = (given >> 16) & 0x0000000f; + if (single) + { + regno <<= 1; + regno += (given >> 7) & 1; + } + break; + + case 3: /* List */ + func (stream, "{"); + regno = (given >> 12) & 0x0000000f; + if (single) + { + regno <<= 1; + regno += (given >> 22) & 1; + } + break; + + + default: + abort (); + } + + func (stream, "%c%d", single ? 's' : 'd', regno); + + if (bitstart == 3) + { + int count = given & 0xff; + + if (single == 0) + count >>= 1; + + if (--count) + { + func (stream, "-%c%d", + single ? 's' : 'd', + regno + count); + } + + func (stream, "}"); + } + else if (bitstart == 4) + func (stream, ", %c%d}", single ? 's' : 'd', + regno + 1); + + break; + } + case '`': c++; if ((given & (1 << bitstart)) == 0) |