diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-04 06:28:11 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-04 06:28:11 +0000 |
commit | 29721a9a34565f36d56450f95141421f716f014b (patch) | |
tree | c2608ce88f385253702b20a628fe001ff4b8f4a2 /sys | |
parent | 7f1a75ce53034f51650a5850334736a8387208a7 (diff) |
More simplification for little-endian systems.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/rasops/rasops_masks.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/rasops/rasops_masks.h b/sys/dev/rasops/rasops_masks.h index c73ab5cf42b..cdf14f28cbe 100644 --- a/sys/dev/rasops/rasops_masks.h +++ b/sys/dev/rasops/rasops_masks.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops_masks.h,v 1.2 2006/08/03 18:42:06 miod Exp $ */ +/* $OpenBSD: rasops_masks.h,v 1.3 2006/08/04 06:28:10 miod Exp $ */ /* $NetBSD: rasops_masks.h,v 1.5 2000/06/13 13:37:01 ad Exp $ */ /*- @@ -52,16 +52,13 @@ * MBR: move bits right * MBE: make big-endian */ -#if BYTE_ORDER == BIG_ENDIAN #define MBL(x,y) ((y) > 31 ? 0 : (x) >> (y)) #define MBR(x,y) ((y) > 31 ? 0 : (x) << (y)) -#define MBE(x) (x) +#if BYTE_ORDER == BIG_ENDIAN +#define MBE(x) (x) #else - -#define MBL(x,y) ((y) > 31 ? 0 : MBE(MBE(x) << (y))) -#define MBR(x,y) ((y) > 31 ? 0 : MBE(MBE(x) >> (y))) #define MBE(x) \ ({ \ u_int32_t tmp = (x); \ @@ -72,7 +69,6 @@ tmp = ((tmp >> 16) & 0x0000ffff) | ((tmp << 16) & 0xffff0000); \ tmp; \ }) - #endif /* |