This is the mail archive of the
mailing list for the GCC project.
Re: dangerous cleverness? ppc int<->float conversions, subreg
- To: zack at codesourcery dot com (Zack Weinberg)
- Subject: Re: dangerous cleverness? ppc int<->float conversions, subreg
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- Date: Tue, 23 Oct 2001 00:42:29 +0100 (BST)
- Cc: gcc at gcc dot gnu dot org
> At first look this is a straightforward change to HARD_REGNO_MODE_OK for
> each target that currently allows use of float registers for integer modes.
> However, I tripped over a detail of the rs6000 machine description: the
> architecture's float<->int conversion instructions pick up or deposit
> integers in the float registers, and the machine description therefore
> has patterns such as
> (set (match_operand:DI 0 "gpc_reg_operand" "=f")
> (fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))
I think the way to go is to use a different register class / different
union classes for floating point registers for operations that can do
without floating point registers.
So your switch would disable fp registers for integer operations by
removing fp registers from the register classes that are allowed according
to the register constraints, typically in CONDITIONAL_REGISTER_USAGE.
Whereas you leave the register classes used by genuine fp operations like
Joern Rennecke | gcc expert for hire
email@example.com | send enquiries to: firstname.lastname@example.org