aboutsummaryrefslogtreecommitdiff
path: root/opcodes/ppc-dis.c
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>2000-05-03 22:25:08 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>2000-05-03 22:25:08 +0000
commit786e2c0f621fad6ac9f6cf8070c65e247b7a278a (patch)
tree713478c252dcdac41a8a2ebc0e366879dd250a6b /opcodes/ppc-dis.c
parent7a899fff9a62c26acfc57510a8b93a6a61b1af6b (diff)
downloadgdb-786e2c0f621fad6ac9f6cf8070c65e247b7a278a.zip
gdb-786e2c0f621fad6ac9f6cf8070c65e247b7a278a.tar.gz
gdb-786e2c0f621fad6ac9f6cf8070c65e247b7a278a.tar.bz2
* 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.
Diffstat (limited to 'opcodes/ppc-dis.c')
-rw-r--r--opcodes/ppc-dis.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index f256632..47b79ca 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -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)