summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-05-09 15:54:20 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:14 +0200
commit29d53b422954f80c0e06419a5673b000b94385c5 (patch)
treed3b28aca2d2df5671caf3b0d94e4e72da0ffb6ea
parent7a1b5e7dfce7880afddd4f0ac540ab9ad7ba5681 (diff)
2008-05-09 Andrei Barbu <teval0@gmail.com>
* i386/i386/loose_ends.c (DELAY): Use volatile qualifier instead of register to prevent optimization.
-rw-r--r--ChangeLog5
-rw-r--r--i386/i386/loose_ends.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c81419a..47e33f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-09 Andrei Barbu <teval0@gmail.com>
+
+ * i386/i386/loose_ends.c (DELAY): Use volatile qualifier instead of
+ register to prevent optimization.
+
2008-03-10 Samuel Thibault <samuel.thibault@ens-lyon.org>
* doc/Makefrag.am: Fix typo.
diff --git a/i386/i386/loose_ends.c b/i386/i386/loose_ends.c
index c7d54c3..825303f 100644
--- a/i386/i386/loose_ends.c
+++ b/i386/i386/loose_ends.c
@@ -40,7 +40,7 @@ int boothowto = 0;
/* Someone with time should write code to set cpuspeed automagically */
int cpuspeed = 4;
-#define DELAY(n) { register int N = cpuspeed * (n); while (--N > 0); }
+#define DELAY(n) { volatile int N = cpuspeed * (n); while (--N > 0); }
void
delay(n)
{