From a982c3a22cdf4f71a8b3045413cc6bdc41a993f5 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 29 May 2023 01:04:56 +0300 Subject: [PATCH] ppc/svp64: support els specifier --- gas/config/tc-ppc-svp64.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gas/config/tc-ppc-svp64.c b/gas/config/tc-ppc-svp64.c index f771151f088..1cab144ad6e 100644 --- a/gas/config/tc-ppc-svp64.c +++ b/gas/config/tc-ppc-svp64.c @@ -24,6 +24,9 @@ struct svp64_ctx { const char *name; const struct svp64_desc *desc; + unsigned int sv_mode_explicit : 1; + unsigned int sv_mode : 2; + unsigned int mode : 5; unsigned int pmmode : 1; unsigned int pmask : 3; unsigned int smmode : 1; @@ -35,6 +38,7 @@ struct svp64_ctx { unsigned int subvl : 2; unsigned int destwid : 2; unsigned int srcwid : 2; + unsigned int els : 1; }; static jmp_buf svp64_exception; @@ -336,6 +340,25 @@ svp64_decode_sw (char *str, struct svp64_ctx *svp64) return iter; } +static char * +svp64_decode_els (char *str, struct svp64_ctx *svp64) +{ + str += (sizeof ("els") - 1); + if ( ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0') + return NULL; + + svp64->els = 1; + if (svp64->desc->mode == SVP64_MODE_LDST_IDX) + { + svp64->sv_mode = 0x1; + svp64->sv_mode_explicit = 1; + } + + *str++ = '\0'; + + return str; +} + static char * svp64_decode_mode (char *str, struct svp64_ctx *svp64) { @@ -350,6 +373,7 @@ svp64_decode_mode (char *str, struct svp64_ctx *svp64) SVP64_DECODER ("w=" , svp64_decode_w), SVP64_DECODER ("dw=" , svp64_decode_dw), SVP64_DECODER ("sw=" , svp64_decode_sw), + SVP64_DECODER ("els" , svp64_decode_els), }; for (i = 0; i < sizeof (table) / sizeof (table[0]); ++i) -- 2.30.2