From 904e73aacfdc06d06595d1b73f867636506de97b Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 24 Jul 2022 21:19:10 +0300 Subject: [PATCH] ppc/svp64: introduce alias for 1<<%r3 predicate --- gas/config/tc-ppc-svp64.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gas/config/tc-ppc-svp64.c b/gas/config/tc-ppc-svp64.c index 4a072667d6d..b5e16bb9abb 100644 --- a/gas/config/tc-ppc-svp64.c +++ b/gas/config/tc-ppc-svp64.c @@ -101,6 +101,7 @@ enum svp64_predicate { static void svp64_operand (expressionS *exp) { + bool caret = false; bool vector = false; bool compat = false; char *origin = input_line_pointer; @@ -116,6 +117,11 @@ svp64_operand (expressionS *exp) else ++input_line_pointer; } + else if (input_line_pointer[0] == '^') + { + caret = true; + ++input_line_pointer; + } if (!vector && !compat && !reg_names_p && (input_line_pointer[0] != '%' || !ISALPHA (input_line_pointer[1]))) @@ -128,8 +134,22 @@ svp64_operand (expressionS *exp) if (exp->X_op == O_absent) input_line_pointer = origin; - else if (vector && - ((exp->X_op == O_register) || (exp->X_op == O_constant))) + else if (exp->X_op == O_register) + { + if (caret) + { + if (exp->X_add_number == 3) + { + exp->X_op = O_predicate; + exp->X_add_number = SVP64_PREDICATE_1BIT_R3; + } + else + exp->X_op = O_illegal; + } + else if (vector) + exp->X_op = O_vector; + } + else if ((exp->X_op == O_constant) && vector) exp->X_op = O_vector; if (compat) -- 2.30.2