From: Dmitry Selyutin Date: Tue, 11 Apr 2023 18:27:25 +0000 (+0300) Subject: ppc/svp64: support zz/dz/sz specifier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dde4f0a07261c3697efb626cb19f40ae3f1a1222;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)