summaryrefslogtreecommitdiff
path: root/sys/arch/amiga/dev/grf_ulreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amiga/dev/grf_ulreg.h')
-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 */