Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: VAX sin/cos/atan2 vs polyd (Was: Does anyone have a netbsd-5 or earlier VAX to hand?)



In article 
<CAGN_6pY=QoOZ-J87U_kr0=40=7VrMJHrYbJ8UpCj8enC-C-65g%mail.gmail.com@localhost>,
David Brownlee  <abs%absd.org@localhost> wrote:
>Question first, rationale later :)
>
>Question: Does anyone know of an VAX assembler implementation of
>sin/cos and atan2 which avoids the use of POLY?
>
>Rationale:
>
>Thanks to those who ran the sintest program on their VAXen, it
>looks like the issue was VAX CPU architecture specific rather than
>OS revision (I knew POLY rang a bell somewhere :)
>
>The POLY instruction was dropped in Rigel and later CPU variants,
>which is a problem for NetBSD/vax's use of them in
>lib/libm/arch/vax/{n_argred.S,n_atan2.S} - source at
>http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/arch/vax/
>
>There are a couple of obvious options to fix this:
>a) Recode the assembly in those routines to avoid use of POLYD
>b) Switch to a plain C implementation
>
>(see question at top of email :)
>
>Combined with a side option of:
> i) Doing one of the above unconditionally
>ii) Having runtime logic to switch versions based on CPU implementation,
>    potentially via an ld.so.conf extra library as used by i386 & sparc
>    to conditionally load arch specific overlays
>
>Assuming someone has an alternative implementation the side option
>only becomes relevant if it is appreciably slower than the current
>code on earlier VAX CPUs which implement POLY...

c) emulate it.

christos




Home | Main Index | Thread Index | Old Index