This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: promoting complex modes (plus splitting complex args)
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dje at watson dot ibm dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Jan 03 15:35:40 EST
- Subject: Re: patch: promoting complex modes (plus splitting complex args)
The concept of the patch is to apply PROMOTE_MODE to the complex value
so the SCmode is treated as DCmode occupying 16 bytes and requiring
two FPRs. Then the normal parameter passing machinery will do the
right thing and place the virtual DCmode parameters in the right
locations.
But the problem I have is that that has very little (actually, nothing) to
do with the implemented mechanism of PROMOTE_MODE. Even if you say to
use it for calls only (which you certainly do here), I think it's a stretch.
One concern is that GCC recognize the extendsfdf2 is a no-op so that
it doesn't "extend" the parameters using unnecessary moves for its
internal bookkeeping.
For example for this reason.
The basic issue is that GCC needs to treat complex modes as a pair of
values and create parameter lists appropriate for a pair of values,
not a single N-byte sized mode.
OK, so let's add a new macro named something like PASS_COMPLEX_AS_COMPONENTS
and implement that.