Subject: Re: DUMMY_NOPS
To: None <tls@rek.tjls.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: port-i386
Date: 10/04/2001 10:49:42
From: Thor Lancelot Simon <tls@rek.tjls.com>
> -mcpu=pentiumpro -march=pentium seems to be safe, though; as is
> -mcpu=pentiumpro -march=pentiumpro in a kernel build *so long as gcc
> itself was not built that way*.
% cc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release)
% cat x.c
#include <sys/types.h>
#include <machine/intr.h>
static int unsafedata;
test()
{
int s = splbio();
unsafedata++;
splx(s);
}
% cc -S -O2 -march=pentiumpro x.c
% cat x.s
<snip>
movl cpl,%eax
movl %eax,%edx
orl imask+24,%edx
movl %edx,cpl
movl %eax,cpl /* no meaning of spl, sigh */
movl ipending,%edx
movl %esp,%ebp
subl $8,%esp
incl unsafedata
notl %eax
testl %edx,%eax
je .L9
call Xspllower
.L9:
in this case, we can make unsafedata volatile to
avoid problems. but i don't think we should do so.
---
YAMAMOTO Takashi<yamt@mwd.biglobe.ne.jp>