lkml.org 
[lkml]   [2011]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 19/24] C6X: headers
From
Date
On Wed, 2011-09-28 at 16:07 +0200, Arnd Bergmann wrote:
> On Tuesday 27 September 2011, Mark Salter wrote:
> > diff --git a/arch/c6x/include/asm/unaligned.h b/arch/c6x/include/asm/unaligned.h
> > new file mode 100644
> > index 0000000..1dcb006
> > --- /dev/null
> > +++ b/arch/c6x/include/asm/unaligned.h
> > @@ -0,0 +1,288 @@
> > +/*
> > + * Port on Texas Instruments TMS320C6x architecture
>
> This file basically just optimizes unaligned endianess conversion, but
> you don't provide an optimized swab.h, which is the regular endianess
> conversion.
>
> I think it would less code and more useful to provide your own swab.h
> and use the generic unaligned.h.
>

Ah, I missed swab.h which is a trivial optimization. We can do 1 cycle
swab16, 2 cycle swab32, and 3 cycle swab64.

I think we still want the c6x unaligned.h because the hardware can do
unaligned 32 and 64 memory accesses with no performance penalty. There
are some addressing mode limitations which is why the compiler doesn't
use them generally.

--Mark




\
 
 \ /
  Last update: 2011-09-29 16:27    [W:0.180 / U:1.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site