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
{
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. */
}
{
/* 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");