summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2002-05-05 18:36:03 +0000
committertsutsui <tsutsui@NetBSD.org>2002-05-05 18:36:03 +0000
commit92896ac2a116aec03e8b4ebc270d4bae6f3f0860 (patch)
treef73360911ac69976e5cec47967c1327ac1a61b8d /sys/arch/macppc/dev
parent87ebd3218c86bada72844f432abcda9922c760c9 (diff)
Add a null asm statement in adb_read_date_time()
to avoid wrong reordering by gcc-2.95.3 with -fgcse. XXX Should we disable -fgcse everywhere?
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r--sys/arch/macppc/dev/adb_direct.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/adb_direct.c b/sys/arch/macppc/dev/adb_direct.c
index 03a263dfa2a..8e6eda938a3 100644
--- a/sys/arch/macppc/dev/adb_direct.c
+++ b/sys/arch/macppc/dev/adb_direct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: adb_direct.c,v 1.23 2002/05/05 18:29:06 tsutsui Exp $ */
+/* $NetBSD: adb_direct.c,v 1.24 2002/05/05 18:36:03 tsutsui Exp $ */
/* From: adb_direct.c 2.02 4/18/97 jpw */
@@ -1892,6 +1892,9 @@ adb_read_date_time(unsigned long *time)
while (0 == flag) /* wait for result */
;
+ /* XXX to avoid wrong reordering by gcc 2.95.x with -fgcse */
+ __asm volatile ("" ::: "memory");
+
memcpy(time, output + 1, 4);
return 0;