Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!lll-winken!decwrl!petunia!polyslo!rcfische From: rcfische@polyslo.CalPoly.EDU (Raymond C. Fischer) Newsgroups: comp.sys.mac.programmer Subject: Re: Mixing Sane And 881 Message-ID: <25f44316.711e@polyslo.CalPoly.EDU> Date: 6 Mar 90 23:09:10 GMT References: <629.25F2006D@blkcat.fidonet.org> Reply-To: rcfische@polyslo.CalPoly.EDU (Raymond C. Fischer) Distribution: na Organization: Cal Poly State University -- San Luis Obispo Lines: 24 In article <629.25F2006D@blkcat.fidonet.org> Ken.Knight@f421.n109.z1.fidonet.org (Ken Knight) writes: >Can anyone tell me how to mix code so that it will be able to take best >advantage of the math system available. That is, if an FPU (881/2) is >available to use it; otherwise use SANE; or if the user wants to use >SANE via the math chip? I know it is possible (there are benchmarks that >let the user decide how to do math), but I can not figure out how to do >it. I would be working in either Pascal or C (rather avoid Assembly) in >the MPW environment. I have tried just having parts of code compiled for >881 direct and other compiled normally, but you can not seem to mix >them. THe linker did not like it. Worse, FPU code requires 68020 code >and it does not seem possible to mix 68020 and 68000 code together. I am >obviously missing something and it is probably simple. HELP! Thanks in >advance... 'Tis simple. Just compile two versions of the program. If you REALLY wanted to, you could test for the 68882 and branch to the appropriate version of the routine, but this is generally nasty business. Just one of the problems is that 68882 reals are a different format (and different size) than SANE reals. BTW, FPU code does NOT require 68020 code. Two different beasts entirely. Ray Fischer rcfische@polyslo.calpoly.edu