aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1998-01-29 19:37:59 +0000
committerDoug Evans <dje@google.com>1998-01-29 19:37:59 +0000
commitd476d46aabef1a56af211f59cb7329243720c15a (patch)
tree1f2aec510a1bc23151e11bb5537558568c0c7523 /gas
parent7649e13e6791988d26e4b0232a8473fac5772d08 (diff)
downloadgdb-d476d46aabef1a56af211f59cb7329243720c15a.zip
gdb-d476d46aabef1a56af211f59cb7329243720c15a.tar.gz
gdb-d476d46aabef1a56af211f59cb7329243720c15a.tar.bz2
add more direct/unpack code
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-dvp.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gas/config/tc-dvp.c b/gas/config/tc-dvp.c
index c0a45b5..a03dcf1 100644
--- a/gas/config/tc-dvp.c
+++ b/gas/config/tc-dvp.c
@@ -320,6 +320,10 @@ assemble_pke (str)
cur_varlen_insn = f;
if (opcode->flags & PKE_OPCODE_MPG)
cur_asm_state = ASM_MPG;
+ else if (opcode->flags & PKE_OPCODE_DIRECT)
+ cur_asm_state = ASM_DIRECT;
+ else if (opcode->flags & PKE_OPCODE_UNPACK)
+ cur_asm_state = ASM_UNPACK;
}
else
{
@@ -328,6 +332,10 @@ assemble_pke (str)
used to indicate we're expecting to see a .endmpg. */
if (opcode->flags & PKE_OPCODE_MPG)
cur_asm_state = ASM_VU;
+ else if (opcode->flags & PKE_OPCODE_DIRECT)
+ cur_asm_state = ASM_GPUIF;
+ else if (opcode->flags & PKE_OPCODE_UNPACK)
+ cur_asm_state = ASM_INIT;
/* FIXME: We assume there is exactly the right amount of
data. */
}
@@ -1202,17 +1210,26 @@ install_pke_length (buf, len)
{
/* mpg */
len /= 4;
+ /* ??? Worry about data /= 4 cuts off? */
if (len > 256)
- as_bad ("mpg data length must be between 1 and 256");
- buf[2] = len;
+ as_bad ("`mpg' data length must be between 1 and 256");
+ buf[2] = len == 256 ? 0 : len;
}
else if ((cmd & 0x70) == 0x50)
{
/* direct/directhl */
+ /* ??? Worry about data /= 16 cuts off? */
+ len /= 16;
+ if (len > 65536)
+ as_bad ("`direct' data length must be between 1 and 65536");
+ len = len == 65536 ? 0 : len;
+ buf[0] = len;
+ buf[1] = len >> 8;
}
else if ((cmd & 0x60) == 0x60)
{
/* unpack */
+ /* FIXME */
}
else
as_fatal ("bad call to install_pke_length");