ppc/svp64: support sea specifier
authorDmitry Selyutin <ghostmansd@gmail.com>
Sun, 28 May 2023 22:04:56 +0000 (01:04 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 14 Nov 2023 19:53:34 +0000 (22:53 +0300)
gas/config/tc-ppc-svp64.c

index 1cab144ad6e0ecd3a2087b75abcc03b5d4aba70e..427963836b0653308e4096c6676dc5344dd790ef 100644 (file)
@@ -39,6 +39,7 @@ struct svp64_ctx {
   unsigned int destwid : 2;
   unsigned int srcwid : 2;
   unsigned int els : 1;
+  unsigned int sea : 1;
 };
 
 static jmp_buf svp64_exception;
@@ -359,6 +360,20 @@ svp64_decode_els (char *str, struct svp64_ctx *svp64)
   return str;
 }
 
+static char *
+svp64_decode_sea (char *str, struct svp64_ctx *svp64)
+{
+  str += (sizeof ("sea") - 1);
+  if ( ! ISSPACE (*str) && *str != SVP64_SEP && *str != '\0')
+    return NULL;
+
+  svp64->sea = 1;
+
+  *str++ = '\0';
+
+  return str;
+}
+
 static char *
 svp64_decode_mode (char *str, struct svp64_ctx *svp64)
 {
@@ -374,6 +389,7 @@ svp64_decode_mode (char *str, struct svp64_ctx *svp64)
     SVP64_DECODER ("dw=" , svp64_decode_dw),
     SVP64_DECODER ("sw=" , svp64_decode_sw),
     SVP64_DECODER ("els" , svp64_decode_els),
+    SVP64_DECODER ("sea" , svp64_decode_sea),
   };
 
   for (i = 0; i < sizeof (table) / sizeof (table[0]); ++i)