From: Dmitry Selyutin Date: Mon, 25 Jul 2022 19:22:15 +0000 (+0300) Subject: ppc/svp64: determine instruction Rc mode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e04e2e0e65f7f1d3d14f63e38fd569b9b9247cc;p=binutils-gdb.git ppc/svp64: determine instruction Rc mode --- diff --git a/gas/config/tc-ppc-svp64.c b/gas/config/tc-ppc-svp64.c index 7b43a37c138..21f6014d004 100644 --- a/gas/config/tc-ppc-svp64.c +++ b/gas/config/tc-ppc-svp64.c @@ -47,6 +47,7 @@ struct svp64_ctx { unsigned int crm : 1; unsigned int svm : 1; unsigned int type : 2; + unsigned int rc : 1; }; #define SVP64_RC1_ACTIVE (1U << 3U) @@ -713,6 +714,12 @@ svp64_is_bc(const char *str, size_t len) return SVP64_STR_MAP_CMP(str, len, table); } +static inline bool +svp64_is_rc (const char *str, size_t len) +{ + return (str[len - 1] == '.'); +} + static void svp64_decode (char *str, struct svp64_ctx *svp64) { @@ -731,6 +738,9 @@ svp64_decode (char *str, struct svp64_ctx *svp64) if (*str != '\0') *str++ = '\0'; + if (svp64_is_rc (opc, opclen)) + svp64->rc = 1; + if (svp64_is_ld (opc, opclen)) svp64->type = SVP64_TYPE_LD; else if (svp64_is_st (opc, opclen))