From 29d53b422954f80c0e06419a5673b000b94385c5 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 9 May 2008 15:54:20 +0000 Subject: 2008-05-09 Andrei Barbu * i386/i386/loose_ends.c (DELAY): Use volatile qualifier instead of register to prevent optimization. --- ChangeLog | 5 +++++ i386/i386/loose_ends.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c81419a..47e33f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-09 Andrei Barbu + + * i386/i386/loose_ends.c (DELAY): Use volatile qualifier instead of + register to prevent optimization. + 2008-03-10 Samuel Thibault * 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) { -- cgit v1.2.3