home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!philapd!alp!dolf
- From: dolf@echo.philips.nl (Dolf Grunbauer)
- Newsgroups: comp.sys.m68k
- Subject: Re: Which processor?
- Keywords: processor, cache
- Message-ID: <1992Sep1.074208.25185@echo.philips.nl>
- Date: 1 Sep 92 07:42:08 GMT
- References: <6040@pdxgate.UUCP> <1992Aug31.044532.570@ka8lvz.uucp>
- Organization: Digital Equipment Corporation, E.C.H.O. development department
- Lines: 29
-
- lydic@ka8lvz.uucp (lydic) writes:
-
- >In article <6040@pdxgate.UUCP> idr@rigel.cs.pdx.edu (Ian D Romanick) writes:
- >>How does one go about detmining what processor you are running on? On my
- >>machine type only 68000, '010, '020, '030, and '040 are available and I need
- >>to be able to know which I'm running on. I also need to know how to shut off
- >>the caches on the before mentioned processors. I've though about using an
- >>illegal instruction trap, but I'm sure there has to be a more elegent method.
- >>If there's a FAQ for this, sorry, but point me in its direction. :)
-
- > The only way I know is to generate an illegal instruction or an address
- > error (except '20 & '30) and look at the stack frame size. Actually pretty
- > easy to do, although not very elegant.
-
- I always used the instruction address error, using an odd address.
- Coudl be done in C also:
-
- int (*func)() = (*)()1;
-
- (*func)(); /* <- this generates the address error */
-
- and look at the stack frame.
-
- If you want to see whether a math co-prossor is available, just try an FNOP.
- --
- _ _
- / U | Dolf Grunbauer E.C.H.O. Development Digital Equipment Enterprises
- /__'< dolf@echo.philips.nl dolf@toet.echo.tds.philips.nl
- 88 |_\ mcsun!echo.philips.nl!dolf Was Dat voor niets ?
-