[Bug target/44618] Arguments are not passed correctly to out-of-line restore functions.
edmar at freescale dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 22 20:51:00 GMT 2010
------- Comment #12 from edmar at freescale dot com 2010-06-22 20:51 -------
Ok. Following your lines from comment 8, (You suggested to create 3 new
constraint, "d", which would accepts only one register each (11, 12, 1), right
?).
The following is more explicit, and would avoid to allocate 3 more letters for
constraints.
Thanks,
Edmar
If a register is not referenced through a match_operand, build_def_use will not
consider that register for renaming.
Using this fact, I can replace:
(define_insn "*return_and_restore_gpregs_<mode>"
[(match_parallel 0 "any_parallel_operand"
[(return)
(clobber (match_operand:P 1 "register_operand" "=l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
(use (match_operand:P 3 "gpc_reg_operand" "r"))
(set (match_operand:P 4 "gpc_reg_operand" "=r")
(match_operand:P 5 "memory_operand" "m"))])]
""
"b %2"
[(set_attr "type" "branch")
(set_attr "length" "4")])
-----------------------------------------
with this:
(define_insn "*return_and_restore_gpregs1_<mode>"
[(match_parallel 0 "any_parallel_operand"
[(return)
(clobber (match_operand:P 1 "register_operand" "=l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
(use (reg:P 11))
(set (match_operand:P 3 "gpc_reg_operand" "=r")
(match_operand:P 4 "memory_operand" "m"))])]
"DEFAULT_ABI != ABI_AIX"
"b %2"
[(set_attr "type" "branch")
(set_attr "length" "4")])
(define_insn "*return_and_restore_gpregs2_<mode>"
[(match_parallel 0 "any_parallel_operand"
[(return)
(clobber (match_operand:P 1 "register_operand" "=l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
(use (reg:P 12))
(set (match_operand:P 3 "gpc_reg_operand" "=r")
(match_operand:P 4 "memory_operand" "m"))])]
"DEFAULT_ABI == ABI_AIX"
"b %2"
[(set_attr "type" "branch")
(set_attr "length" "4")])
(define_insn "*return_and_restore_gpregs3_<mode>"
[(match_parallel 0 "any_parallel_operand"
[(return)
(clobber (match_operand:P 1 "register_operand" "=l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
(use (reg:P 1))
(set (match_operand:P 3 "gpc_reg_operand" "=r")
(match_operand:P 4 "memory_operand" "m"))])]
"DEFAULT_ABI == ABI_AIX"
"b %2"
[(set_attr "type" "branch")
(set_attr "length" "4")])
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44618
More information about the Gcc-bugs
mailing list