Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!princeton!notecnirp!nfs From: nfs@notecnirp.Princeton.EDU (Norbert Schlenker) Newsgroups: comp.os.minix Subject: Intel CPU detection Summary: How does this work for you??? Keywords: IBM Intel CPU FPU Message-ID: <24855@princeton.Princeton.EDU> Date: 12 Mar 90 21:56:54 GMT Sender: news@princeton.Princeton.EDU Reply-To: nfs@notecnirp.UUCP (Norbert Schlenker) Organization: Dept. of Computer Science, Princeton University Lines: 128 I need a large variety of testers for the enclosed routines, so I'm posting them here. The routines identify the type of Intel CPU and math coprocessor in use by a program. My intention is to modify /usr/lib/crtso.s to execute equivalent code at program startup, so that programs can take advantage of the expanded instruction set in 80186+ processors. This would be particularly useful in the library. Andy Tanenbaum has expressed interest in this, but he insists that the code work on every 80x86. I have tested this on quite a number of machines, and Bruce Evans has helped me out with some machines to which he has access. There are still gaps in the test coverage. To run these routines, you must: - Pull the posting apart (uud, compress -d, unshar). There will be three files: test.c, cpuid.s, and fpuid.s. - Edit the constants at the top of test.c to reflect (approximately) your machine and your patience. They are currently set up for 30 second tests for (each of) the CPU and FPU on my Toshiba 5100, which is about the limit of my patience. :-) - Compile with: cc -o test test.c cpuid.s fpuid.s - Run test. Send me the results, please, by email. I am particularly interested in reports of failures, but would also like confirmation that the successful tests that Bruce and I have run are not flukes. When sending a result, please describe your system (CPU/FPU) and whether the result was seen in real mode or protected mode. If the test fails, either because it misdetected the type of chip(s) you run or because the test program detected an inconsistency, please describe the failure. Thanks for your help. Norbert --------------------------------------------------------------------------- table !"#$%&'()*+,-./0123456789:;<=>? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ begin 644 id.shar.Z M'YV-9<:@>0,"#X@6(.B4F4/'Q1@%<\J0 7'BA13-FX= T<]RL&w M9AN<>LO"t M=^[!)Q]]R\&0WWX@G)56&6NU!=Z !5)U8((+-EC>@SB-P48=Z)'$$!F\N8"&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