Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!ames!claris!apple!dan From: dan@Apple.COM (Dan Allen) Newsgroups: comp.sys.mac.programmer Subject: Re: Knowing Machine Code Message-ID: <12217@apple.Apple.COM> Date: 15 Jun 88 17:52:15 GMT References: <13735@comp.vuw.ac.nz> <104700032@uiucdcsp> <4760@husc6.harvard.edu> <13542@shemp.CS.UCLA.EDU> Reply-To: dan@apple.apple.com.UUCP (Dan Allen) Organization: Apple Computer Inc, Cupertino, CA Lines: 29 In article <13542@shemp.CS.UCLA.EDU> kennel@minnie.UUCP (Matthew Kennel) writes: > >When one compiles a floating point program on a non 68881 macintosh one >gets traps to the SANE package, right? And when one compiles for a >Mac II one gets real '881 instructions, right? (in an accusatory voice--- >"you do, don't you?") And if one runs that '881 code on a non FPP >machine you'd get some trap, something like 'unimplemented instruction' >or something like that, right? > >Then why doesn't the trap handler call the SANE package for '881 instructions? >ISN'T THAT WHY MOTOROLA PUT THOSE TRAPS IN THERE IN THE FIRST PLACE????!!???? > Unfortunately, this has been considered but rejected. I am not sure why it was rejected, but it does sound like the slick solution. The PACKages which implement the current software solution would have to be rewritten due to differences in argument sizes between software (80 bits) and hardware (96 bits). There is no completely uniform way of differentiating the various types of parameter passing that goes on. There is a grand total of one vector that ALL 881 calls would go through. The Handler would have to somehow disassemble the 881 instruction to figure out what it was going to do (say a FSQRT fp1,fp2 call), and then translate that into the appropriate PACK4 or PACK5 call, changing the parameter sizes, etc. It could be done, and may be a neat solution, but has not been done. Dan Allen Software Explorer Apple Computer