From 8e04e2e0e65f7f1d3d14f63e38fd569b9b9247cc Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 25 Jul 2022 22:22:15 +0300 Subject: [PATCH] ppc/svp64: determine instruction Rc mode --- gas/config/tc-ppc-svp64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)) -- 2.30.2