[Bug other/50582] New: Instruct GCC that added_clobbers_hard_reg_p shouldn't consider a specific register
Paulo.Matos at csr dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 30 15:54:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50582
Bug #: 50582
Summary: Instruct GCC that added_clobbers_hard_reg_p shouldn't
consider a specific register
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Paulo.Matos@csr.com
As noted in :
http://gcc.gnu.org/ml/gcc/2011-09/msg00313.html
`insn_invalid_p' calls `added_clobbers_hard_reg_p' with the comment:
/* If we have to add CLOBBERs, fail if we have to add ones that reference
hard registers since our callers can't know if they are live or not.
Otherwise, add them. */
Backends like rx and mn10300 implement CC_REGNUM as a register containing
flags, however, none of their move instructions clobbers CC_REGNUM. If a
backend move clobbers CC_REGNUM a move instruction (set r0 r1) is deemed as
invalid because the pattern for it is:
(parallel [(set r0 r1)
(clobber CC_REGNUM)])
However, this shouldn't be the case. The backend should be able to inform
genemit.c which registers shouldn't be considered hard registers for the
purpose of `added_clobbers_hard_reg_p'.
More information about the Gcc-bugs
mailing list