public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] aarch64 : Mark rotate immediates with '#' as per DDI0487iFc.
@ 2021-01-08 21:13 Iain Sandoe
  2021-01-12 14:29 ` Richard Sandiford
  0 siblings, 1 reply; 4+ messages in thread
From: Iain Sandoe @ 2021-01-08 21:13 UTC (permalink / raw)
  To: GCC Patches

Hi,

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 and error out.

tested on aarch64-linux-gnu (gcc115) and aarch64-darwin20 (experimental)

OK for master?
thanks
Iain

gcc/ChangeLog:

	* config/aarch64/aarch64.md (<optab>_rol<mode>3): Add a '#'
	mark in front of the immediate quantity.
	(<optab>_rolsi3_uxtw): Likewise.
---
gcc/config/aarch64/aarch64.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 45d9c6ac45a..e0de82c938a 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -4416,7 +4416,7 @@
		      (match_operand:QI 2 "aarch64_shift_imm_<mode>" "n"))
		     (match_operand:GPI 3 "register_operand" "r")))]
  ""
-  "<logical>\\t%<w>0, %<w>3, %<w>1, ror (<sizen> - %2)"
+  "<logical>\\t%<w>0, %<w>3, %<w>1, ror #(<sizen> - %2)"
  [(set_attr "type" "logic_shift_imm")]
)

@@ -4441,7 +4441,7 @@
		      (match_operand:QI 2 "aarch64_shift_imm_si" "n"))
		     (match_operand:SI 3 "register_operand" "r"))))]
  ""
-  "<logical>\\t%w0, %w3, %w1, ror (32 - %2)"
+  "<logical>\\t%w0, %w3, %w1, ror #(32 - %2)"
  [(set_attr "type" "logic_shift_imm")]
)

-- 
2.24.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-12 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 21:13 [PATCH] aarch64 : Mark rotate immediates with '#' as per DDI0487iFc Iain Sandoe
2021-01-12 14:29 ` Richard Sandiford
2021-01-12 15:01   ` Iain Sandoe
2021-01-12 15:18     ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).