From: Dmitry Selyutin Date: Sun, 28 May 2023 22:04:56 +0000 (+0300) Subject: ppc/svp64: support zz/dz/sz specifier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=906916ddd8c2b50e3e58819c4f7053918e9e4b5e;p=binutils-gdb.git ppc/svp64: support zz/dz/sz specifier --- diff --git a/gas/config/tc-ppc-svp64.c b/gas/config/tc-ppc-svp64.c index 5a015a6810d..ca635781861 100644 --- a/gas/config/tc-ppc-svp64.c +++ b/gas/config/tc-ppc-svp64.c @@ -41,6 +41,8 @@ struct svp64_ctx { unsigned int els : 1; unsigned int sea : 1; unsigned int sat : 1; + unsigned int dz : 1; + unsigned int sz : 1; }; static jmp_buf svp64_exception; @@ -400,6 +402,49 @@ svp64_decode_sat (char *str, struct svp64_ctx *svp64) return str; } +static char * +svp64_decode_zz (char *str, struct svp64_ctx *svp64) +{ + str += (sizeof ("zz") - 1); + if ( ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0') + return NULL; + + svp64->sz = 1; + svp64->dz = 1; + + *str++ = '\0'; + + return str; +} + +static char * +svp64_decode_dz (char *str, struct svp64_ctx *svp64) +{ + str += (sizeof ("dz") - 1); + if ( ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0') + return NULL; + + svp64->dz = 1; + + *str++ = '\0'; + + return str; +} + +static char * +svp64_decode_sz (char *str, struct svp64_ctx *svp64) +{ + str += (sizeof ("sz") - 1); + if ( ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0') + return NULL; + + svp64->sz = 1; + + *str++ = '\0'; + + return str; +} + static char * svp64_decode_mode (char *str, struct svp64_ctx *svp64) { @@ -418,6 +463,9 @@ svp64_decode_mode (char *str, struct svp64_ctx *svp64) SVP64_DECODER ("sea" , svp64_decode_sea), SVP64_DECODER ("sats", svp64_decode_sat), SVP64_DECODER ("satu", svp64_decode_sat), + SVP64_DECODER ("zz" , svp64_decode_zz), + SVP64_DECODER ("dz" , svp64_decode_dz), + SVP64_DECODER ("sz" , svp64_decode_sz), }; for (i = 0; i < sizeof (table) / sizeof (table[0]); ++i)