From: Dmitry Selyutin Date: Tue, 11 Apr 2023 18:27:26 +0000 (+0300) Subject: ppc/svp64: support optional operands disassembly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=669034175b4f3e5594440774471fcfe91eb10da5;p=binutils-gdb.git ppc/svp64: support optional operands disassembly --- diff --git a/opcodes/ppc-svp64-opc.c b/opcodes/ppc-svp64-opc.c index 8c64d95dc39..1c9392913f7 100644 --- a/opcodes/ppc-svp64-opc.c +++ b/opcodes/ppc-svp64-opc.c @@ -42,8 +42,29 @@ svp64_extra_desc (const struct svp64_desc *desc, ppc_opindex_t opindex) {svp64_desc_cr_in2_opindex, desc->extra_idx_cr_in2}, {svp64_desc_cr_out_opindex, desc->extra_idx_cr_out}, }; + static const struct { + int origin; + int target; + } aliases[] = { + {OBF, BF}, + {PRA0, RA0}, + {PRAQ, RA}, + {RAOPT, RA}, + {RBOPT, RB}, + {RSO, RS}, + {TBR, SPR}, + }; + + for (i = 0; i < ARRAY_SIZE (aliases); ++i) + { + if (opindex == aliases[i].origin) + { + opindex = aliases[i].target; + break; + } + } - for (i = 0; i < (sizeof (table) / sizeof (table[0])); ++i) + for (i = 0; i < ARRAY_SIZE (table); ++i) { enum svp64_extra extra = table[i].extra;