[5363] in Athena Bugs
RT libc: fabs()
daemon@ATHENA.MIT.EDU (John Carr)
Sat Jun 30 10:55:52 1990
To: bugs@ATHENA.MIT.EDU
Date: Sat, 30 Jun 90 10:55:35 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>
/source/bsd-4.3/rt/lib/libc/ca/gen/fabs_rtfl.s can be replaced with the
following file. The takes advantage of the definition of IEEE floating point:
the MSB is the sign bit, so absolute value does nothing but clear the sign bit
(it can not cause an exception, so there is no need to use the floating point
hardware).
Makefile will also need to be changed to pick up the new file name.
fabs.s:
----------------------------------------------------------------
#include "LINKG.h"
ENTRY(fabs)
brx r15
nilo r2,r2,0x7fff
----------------------------------------------------------------