aboutsummaryrefslogtreecommitdiff
path: root/bfd/cpu-h8300.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1991-12-01 07:53:50 +0000
committerSteve Chamberlain <sac@cygnus>1991-12-01 07:53:50 +0000
commit0d4b8e3fd2c2374abf04075600fbd66f96022070 (patch)
tree4eefffa205fad9182760d8146bf17f453f51dc5a /bfd/cpu-h8300.c
parent6cba8f4b7832350b97e2d5b4d91a2010435be344 (diff)
downloadgdb-0d4b8e3fd2c2374abf04075600fbd66f96022070.zip
gdb-0d4b8e3fd2c2374abf04075600fbd66f96022070.tar.gz
gdb-0d4b8e3fd2c2374abf04075600fbd66f96022070.tar.bz2
* cpu-h8300.c: Add support for MEMIND addressing mode
Diffstat (limited to 'bfd/cpu-h8300.c')
-rw-r--r--bfd/cpu-h8300.c43
1 files changed, 30 insertions, 13 deletions
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index a5db477..79761d3 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -135,6 +135,7 @@ FILE *stream)
case IMM8:
case ABS8SRC:
case ABS8DST:
+ case MEMIND:
case DISP8:
abs= data[len>>1];
len++;
@@ -193,39 +194,55 @@ FILE *stream)
case IMM16:
case IMM8:
case IMM3:
- fprintf(stream, "#0x%x", (unsigned)abs); break;
+ fprintf(stream, "#0x%x", (unsigned)abs);
+ break;
case RD8:
- fprintf(stream, "%s", regnames[rd]); break;
+ fprintf(stream, "%s", regnames[rd]);
+ break;
case RS8:
- fprintf(stream, "%s",regnames[rs]); break;
+ fprintf(stream, "%s",regnames[rs]);
+ break;
case RD16:
- fprintf(stream, "r%d", rd& 0x7); break;
+ fprintf(stream, "r%d", rd& 0x7);
+ break;
case RS16:
- fprintf(stream, "r%d", rs & 0x7); break;
+ fprintf(stream, "r%d", rs & 0x7);
+ break;
case RSINC:
- fprintf(stream, "@r%d+", rs & 0x7); break;
+ fprintf(stream, "@r%d+", rs & 0x7);
+ break;
case RDDEC:
- fprintf(stream, "@-r%d", rd & 0x7); break;
+ fprintf(stream, "@-r%d", rd & 0x7);
+ break;
case RDIND:
- fprintf(stream, "@r%d", rd & 0x7); break;
+ fprintf(stream, "@r%d", rd & 0x7);
+ break;
case RSIND:
- fprintf(stream, "@r%d",rs & 0x7); break;
+ fprintf(stream, "@r%d",rs & 0x7);
+ break;
case ABS8SRC:
case ABS16SRC:
case ABS16DST:
case ABS8DST:
- fprintf(stream, "@0x%x", (unsigned)abs); break;
+ fprintf(stream, "@0x%x", (unsigned)abs);
+ break;
+ case MEMIND:
+ fprintf(stream, "@@%d (%x)",abs, abs);
+ break;
case DISP8:
fprintf(stream, ".%s%d (%x)",(char)abs>0 ? "+" :"", (char)abs,
addr + (char)abs);
break;
case DISPSRC:
case DISPDST:
- fprintf(stream, "@(0x%x,r%d)", abs, rdisp & 0x7); break;
+ fprintf(stream, "@(0x%x,r%d)", abs, rdisp & 0x7);
+ break;
case CCR:
- fprintf(stream, "ccr"); break;
+ fprintf(stream, "ccr");
+ break;
case KBIT:
- fprintf(stream, "#%d",abs); break;
+ fprintf(stream, "#%d",abs);
+ break;
default:
abort();
}