diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-06-29 06:13:15 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-06-29 06:13:15 +0000 |
commit | e3fc1deb1dbfa7d532f9321734ced074852b6ac3 (patch) | |
tree | 83fa68b163543ea8ef30fcd0ccc4be5cbea8adee /sys/arch/hppa | |
parent | d22aea9996b53f4185230f9d5b769c013aec9777 (diff) |
implement __swap64md
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/include/endian.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/hppa/include/endian.h b/sys/arch/hppa/include/endian.h index c5b354043e3..892c8b1bd8e 100644 --- a/sys/arch/hppa/include/endian.h +++ b/sys/arch/hppa/include/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.5 2001/03/02 20:45:21 jason Exp $ */ +/* $OpenBSD: endian.h,v 1.6 2001/06/29 06:13:14 mickey Exp $ */ /* * Copyright (c) 1998-2000 Michael Shalayeff @@ -35,6 +35,13 @@ #ifdef __GNUC__ +#define __swap64md(x) ({ \ + u_int64_t __swap64md_x = (x); \ + \ + (u_int64_t)__swap32md(__swap64md_x >> 32) | \ + (u_int64_t)__swap32md(__swap64md_x & 0xffffffff) << 32; \ +}) + #define __swap32md(x) ({ \ register u_int32_t __swap32md_x; \ \ |