"David Laight" wrote on 2011/08/11 11:29:33:
>
>
> > > Which is a problem because the compiler could schedule
> > > it be written back to real memory between the instructions.
> >
> > It can? There is no memory here, just registers. Even if it
> > is written to memory, how would that affect the re
> > Which is a problem because the compiler could schedule
> > it be written back to real memory between the instructions.
>
> It can? There is no memory here, just registers. Even if it
> is written to memory, how would that affect the register?
Although the function argument is passed in a re
"David Laight" wrote on 2011/08/11 10:56:26:
>
> > Joakim Tjernlund writes:
> >
> > > unsigned short my__arch_swab16(unsigned short value)
> > > {
> > >__asm__("rlwimi %0,%0,16,0x00ff"
> > > : "+r" (value));
> >
> > You are creating a value that does not fit in a short.
>
> Which is
> Joakim Tjernlund writes:
>
> > unsigned short my__arch_swab16(unsigned short value)
> > {
> > __asm__("rlwimi %0,%0,16,0x00ff"
> > : "+r" (value));
>
> You are creating a value that does not fit in a short.
Which is a problem because the compiler could schedule
it be writt
Andreas Schwab wrote on 2011/08/11 10:45:42:
>
> Joakim Tjernlund writes:
>
> > unsigned short my__arch_swab16(unsigned short value)
> > {
> >__asm__("rlwimi %0,%0,16,0x00ff"
> > : "+r" (value));
>
> You are creating a value that does not fit in a short.
Short is passed in a 32 bit
Joakim Tjernlund writes:
> unsigned short my__arch_swab16(unsigned short value)
> {
> __asm__("rlwimi %0,%0,16,0x00ff"
> : "+r" (value));
You are creating a value that does not fit in a short.
Andreas.
--
Andreas Schwab, sch...@redhat.com
GPG Key fingerprint = D4E8 DBE
PPC __arch_swab32 and __arch_swab16 generates non optimal code.
It doesn't schedule very well, need to copy its input register and
and swab16 needs an extra insn to clear its upper bits. I have improved
these functions(see my__xx). Any problem with the new asm? If
not I will send a patch.
Below s