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: [PowerPC] avoid horrible union access


On Sat, 4 Feb 2006, Andrew Pinski wrote:
> On Feb 4, 2006, at 6:22 PM, Alan Modra wrote:
> >
> > Yes, see node "Extended Asm".  pack() even works when called from a
> > function which is itself inlined, although of course it's not ideal to
> > have the function return forced into fr1/fr2 in that case.
>
> I wonder if there is a way to say a subregister in inline-asm (this
> would be better than what you are doing):
> Something like:
> __asm__ ("" : "=f" (ld) : "0l" (hi), "0h" (lo));

(It's not clear whether you try to avoid the asm-reg-declaration
of hi and lo *and* ld, or just hi and lo, so I feel compelled
to point out that)
this will only work by accident without the asm-reg declaration of ld.

Hey... I don't how it can work anyway: looking in rs6000.h, 'h'
and 'l' do not seem to be letters for singleton classes for fr1
and fr2 respectively.  What do I miss?

Oh... I think I see the confusion, or alternatively, is this a
*very* recent incompatible change such that h and l now denote
the high and low parts, not register classes?

If not, then the above will not work.

brgds, H-P


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