This is the mail archive of the gcc@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]

Mode switching for i386 (Was: Re: [patches] Re: better fp truncation sequence on i386)


> I don't think you'll need a pre-reload splitter for this.  The reason
> being that the USEs simply won't exist before mode switching.  I would
> like to see this done, however.
I am sending the patch for pre-reload splitting once testing complettes.

Concerning the mode switching code we are probably slightly out of tune.
What I am intending use mode switching for is just to generate code
to compute truncating/save control word.
The truncation patterns then will use those memory areas and still would
emit sequence fldcw/fist/fldcw.

So I will have simple insns for truncation, use pre-reload splitter to
make them all use single memory area for new/old word and then use
pre-reload mode switching to emit loading/storing code.

The purpose is, that I don't think I can safely use mode switching to
really switch modes before reload would result in wrong truncations
if reload decides to spill pseudos in the range mode is switched.

We may accomplish this by postreload mode switching pass, that will futher
emit the loads/stores, but sitll I think I need the uses to keep insn chain
consistent and I've disucssed this with Tim and we believe that this step
is likely to bring small advantages, as x86 CPUs generally expect poor code
generation in such cases and do have fast bypasses for rotating of two
rounding modes.

Does this plan sound sane?

Honza


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