From 4f6ffcd38d90eef0e0afc2fd32d7086c706b9bb0 Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Tue, 30 Jul 2013 02:26:09 +0000 Subject: opcodes/ * ppc-dis.c (powerpc_init_dialect): Use ppc_parse_cpu() to set dialect. --- opcodes/ChangeLog | 4 ++++ opcodes/ppc-dis.c | 39 +++++++++++---------------------------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 056af0e..e36ce7e 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2013-07-29 Peter Bergner + + * ppc-dis.c (powerpc_init_dialect): Use ppc_parse_cpu() to set dialect. + 2013-07-26 Sergey Guriev Alexander Ivchenko Maxim Kuznetsov diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index 4e2bcd7..5942287 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -263,56 +263,39 @@ powerpc_init_dialect (struct disassemble_info *info) { case bfd_mach_ppc_403: case bfd_mach_ppc_403gc: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_403); + dialect = ppc_parse_cpu (dialect, &sticky, "403"); break; case bfd_mach_ppc_405: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_403 | PPC_OPCODE_405); + dialect = ppc_parse_cpu (dialect, &sticky, "405"); break; case bfd_mach_ppc_601: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_601); + dialect = ppc_parse_cpu (dialect, &sticky, "601"); break; case bfd_mach_ppc_a35: case bfd_mach_ppc_rs64ii: case bfd_mach_ppc_rs64iii: - dialect = (PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_64); + dialect = ppc_parse_cpu (dialect, &sticky, "pwr2") | PPC_OPCODE_64; break; case bfd_mach_ppc_e500: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE - | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK - | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI - | PPC_OPCODE_E500); + dialect = ppc_parse_cpu (dialect, &sticky, "e500"); break; case bfd_mach_ppc_e500mc: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL - | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI - | PPC_OPCODE_E500MC); + dialect = ppc_parse_cpu (dialect, &sticky, "e500mc"); break; case bfd_mach_ppc_e500mc64: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL - | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI - | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER5 - | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7); + dialect = ppc_parse_cpu (dialect, &sticky, "e500mc64"); break; case bfd_mach_ppc_e5500: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL - | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI - | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_POWER4 - | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 - | PPC_OPCODE_POWER7); + dialect = ppc_parse_cpu (dialect, &sticky, "e5500"); break; case bfd_mach_ppc_e6500: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_ISEL - | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI - | PPC_OPCODE_E500MC | PPC_OPCODE_64 | PPC_OPCODE_ALTIVEC - | PPC_OPCODE_ALTIVEC2 | PPC_OPCODE_E6500 | PPC_OPCODE_POWER4 - | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7); + dialect = ppc_parse_cpu (dialect, &sticky, "e6500"); break; case bfd_mach_ppc_titan: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_PMR - | PPC_OPCODE_RFMCI | PPC_OPCODE_TITAN); + dialect = ppc_parse_cpu (dialect, &sticky, "titan"); break; case bfd_mach_ppc_vle: - dialect = (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_VLE); + dialect = ppc_parse_cpu (dialect, &sticky, "vle"); break; default: dialect = ppc_parse_cpu (dialect, &sticky, "power8") | PPC_OPCODE_ANY; -- cgit v1.1