Skip to content
Snippets Groups Projects
Commit 43188215 authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Jeff Law
Browse files

[PATCH] RX: Restrict displacement ranges in "Q" constraint

When using the "Q" constraint in the inline assembler, the displacement value
could exceed the range specified by the instruction.
To avoid this issue, a displacement range check is added to the "Q" constraint.

gcc/
	* config/rx/constraints.md (Q): Also check that the address
	passes rx_is_restricted_memory-address.
parent 09d1cbee
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,8 @@ ...@@ -80,7 +80,8 @@
(ior (match_code "reg" "0") (ior (match_code "reg" "0")
(and (match_code "plus" "0") (and (match_code "plus" "0")
(and (match_code "reg,subreg" "00") (and (match_code "reg,subreg" "00")
(match_code "const_int" "01") (and (match_code "const_int" "01")
(match_test "rx_is_restricted_memory_address (XEXP (op, 0), mode)"))
) )
) )
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment