From: Dmitry Selyutin Date: Sun, 19 Jun 2022 06:01:35 +0000 (+0300) Subject: ppc/svp64: introduce svp64_decode stub X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef6cbd849a31d713b3d99db541fa32c184b95a64;p=binutils-gdb.git ppc/svp64: introduce svp64_decode stub --- diff --git a/gas/config/tc-ppc-svp64.c b/gas/config/tc-ppc-svp64.c index 9436c79afa6..0a61752ff26 100644 --- a/gas/config/tc-ppc-svp64.c +++ b/gas/config/tc-ppc-svp64.c @@ -60,15 +60,26 @@ svp64_setup_records (void) } } -static char * +#define SVP64_SEP '/' + +static void svp64_decode (char *str, struct svp64_ctx *svp64) { + char *opc; + str += (sizeof ("sv.") - 1); - svp64->desc = (const struct svp64_desc *) str_hash_find (svp64_hash, str); - if (!svp64->desc) + if (! ISALPHA (*str)) svp64_raise (_("unrecognized opcode: `%s'"), str); - return str; + opc = str; + for (; ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0'; ++str) + ; + if (*str != '\0') + *str++ = '\0'; + + svp64->desc = (const struct svp64_desc *) str_hash_find (svp64_hash, opc); + if (!svp64->desc) + svp64_raise (_("unrecognized opcode: `%s'"), str); } static void