* ppc-opc.c (VA, VB, VC, VD, VS, SIMM, UIMM, SHB): New macros, for

vector unit operands.
(VX, VX_MASK, VXA, VXA_MASK, VXR, VXR_MASK): New macros, for vector
unit instruction formats.
(PPCVEC): New macro, mask for vector instructions.
(powerpc_operands): Add table entries for above operand types.
(powerpc_opcodes): Add table entries for vector instructions.

* ppc-dis.c (print_insn_big_powerpc): Add PPC_OPCODE_ALTIVEC to mask.
(print_insn_little_powerpc): Likewise.
(print_insn_powerpc): Prepend 'v' when printing vector registers.
This commit is contained in:
J.T. Conklin
2000-05-03 22:25:08 +00:00
parent 7a899fff9a
commit 786e2c0f62
3 changed files with 247 additions and 4 deletions

View File

@@ -33,7 +33,8 @@ static int print_insn_powerpc PARAMS ((bfd_vma, struct disassemble_info *,
int bigendian, int dialect));
/* Print a big endian PowerPC instruction. For convenience, also
disassemble instructions supported by the Motorola PowerPC 601. */
disassemble instructions supported by the Motorola PowerPC 601
and the Altivec vector unit. */
int
print_insn_big_powerpc (memaddr, info)
@@ -41,11 +42,13 @@ print_insn_big_powerpc (memaddr, info)
struct disassemble_info *info;
{
return print_insn_powerpc (memaddr, info, 1,
PPC_OPCODE_PPC | PPC_OPCODE_601);
PPC_OPCODE_PPC | PPC_OPCODE_601 |
PPC_OPCODE_ALTIVEC);
}
/* Print a little endian PowerPC instruction. For convenience, also
disassemble instructions supported by the Motorola PowerPC 601. */
disassemble instructions supported by the Motorola PowerPC 601
and the Altivec vector unit. */
int
print_insn_little_powerpc (memaddr, info)
@@ -53,7 +56,8 @@ print_insn_little_powerpc (memaddr, info)
struct disassemble_info *info;
{
return print_insn_powerpc (memaddr, info, 0,
PPC_OPCODE_PPC | PPC_OPCODE_601);
PPC_OPCODE_PPC | PPC_OPCODE_601 |
PPC_OPCODE_ALTIVEC);
}
/* Print a POWER (RS/6000) instruction. */
@@ -181,6 +185,8 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
(*info->fprintf_func) (info->stream, "r%ld", value);
else if ((operand->flags & PPC_OPERAND_FPR) != 0)
(*info->fprintf_func) (info->stream, "f%ld", value);
else if ((operand->flags & PPC_OPERAND_VR) != 0)
(*info->fprintf_func) (info->stream, "v%ld", value);
else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0)
(*info->print_address_func) (memaddr + value, info);
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)