From: Dmitry Selyutin Date: Sun, 28 May 2023 22:04:57 +0000 (+0300) Subject: ppc/svp64: support optional operands disassembly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1df1f5be68dcb109ed4b55aa2c2dfe55c646b3f;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;