Subject: bogus line in i386/isa/npx.c?
To: None <port-i386@NetBSD.ORG>
From: David Gluss <david@pure.com>
List: port-i386
Date: 07/14/1995 11:17:35
I tried building gcc2.7.0 and recompiling the kernel.  All went
OK except for one line in npx.c, which invokes a macro that is
a "asm" statement:

#define	fnsave(addr)  __asm("fnsave %0" : "=m" (*addr) : "0" (*addr))

That is, the input/output argument is expected to be in memory.

That macro is used on line 400:

368:	register struct save87 *addr;
400:	fnsave(addr);

Well, the operand isn't in memory, it's in a register.  I guess.
Though *addr is a memory location.  Anyway, gcc2.7.0 barfs at this.
It's easy enough to fix, though on my machine the resulting kernel
boots in 29 seconds instead of 22 (for gcc 2.4.5) and is 893962 bytes
instead of 840758 bytes for the 2.4.5 kernel.

So my question is, is this a misstatement of the __asm line that 2.4.5
blissfully ignores?   Is this a bug in 2.7.0?  I am clearly NOT
recommending going to 2.7.0, because the code appears to be bigger
and slower...but perhaps such is progress.

--David Gluss    david@pure.com     408-524-3028