<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 4dff2f4248ad165f840a5ece4f88ffbd716a76cd Mon Sep 17 00:00:00 2001
From: Iain Sandoe &lt;iain@sandoe.co.uk&gt;
Date: Tue, 25 Aug 2020 21:20:12 +0100
Subject: [PATCH] aarch64 : Mark rotate immediates with '#' as per DDI0487iFc.

The armv8_arm manual [C6.2.226, ROR (immediate)] uses a # in front
of the immediate rotation quantity.

Although, it seems, GAS is able to infer the # (or is leninent about
its absence) assemblers based on the LLVM back end expect it.

gcc/ChangeLog:

	* config/aarch64/aarch64.md (&lt;optab&gt;_rol&lt;mode&gt;3): Add a '#'
	mark in front of the immediate quantity.
	(&lt;optab&gt;_rolsi3_uxtw): Likewise.

(cherry picked from commit 5051c12173713c81921ed133ef5a218e46ab11d1)
Signed-off-by: Kirill A. Korinsky &lt;kirill@korins.ky&gt;
---
 gcc/config/aarch64/aarch64.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git gcc/config/aarch64/aarch64.md gcc/config/aarch64/aarch64.md
index 7b5e6313d55..e39fad1bc8a 100644
--- gcc/config/aarch64/aarch64.md
+++ gcc/config/aarch64/aarch64.md
@@ -4366,7 +4366,7 @@ (define_insn "*&lt;optab&gt;_rol&lt;mode&gt;3"
 		      (match_operand:QI 2 "aarch64_shift_imm_&lt;mode&gt;" "n"))
 		     (match_operand:GPI 3 "register_operand" "r")))]
   ""
-  "&lt;logical&gt;\\t%&lt;w&gt;0, %&lt;w&gt;3, %&lt;w&gt;1, ror (&lt;sizen&gt; - %2)"
+  "&lt;logical&gt;\\t%&lt;w&gt;0, %&lt;w&gt;3, %&lt;w&gt;1, ror #(&lt;sizen&gt; - %2)"
   [(set_attr "type" "logic_shift_imm")]
 )
 
@@ -4391,7 +4391,7 @@ (define_insn "*&lt;optab&gt;_rolsi3_uxtw"
 		      (match_operand:QI 2 "aarch64_shift_imm_si" "n"))
 		     (match_operand:SI 3 "register_operand" "r"))))]
   ""
-  "&lt;logical&gt;\\t%w0, %w3, %w1, ror (32 - %2)"
+  "&lt;logical&gt;\\t%w0, %w3, %w1, ror #(32 - %2)"
   [(set_attr "type" "logic_shift_imm")]
 )
 
-- 
2.42.1

</pre></body></html>