diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-05-27 22:33:14 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-05-27 22:33:14 +0000 |
commit | 9b71e10f7702f57fd57fffc226ba214c5a9af1e3 (patch) | |
tree | a81ca5d243167edf2e865f291c420d1d57573fb5 /opcodes/m68k-dis.c | |
parent | d9e296f1347f5cb37150268f48f7693de3d5c20d (diff) | |
download | gdb-9b71e10f7702f57fd57fffc226ba214c5a9af1e3.tar.gz |
1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
* m68k-opc.c: Rename MACL/MSACL to MAC/MSAC. Add MACM/MSACM. Add
MOVE MACSR,CCR.
* m68k-dis.c (fetch_arg): Add places `n', `o'.
* m68k-opc.c: Add MSAC, MACL, MOVE to/from ACC, MACSR, MASK.
Add mcf5206e to appropriate instructions.
Add alias for MAC, MSAC.
* m68k-dis.c (print_insn_arg): Add formats `E', `G', `H' and place
`N'.
* m68k-opc.c (m68k_opcodes): Add divsw, divsl, divuw, divul, macl,
macw, remsl, remul for mcf5307. Change mcf5200 --> mcf.
* m68k-dis.c: Add format `u' and places `h', `m', `M'.
Diffstat (limited to 'opcodes/m68k-dis.c')
-rw-r--r-- | opcodes/m68k-dis.c | 75 |
1 files changed, 70 insertions, 5 deletions
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c index a316c211a82..23d3a8217c4 100644 --- a/opcodes/m68k-dis.c +++ b/opcodes/m68k-dis.c @@ -1,5 +1,5 @@ /* Print Motorola 68k instructions. - Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 97, 1998 + Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify @@ -504,6 +504,18 @@ print_insn_arg (d, buffer, p0, addr, info) (*info->fprintf_func) (info->stream, "%%usp"); break; + case 'E': + (*info->fprintf_func) (info->stream, "%%acc"); + break; + + case 'G': + (*info->fprintf_func) (info->stream, "%%macsr"); + break; + + case 'H': + (*info->fprintf_func) (info->stream, "%%mask"); + break; + case 'J': { static const struct { char *name; int value; } names[] @@ -539,10 +551,19 @@ print_insn_arg (d, buffer, p0, addr, info) break; case 'M': - val = fetch_arg (buffer, place, 8, info); - if (val & 0x80) - val = val - 0x100; - (*info->fprintf_func) (info->stream, "#%d", val); + if (place == 'h') + { + static char *const scalefactor_name[] = { "<<", ">>" }; + val = fetch_arg (buffer, place, 1, info); + (*info->fprintf_func) (info->stream, scalefactor_name[val]); + } + else + { + val = fetch_arg (buffer, place, 8, info); + if (val & 0x80) + val = val - 0x100; + (*info->fprintf_func) (info->stream, "#%d", val); + } break; case 'T': @@ -979,6 +1000,22 @@ print_insn_arg (d, buffer, p0, addr, info) } break; + case 'u': + { + short is_upper = 0; + int reg = fetch_arg (buffer, place, 5, info); + + if (reg & 0x10) + { + is_upper = 1; + reg &= 0xf; + } + (*info->fprintf_func) (info->stream, "%s%s", + reg_names[reg], + is_upper ? "u" : "l"); + } + break; + default: return -2; } @@ -1082,12 +1119,40 @@ fetch_arg (buffer, code, bits, info) val = (buffer[1] >> 6); break; + case 'm': + val = (buffer[1] & 0x40 ? 0x8 : 0) + | ((buffer[0] >> 1) & 0x7) + | (buffer[3] & 0x80 ? 0x10 : 0); + break; + + case 'n': + val = (buffer[1] & 0x40 ? 0x8 : 0) | ((buffer[0] >> 1) & 0x7); + break; + + case 'o': + val = (buffer[2] >> 4) | (buffer[3] & 0x80 ? 0x10 : 0); + break; + + case 'M': + val = buffer[1] | (buffer[3] & 0x40 ? 0x10 : 0); + break; + + case 'N': + val = buffer[3] | (buffer[3] & 0x40 ? 0x10 : 0); + break; + + case 'h': + val = buffer[2] >> 2; + break; + default: abort (); } switch (bits) { + case 1: + return val & 1; case 2: return val & 3; case 3: |