summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-05 04:06:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-05 04:06:01 +0000
commit7ccb273d3eb225f9224c6a078f3e919a74040078 (patch)
tree2ca4d428ea1228caa1c1c60563b0919c6fdde355 /sys/arch
parent2954d2c8c6ff8fbbf1f0ad057ae3ca94c83e7e92 (diff)
from netbsd: explicitly mask the address value
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amiga/dev/grf_ulreg.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/amiga/dev/grf_ulreg.h b/sys/arch/amiga/dev/grf_ulreg.h
index 79f8512b985..3f8a8634e1b 100644
--- a/sys/arch/amiga/dev/grf_ulreg.h
+++ b/sys/arch/amiga/dev/grf_ulreg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_ulreg.h,v 1.2 1995/10/07 19:54:59 chopps Exp $ */
+/* $NetBSD: grf_ulreg.h,v 1.3 1995/12/31 01:22:03 chopps Exp $ */
/*
* Copyright (c) 1995 Ignatios Souvatzis
@@ -60,8 +60,11 @@ struct gspregs {
/* address macros */
-#define GSPSETHADRS(gsp,adrs) (gsp)->hstadrh = (adrs)>>16; (gsp)->hstadrl = (adrs)
-#define GSPGETHADRS(gsp) ((gsp)->hstadrh << 16 | (gsp)->hstadrl)
+#define GSPSETHADRS(gsp,adrs) do { \
+ (gsp)->hstadrh = (adrs) >> 16; \
+ (gsp)->hstadrl = (adrs) & 0xFFFF; \
+ } while (0)
+#define GSPGETHADRS(gsp) ((gsp)->hstadrh << 16 | (gsp)->hstadrl)
/* Standard addresses in GSP memory */