This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [csl-arm] Fix iWMMXt call-clobbering
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 15 Mar 2005 17:53:10 +0000
- Subject: Re: [csl-arm] Fix iWMMXt call-clobbering
- Organization: GNU
- References: <20050315164927.GA3973@nevyn.them.org>
On Tue, 2005-03-15 at 16:49, Daniel Jacobowitz wrote:
> The iWMMXt control registers are always clobbered; in fact, that's what the
> comment three lines up explains. But that was implemented by clearing
> instead of setting call_used_regs. It's set by default, and we need to
> leave it that way, because we don't have any prologue or epilogue code
> to save and restore it...
>
> Tested by inspection on arm-linux with -march=iwmmxt, where without this fix
> expand_mult is miscompiled. OK for csl-arm-branch/4.0/HEAD?
Not a comment on the patch, which I see paul has already approved, but a
comment on CONDITIONAL_REGISTER_USAGE on arm in general.
I don't think any of the changes made by CONDITIONAL_REGISTER_USAGE
change a register from call-saved to call-clobbered or vice versa. In
pretty much all cases they either enable use of the register or disable
it. Given this it would be much more sensible if FIXED_REGISTERS and
CALL_USED_REGISTERS encoded the call-saved/clobbered information and
that CONDITIONAL_REGISTER_USAGE only ever disables registers entirely
(when not available in the target compilation environment). That makes
the code in C_R_U much more straight-forward (FPA regs aren't available,
iWMMX regs aren't available, etc) rather than faffing about trying to
decide which sub-classes of regs have to be changed to which state.
This isn't a completely trivial change though, so should probably only
be done on the trunk (csl-arm I'll leave up to whoever writes the code).
R.