This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]