Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!rosie!news From: news@NeXT.COM (news) Newsgroups: comp.sys.next Subject: Re: 68040 Math / Why so much system time? Message-ID: <290@rosie.NeXT.COM> Date: 14 Feb 91 18:49:04 GMT References: <1991Feb14.160749.19048@batcomputer.tn.cornell.edu> Organization: Next Computer, Inc. Lines: 36 Nntp-Posting-Host: 129.18.2.228 In article <1991Feb14.160749.19048@batcomputer.tn.cornell.edu> finn@batcomputer.tn.cornell.edu (Lee Samuel Finn) writes: > [ Text deleted ] > Why all the system time spent doing a sin()? Just fyi, the same prog > lsf@astrosun.tn.cornell.edu > On our 68030 cubes with the 68882 FPU, all of the floating point arithmetic instructions were handled on the 68882. For the 68040, Motorola decided to incorporate a subset of the 68882 on chip. In following the RISC philosophy, they didn't dump the whole 68882 on chip, but rather concentrated on the most used instructions that they could make the fastest, and put those on the 040. The instructions that weren't put on the chip (transcendentals mostly) are trapped by the '040 into the kernel, where they are handled by floating point software that emulates that instruction. The time spent inside the kernel doing sin(), cos(), atanh(), etc is accrued onto your task's system time, which is what you noticed. Last time I timed the transcendentals on the 68040, they were faster than the instructions run in hardware on the 68882. The 040 floating point hardware instructions are FADD, FSUB, FMUL, FDIV, FSQRT, FMOVE (most addressing modes), FABS, FNEG, FMOVEM, FCMP, FSAVE, FScc, FDBcc, FBcc, FRESTORE The 040 floating point software instructions are FACOS, FASIN, FATAN, FATANH, FCOS, FCOSH, FETOX, FETOXL, FGETEXP, FGETMAN, FINT, FINTRZ, FLOG10, FLOG2, FLOGN, FLOGNP1, FMOD, FMOVECR, FREM, FSCALE, FSIN, FSINCOS, FSINH, FTAN, FTANH, FTENTOX, FTWOTOX Hope this helps. --morris Morris Meyer NeXT, Inc. Software Engineer 900 Chesapeake Drive NeXT OS Group Redwood City, CA 94063 mmeyer@next.com