summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/include
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-29 20:28:55 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-29 20:28:55 +0000
commit683c416022545c05fdf12dd6edcd8fb7ba67b61e (patch)
tree9fabc31cbf37238755493fa316e8f13fd709de33 /sys/arch/hppa/include
parent6e9770181b3bf1c3cd664cc5fedd31d922de5d59 (diff)
spaces
Diffstat (limited to 'sys/arch/hppa/include')
-rw-r--r--sys/arch/hppa/include/endian.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/sys/arch/hppa/include/endian.h b/sys/arch/hppa/include/endian.h
index 892c8b1bd8e..ffebb9f2f98 100644
--- a/sys/arch/hppa/include/endian.h
+++ b/sys/arch/hppa/include/endian.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: endian.h,v 1.6 2001/06/29 06:13:14 mickey Exp $ */
+/* $OpenBSD: endian.h,v 1.7 2001/06/29 20:28:54 mickey Exp $ */
/*
- * Copyright (c) 1998-2000 Michael Shalayeff
+ * Copyright (c) 1998-2001 Michael Shalayeff
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,16 +63,23 @@
*/
#define __swap16md(x) __swap16gen(x)
#else
-#define __swap16md(x) ({ \
- register u_int16_t __swap16md_x; \
- \
- __asm ("extru %1,23,8,%0\n\t" \
- "dep %1,23,8,%0" \
- : "=&r" (__swap16md_x) : "r" (x));\
- __swap16md_x; \
+#define __swap16md(x) ({ \
+ register u_int16_t __swap16md_x; \
+ \
+ __asm ("extru %1,23,8,%0\n\t" \
+ "dep %1,23,8,%0" \
+ : "=&r" (__swap16md_x) : "r" (x)); \
+ __swap16md_x; \
})
#endif
+#define __swap64md(x) ({ \
+ u_int64_t __swap64md_x = (x); \
+ \
+ (u_int64_t)__swap32md(__swap64md_x >> 32) | \
+ (u_int64_t)__swap32md(__swap64md_x & 0xffffffff) << 32; \
+})
+
/* Tell sys/endian.h we have MD variants of the swap macros. */
#define MD_SWAP