From 066fef1193c7b714adef490d5891ea863b13184a Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 29 May 2023 01:04:56 +0300 Subject: [PATCH] ppc/svp64: support zz/dz/sz specifier --- gas/config/tc-ppc-svp64.c | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) 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) -- 2.30.2