lkml.org 
[lkml]   [1998]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] NIPQUAD macro broken on big endian


On 7 Oct 1998, Andreas Schwab wrote:
>
> My point is to make it work, nothing more and nothing less. Of course, it
> doesn't *have* to be slow on little endian if the ntohl macro is properly
> written so that gcc can combine the shifts inside and outside of it.

Umm:
- it's not so much slowness as code expansion (NIPQUAD is only used by
various printk's, so performance per se is secondary)
- a well-written htonl() macro will not do just the stupid expansion of
shifts, it will use inline assembly to generate a "bswap" instruction.
- gcc isn't that clever.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:44    [from the cache]
©2003-2011 Jasper Spaans