qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 32/32] ppc: Speed up load/store multiple


From: Benjamin Herrenschmidt
Subject: Re: [Qemu-ppc] [PATCH 32/32] ppc: Speed up load/store multiple
Date: Wed, 27 Jul 2016 14:04:00 +1000

On Wed, 2016-07-27 at 12:47 +1000, David Gibson wrote:
> > +#if defined(HOST_WORDS_BIGENDIAN)
> > +        memcpy(&env->gpr[reg], src, adjlen);
> > +        reg += (adjlen >> 2);
> > +        addr = addr_add(env, addr, adjlen);
> > +#else
> > +        while(adjlen) {
> > +            env->gpr[reg++] = bswap32(*(src++));
> > +            adjlen -= 4;
> > +            addr = addr_add(env, addr, 4);
> > +        }
> > +#endif
> 
> Would it improve this any further to do the memcpy() unconditionally,
> then byteswap the GPRs in-place for the LE host case?

I thought about it and decided probably not. It's not a big enough
memcpy to matter I suspect. And it keeps the code simpler.

Cheers,
Ben.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]