(*info->memory_error_func) (status, pc, info);
return -1;
}
- upper = bfd_getl32 (buffer);
- lower = bfd_getl32 (buffer + 4);
+ /* The lower instruction has the lower address. */
+ upper = bfd_getl32 (buffer + 4);
+ lower = bfd_getl32 (buffer);
/* FIXME: This will need revisiting. */
print_insn (pc, info, upper, 0);
TXVU_INSN insn;
int lower_p;
{
- const struct txvu_opcode *opcode;
+ const txvu_opcode *opcode;
void *stream = info->stream;
fprintf_ftype func = info->fprintf_func;
const unsigned char *syn;
int mods,invalid,num_operands;
long value;
- const struct txvu_operand *operand;
+ const txvu_operand *operand;
/* Basic bit mask must be correct. */
if ((insn & opcode->mask) != opcode->value)
}
operand = txvu_operands + index;
if (operand->extract)
- (*operand->extract) (insn, operand, mods, &invalid);
+ (*operand->extract) (opcode, operand, mods, &insn, &invalid);
}
if (invalid)
continue;
/* Extract the value from the instruction. */
if (operand->extract)
{
- value = (*operand->extract) (insn, operand, mods, (int *) NULL);
+ value = (*operand->extract) (opcode, operand, mods,
+ &insn, (int *) NULL);
}
else
{
value -= 1 << operand->bits;
}
+#if 0 /* commas are part of the syntax string now */
/* If second or later operand, print a comma. */
if (num_operands > 0)
(*func) (stream, ",");
+#endif
/* Print the operand as directed by the flags. */
if (operand->print)
- (*operand->print) (info, insn, value);
+ (*operand->print) (opcode, operand, mods, &insn, info, value);
else if (operand->flags & TXVU_OPERAND_FAKE)
; /* nothing to do (??? at least not yet) */
else if (operand->flags & TXVU_OPERAND_RELATIVE_BRANCH)
- (*info->print_address_func) (pc + value, info);
+ (*info->print_address_func) (pc + (value << 3), info);
/* ??? Not all cases of this are currently caught. */
else if (operand->flags & TXVU_OPERAND_ABSOLUTE_BRANCH)
(*info->print_address_func) ((bfd_vma) value & 0xffffffff, info);