Date: Sat, 07 Dec 1996 13:40:33 +0800 From: Peter Wemm <peter@spinner.DIALix.COM> To: Bruce Evans <bde@zeta.org.au> Cc: toor@dyson.iquest.net, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, dyson@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/include endian.h Message-ID: <199612070540.NAA27541@spinner.DIALix.COM> In-Reply-To: Your message of "Sat, 07 Dec 1996 16:29:42 %2B1100." <199612070529.QAA16289@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote: > Not now. None did. The inlines and macros can be treated as a library > and cpu-dependent ones can be chosen in the places that use them. > This is unwieldy for the ntoh* functions since they are used a lot. > Bswap is the only generally useful instruction in ix86's that isn't > always available, so there are unlikely to be more cases like this > for ix86's. Just as a thought, is it possible to handle the illegal instruction trap on the i386 and emulate the bswap instruction? Then we could just use bswap everywhere and be done with it. Obviously this would be a penalty on the i386 (I wonder how much?), but it'd simplify the environment on the "current" mainstream cpu's. Perhaps this would also be worth doing for invlpg() and other instructions? It would eliminate a runtime overhead for testing cpu_class on >= i486 cpu's kinda like how we handle the %ds pop in returning to user - rather than test for bogus values, we simply do it and IF it fails, then take the time to pick up the bits. Please forgive my "crackpot" ideas.. I've just woken up and the coffee has not had a chance to kick in yet. :-) > Bruce Cheers, -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612070540.NAA27541>
