[parisc-linux-cvs] linux tsbogend
Grant Grundler
grundler@dsl2.external.hp.com
Mon, 25 Feb 2002 10:32:59 -0700
Thomas Bogendoerfer wrote:
> URL of patch: ftp://ftp.parisc-linux.org/patches/eisa_enum2.diff
In drivers/gsc/eisa_enumerator.c:
+static inline u_int16_t get_16(const unsigned char *x)
+{
+ return (x[1] << 8) | x[0];
+}
+
+static inline u_int32_t get_32(const unsigned char *x)
+{
+ return (x[3] << 24) | (x[2] << 16) | (x[1] << 8) | x[0];
+}
Thought this works, this generates horribly code. At least the
HPUX compiler did when I looked at it 5 years (or so) ago.
If anyone cares about EISA perf, stealing inline asm from
include/asm/byteorder.h (eg ___arch__swab32) would help.
grant