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]

Re: pre_inc/pre_dec/PUSH_ROUNDING inconsistency


> On Mon, Jul 17, 2000 at 02:16:04PM -0700, Richard Henderson wrote:
> > Yes, the TFmode subreg is incorrect.  As for the other... well,
> > I guess it's not too bad.  I'm not sure what to put in its place.
> 
> Alternately, we could just explicitly use subtract plus store.
> 
> This is what the x86 backend is going to do anyway, and avoids
> the issue of odd-sized subregs of floating point values.  As 
> you note, would have caused register allocation problems anyway.
OK, this seems to be best solution I've found so far too.
Perhaps the register allocation problems can be handled by insn patterns
explicitly mentioning the subregs like:
(set (match_operand:DI "push_operand") (subreg:DI (match_operand:SI "general_operand") 0))

But this is kludge and not going to solve problems with memory references (I
believe that combine never construct paradoxical subregs to memory or not?)

The kludge would work - I was playing similar games in one never reviewed patc
hwith mulsihi insn pattern (since this pattern is currently always promoted to
mulhi pattern by combine) and expect the problems in genrecog you perhaps
remember fixing about year ago (the fix was one of my not very lucky patches
especially hard to review)...

Problem is that the explicit subtract plus store method don't fit closely
to the existing way pushes are genrated. Ordinaly mov?i expander is used with
the push_operand in the destination.
Perhaps we can define new "push?i" standard names and add necesary optabs
code to imitate them using push_operand mov?i when not present.
This would not require any changes to existing MD files.

Alternate way is to default into two instruction - the store and the stack
adjustments. This would allow machine description to omit the push paterns
for modes hardware don't implement. Note that for i386 case this should not
be uesable, since even for fp stores we want to use integer push instruction
to store memory, immediates and integer regs.  So perhaps the first approach
is easier to implement and better.

What do you think?
Honza
> 
> 
> r~

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