lkml.org 
[lkml]   [2008]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] UBIFS: endian handling fixes and annotations
Sebastian Andrzej Siewior wrote:
> >- return le32_to_cpu(key->u32[1]) >> UBIFS_S_KEY_BLOCK_BITS;
> >+ return le32_to_cpu(key->j32[1]) >> UBIFS_S_KEY_BLOCK_BITS;
>
> If you would change such references to something like
> |return le32_to_cpup(&key->j32[1]) >> UBIFS_S_KEY_BLOCK_BITS;
> then on powerpc
>
> text data bss dec hex filename
> 155384 1284 24 156692 26414 ubifs-b4.ko
> 155372 1284 24 156680 26408 ubifs-after.ko
>
> because now it is possible to load the value as LE from memory instead
> of loading it BE and swapping it afterwads.

If le32_to_cpu used __builtin_bswap32 (a GCC builtin), wouldn't
GCC do this trivial optimisation itself?

-- Jamie


\
 
 \ /
  Last update: 2008-11-23 11:07    [W:0.101 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site