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