From: Dmitry Selyutin Date: Sun, 28 May 2023 22:04:56 +0000 (+0300) Subject: ppc/svp64: support sat specifier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47934e95f8c6919abdf77036cbf0ed67a4d4909f;p=binutils-gdb.git ppc/svp64: support sat specifier --- diff --git a/gas/config/tc-ppc-svp64.c b/gas/config/tc-ppc-svp64.c index 427963836b0..5a015a6810d 100644 --- a/gas/config/tc-ppc-svp64.c +++ b/gas/config/tc-ppc-svp64.c @@ -40,6 +40,7 @@ struct svp64_ctx { unsigned int srcwid : 2; unsigned int els : 1; unsigned int sea : 1; + unsigned int sat : 1; }; static jmp_buf svp64_exception; @@ -374,6 +375,31 @@ svp64_decode_sea (char *str, struct svp64_ctx *svp64) return str; } +static char * +svp64_decode_sat (char *str, struct svp64_ctx *svp64) +{ + unsigned char mode; + + str += (sizeof ("sat") - 1); + if ((*str != 's') && (*str != 'u')) + return NULL; + + mode = *str++; + if ( ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0') + return NULL; + + if (svp64->sv_mode_explicit) + svp64_raise (_("SV mode conflict: `%s'"), str); + + svp64->sv_mode_explicit = 1; + svp64->sv_mode = 2; + svp64->sat = (mode == 's'); + + *str++ = '\0'; + + return str; +} + static char * svp64_decode_mode (char *str, struct svp64_ctx *svp64) { @@ -390,6 +416,8 @@ svp64_decode_mode (char *str, struct svp64_ctx *svp64) SVP64_DECODER ("sw=" , svp64_decode_sw), SVP64_DECODER ("els" , svp64_decode_els), SVP64_DECODER ("sea" , svp64_decode_sea), + SVP64_DECODER ("sats", svp64_decode_sat), + SVP64_DECODER ("satu", svp64_decode_sat), }; for (i = 0; i < sizeof (table) / sizeof (table[0]); ++i)