This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] add ppc440 dialect for objdump
- From: Hiroki Kaminaga <kaminaga at sm dot sony dot co dot jp>
- To: binutils at sourceware dot org
- Cc: kaminaga at sm dot sony dot co dot jp
- Date: Tue, 23 Jan 2007 15:49:03 +0900 (JST)
- Subject: [PATCH] add ppc440 dialect for objdump
Hi,
This is a patch to preserve consistency between gas -m440 and
objdump -M440. In gas/config/tc-ppc.c:parse_cpu(), -m440 will set
else if (strcmp (arg, "440") == 0)
ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_32
| PPC_OPCODE_440 | PPC_OPCODE_ISEL | PPC_OPCODE_RFMCI);
but objdump does not have corresponding dialect. This patch adds
corresponding dialect. This patch is against binutils-2.17.50.0.9, I could
not obtain binutils-2.17.50.0.10 from
http://www.kernel.org/pub/linux/devel/binutils/ yet...
Best Regards,
(Hiroki Kaminaga)
t
---
ppc-dis.c | 4 ++++
1 file changed, 4 insertions(+)
---
2007-01-23 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
* ppc-dis.c (powerpc_dialect): Handle ppc440.
Index: binutils-2.17.50.0.9/opcodes/ppc-dis.c
===================================================================
--- binutils-2.17.50.0.9.orig/opcodes/ppc-dis.c
+++ binutils-2.17.50.0.9/opcodes/ppc-dis.c
@@ -61,6 +61,10 @@ powerpc_dialect (struct disassemble_info
else if (info->disassembler_options
&& strstr (info->disassembler_options, "e300") != NULL)
dialect |= PPC_OPCODE_E300 | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON;
+ else if (info->disassembler_options
+ && strstr (info->disassembler_options, "440") != NULL)
+ dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_32
+ | PPC_OPCODE_440 | PPC_OPCODE_ISEL | PPC_OPCODE_RFMCI;
else
dialect |= (PPC_OPCODE_403 | PPC_OPCODE_601 | PPC_OPCODE_CLASSIC
| PPC_OPCODE_COMMON | PPC_OPCODE_ALTIVEC);