📄 fpa_trans.s
字号:
.data| .asciz "@(#)fpa_trans.s 1.1 92/07/30" .even .text| Copyright (c) 1989 by Sun Microsystems, Inc.#include "fpcrtdefs.h"/* double fpa_transcendental ( n, x ) long n ; double x ; computes fn(x) where 0 = sin 1 = cos 2 = tan 3 = atan 4 = exp-1 5 = ln(1+x) 6 = exp 7 = ln 8 = sqrt 9 = sqrt(x*2+y*2) where double x is a union containing &x and &y*/RTENTRY(_fpa_transcendental) movel PARAM,d0 lsll #2,d0#ifdef PIC PIC_SETUP(a0) movl a0@(table:w),a0#else lea table,a0#endif PIC addl d0,a0 movel a0@,a0 jmp a0@ #ifdef PIC .data | Put dispatch table in data if PIC#endif PICtable: .long msind,mcosd,mtand,matand,mexp1d,mlog1d,mexpd,mlogd,msqrtd,mhypotd .textmlogd: flognd PARAM2,fp0 bras 1fmsqrtd: fsqrtd PARAM2,fp0 bras 1fmsind: fsind PARAM2,fp0 bras 1fmcosd: fcosd PARAM2,fp0 bras 1fmtand: ftand PARAM2,fp0 bras 1fmatand: fatand PARAM2,fp0 bras 1fmexp1d: fetoxm1d PARAM2,fp0 bras 1fmexpd: fetoxd PARAM2,fp0 bras 1fmlog1d: flognp1d PARAM2,fp0 bras 1fmhypotd: movel PARAM2,a0 movel PARAM3,a1 fmoved a0@,fp0 fmulx fp0,fp0 fmoved a1@,fp1 fmulx fp1,fp1 faddx fp1,fp0 fsqrtx fp0,fp0 bras 1f1: fmoved fp0,sp@- moveml sp@+,d0/d1 RET/* double fpa_tolong ( x ) double x ; computes (double) (long) x according to Weitek mode*/RTENTRY(_fpa_tolong) fpmove fpamode,d0 andb #2,d0 beqs 1f | Branch if round to current mode. fintrzd PARAM,fp0 bras 2f1: fintd PARAM,fp02: fmovel fp0,d0 fmovel d0,fp0 fmoved fp0,PARAM moveml PARAM,d0/d1 RET
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -