Patches for AT&T assembler version of 80386 math lib
Glenn Geers
glenn at qed.physics.su.OZ.AU
Wed Dec 19 06:26:43 AEST 1990
Hi,
The following set of context diffs allow the alternative math library -
libfpu.a - to be compiled on systems without gcc. Diffs are relative to
version 2.0 of libfpu.a. With the updated version of nextafter[f].c.
A lot of the patches just fix the comment form from C style /* */ to
AT&T assembler // style.
Warning
-------
Be warned pow.s is very different. Although a lot of the assembler files
are the same, some are different in ways that are not obvious. Gas will
assemble them and you'll get a library that gives the wrong results.
Caveat
------
Only the double version has been patched. You need gcc to compile the float
version. I figured that most people who want float support would have gcc
anyway. But don't fret! it'll be done for the next full blown release.
What To Do
----------
1. Unpack the shar file contained in this posting.
2. Apply the patches (patch < att.pats)
3. Edit the Makefile and define GCC=cc
4. Type 'make libfpu'
5. Type 'make paranoia' - ignore errors from make - you may not have
libffpu.a. Make sure paranoia works - ESIX 'cc' (rev. D) produces a paranoia
that will dump core at the end of an otherwise successful run. This is ok.
6. Type 'make install'. Again ignore errors from make.
Enjoy,
Glenn
glenn at qed.physics.su.oz.au
---- Cut Here and feed the following to sh ----
#!/bin/sh
# This is a shell archive (shar 3.47)
# made 12/18/1990 04:56 UTC by root at trantor
# Source directory /usr1/src/math
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 40533 -rw-r--r-- att.pats
#
# ============= att.pats ==============
if test -f 'att.pats' -a X"$1" != X"-c"; then
echo 'x - skipping att.pats (File already exists)'
else
echo 'x - extracting att.pats (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'att.pats' &&
*** ../_getsw.s Sun Dec 9 18:13:52 1990
--- _getsw.s Mon Dec 17 15:02:29 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl _getsw
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl _getsw
*** ../acos.s Sun Dec 9 18:13:52 1990
--- acos.s Mon Dec 17 14:06:57 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .Lhalfpi:
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .Lhalfpi:
***************
*** 27,41 ****
X fst %st(1)
X fmull 8(%ebp)
X fld1
! fsubp
X fsqrt
! fdivp
X fld1
X fpatan
X jnc .Ldone
X
X fldpi
! faddp
X leave
X ret
X
--- 27,41 ----
X fst %st(1)
X fmull 8(%ebp)
X fld1
! fsubp %st, %st(1)
X fsqrt
! fdivp %st, %st(1)
X fld1
X fpatan
X jnc .Ldone
X
X fldpi
! faddp %st, %st(1)
X leave
X ret
X
*** ../acosh.s Sun Dec 9 18:13:52 1990
--- acosh.s Tue Dec 18 06:51:37 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl acosh
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl acosh
***************
*** 17,23 ****
X
X fmull 8(%ebp)
X fld1
! fsubrp
X fsqrt
X faddl 8(%ebp)
X fldln2
--- 17,23 ----
X
X fmull 8(%ebp)
X fld1
! fsubrp %st, %st(1)
X fsqrt
X faddl 8(%ebp)
X fldln2
*** ../asin.s Sun Dec 9 18:13:52 1990
--- asin.s Mon Dec 17 14:10:03 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl asin
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl asin
***************
*** 16,28 ****
X fldl 8(%ebp)
X fst %st(1)
X fst %st(2)
! fmulp
X fld1
! fsubp
X fsqrt
X fld1
! fdivp
! fmulp
X fld1
X fpatan
X
--- 16,28 ----
X fldl 8(%ebp)
X fst %st(1)
X fst %st(2)
! fmulp %st, %st(1)
X fld1
! fsubp %st, %st(1)
X fsqrt
X fld1
! fdivp %st, %st(1)
! fmulp %st, %st(1)
X fld1
X fpatan
X
*** ../asinh.s Sun Dec 9 18:13:52 1990
--- asinh.s Mon Dec 17 14:11:34 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl asinh
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl asinh
***************
*** 17,23 ****
X
X fmull 8(%ebp)
X fld1
! faddp
X fsqrt
X faddl 8(%ebp)
X fldln2
--- 17,23 ----
X
X fmull 8(%ebp)
X fld1
! faddp %st, %st(1)
X fsqrt
X faddl 8(%ebp)
X fldln2
*** ../atan.s Sun Dec 9 18:13:52 1990
--- atan.s Mon Dec 17 14:12:28 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl atan
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl atan
*** ../atan2.s Sun Dec 9 18:13:52 1990
--- atan2.s Tue Dec 18 06:57:16 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .Lpi:
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .Lpi:
***************
*** 37,43 ****
X jz .Lgotzero
X jc .Lgotneg
X
! fdivp
X fld1
X fpatan
X
--- 37,43 ----
X jz .Lgotzero
X jc .Lgotneg
X
! fdivp %st, %st(1)
X fld1
X fpatan
X
***************
*** 50,70 ****
X sahf
X jc .Lneg1
X
! fdivp
X fld1
X fpatan
X fldl .Lmpi
! fsubrp
X
X leave
X ret
X
X .Lneg1:
! fdivp
X fld1
X fpatan
X fldl .Lpi
! fsubrp
X
X leave
X ret
--- 50,70 ----
X sahf
X jc .Lneg1
X
! fdivp %st, %st(1)
X fld1
X fpatan
X fldl .Lmpi
! fsubrp %st, %st(1)
X
X leave
X ret
X
X .Lneg1:
! fdivp %st, %st(1)
X fld1
X fpatan
X fldl .Lpi
! fsubrp %st, %st(1)
X
X leave
X ret
*** ../atanh.s Sun Dec 9 18:13:53 1990
--- atanh.s Tue Dec 18 06:50:11 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .Lhalf:
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .Lhalf:
***************
*** 21,27 ****
X faddl 8(%ebp)
X fld1
X fsubl 8(%ebp)
! fdivrp
X
X fldln2
X fxch %st(1)
--- 21,27 ----
X faddl 8(%ebp)
X fld1
X fsubl 8(%ebp)
! fdivrp %st, %st(1)
X
X fldln2
X fxch %st(1)
***************
*** 28,34 ****
X fyl2x
X
X fldl .Lhalf
! fmulp
X
X leave
X ret
--- 28,34 ----
X fyl2x
X
X fldl .Lhalf
! fmulp %st, %st(1)
X
X leave
X ret
*** ../ceil.s Sun Dec 9 18:13:53 1990
--- ceil.s Mon Dec 17 14:17:24 1990
***************
*** 1,13 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Could use ceil(x) = -floor(-x) but this is quicker.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl ceil
--- 1,13 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Could use ceil(x) = -floor(-x) but this is quicker.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl ceil
*** ../copysign.s Wed Dec 12 06:52:45 1990
--- copysign.s Mon Dec 17 14:18:13 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl copysign
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl copysign
*** ../cos.s Sun Dec 9 18:13:53 1990
--- cos.s Mon Dec 17 14:18:49 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl cos
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl cos
*** ../cosh.s Thu Dec 13 19:35:36 1990
--- cosh.s Tue Dec 18 06:55:23 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .LC2:
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .LC2:
***************
*** 26,48 ****
X
X .Lpos:
X fldl2e
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X fst %st(1)
X
X fld1
! fdivp
! faddp
X
X fldl .LC2
! fmulp
X
X leave
X ret
--- 26,48 ----
X
X .Lpos:
X fldl2e
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X fst %st(1)
X
X fld1
! fdivp %st, %st(1)
! faddp %st, %st(1)
X
X fldl .LC2
! fmulp %st, %st(1)
X
X leave
X ret
*** ../drem.s Sun Dec 9 18:13:53 1990
--- drem.s Mon Dec 17 14:24:54 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl drem
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl drem
*** ../exp.s Sun Dec 9 18:13:54 1990
--- exp.s Tue Dec 18 09:43:48 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl exp
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl exp
***************
*** 15,28 ****
X
X fldl 8(%ebp)
X fldl2e
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X
X leave
--- 15,28 ----
X
X fldl 8(%ebp)
X fldl2e
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X
X leave
*** ../exp10.s Sun Dec 9 18:13:54 1990
--- exp10.s Tue Dec 18 06:53:40 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl exp10
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl exp10
***************
*** 15,28 ****
X
X fldl 8(%ebp)
X fldl2t
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X
X leave
--- 15,28 ----
X
X fldl 8(%ebp)
X fldl2t
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X
X leave
*** ../exp2.s Sun Dec 9 18:13:54 1990
--- exp2.s Tue Dec 18 06:57:45 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl exp2
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl exp2
***************
*** 14,26 ****
X movl %esp,%ebp
X
X fldl 8(%ebp)
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X
X leave
--- 14,26 ----
X movl %esp,%ebp
X
X fldl 8(%ebp)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X
X leave
*** ../expm1.s Thu Dec 13 19:03:26 1990
--- expm1.s Tue Dec 18 06:54:10 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl expm1
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl expm1
***************
*** 16,29 ****
X
X fldl 8(%ebp)
X fldl2e
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X
X fstpl -8(%ebp)
--- 16,29 ----
X
X fldl 8(%ebp)
X fldl2e
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X
X fstpl -8(%ebp)
***************
*** 31,48 ****
X fldl 8(%ebp)
X fchs
X fldl2e
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X
X fld1
! fsubp
X fmull -8(%ebp)
X
X leave
--- 31,48 ----
X fldl 8(%ebp)
X fchs
X fldl2e
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X
X fld1
! fsubp %st, %st(1)
X fmull -8(%ebp)
X
X leave
*** ../fabs.s Sun Dec 9 18:13:54 1990
--- fabs.s Mon Dec 17 14:31:48 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl fabs
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl fabs
*** ../finite.s Sun Dec 9 18:13:54 1990
--- finite.s Mon Dec 17 14:32:09 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl finite
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl finite
*** ../floor.s Sun Dec 9 18:13:54 1990
--- floor.s Mon Dec 17 14:32:41 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl floor
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl floor
*** ../fmod.s Sun Dec 9 18:13:54 1990
--- fmod.s Mon Dec 17 14:33:15 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl fmod
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl fmod
*** ../hypot.s Sun Dec 9 18:13:55 1990
--- hypot.s Mon Dec 17 14:35:25 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl hypot
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl hypot
***************
*** 17,23 ****
X fmull 8(%ebp)
X fldl 16(%ebp)
X fmull 16(%ebp)
! faddp
X fsqrt
X
X leave
--- 17,23 ----
X fmull 8(%ebp)
X fldl 16(%ebp)
X fmull 16(%ebp)
! faddp %st, %st(1)
X fsqrt
X
X leave
*** ../ieee_ext.s Tue Dec 11 18:45:05 1990
--- ieee_ext.s Mon Dec 17 14:36:21 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl isnan
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl isnan
*** ../ieee_values.s Mon Dec 17 12:11:31 1990
--- ieee_values.s Mon Dec 17 14:36:46 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl max_normal
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl max_normal
*** ../infinity.s Mon Dec 17 12:08:18 1990
--- infinity.s Mon Dec 17 14:37:07 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl infinity
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl infinity
*** ../log.s Sun Dec 9 18:13:55 1990
--- log.s Mon Dec 17 14:38:00 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl log
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl log
*** ../log10.s Sun Dec 9 18:13:55 1990
--- log10.s Mon Dec 17 14:38:09 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl log10
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl log10
*** ../log1p.s Sun Dec 9 18:13:56 1990
--- log1p.s Mon Dec 17 14:38:41 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl log1p
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl log1p
***************
*** 16,22 ****
X fldln2
X fldl 8(%ebp)
X fld1
! faddp
X fyl2x
X
X leave
--- 16,22 ----
X fldln2
X fldl 8(%ebp)
X fld1
! faddp %st, %st(1)
X fyl2x
X
X leave
*** ../log2.s Sun Dec 9 18:13:56 1990
--- log2.s Mon Dec 17 14:39:30 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl log2
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl log2
*** ../logb.s Sun Dec 9 18:13:56 1990
--- logb.s Mon Dec 17 14:42:35 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl logb
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl logb
***************
*** 15,21 ****
X
X fldl 8(%ebp)
X fxtract
! fldl %st(1)
X
X leave
X ret
--- 15,21 ----
X
X fldl 8(%ebp)
X fxtract
! fld %st(1)
X
X leave
X ret
*** ../pow.s Sun Dec 9 18:13:56 1990
--- pow.s Tue Dec 18 08:12:52 1990
***************
*** 1,161 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** This file started life as a C implemenation of pow, it then evolved
! ** into an embeded asm version (with some C) and finally, all assembler.
! ** It's actually hacked assembler produced by gcc.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
! .text
! .LC0:
! .ascii "pow: DOMAIN error\12\0"
! .align 4
! .LC1:
! .double 0d0.00000000000000000000e+00
! .align 4
! .LC2:
! .double 0d1.00000000000000000000e+00
! .align 4
! .globl pow
X pow:
! pushl %ebp
! movl %esp,%ebp
! subl $28,%esp
! pushl %edi
! pushl %esi
! pushl %ebx
! movl 16(%ebp),%esi
! movl 20(%ebp),%edi
! movl $0,-4(%ebp)
! movl $1,%ebx
! fldl 8(%ebp)
! ftst
! fstp %st(0)
! fnstsw %ax
! sahf
! jae .L2
! movl %ebx,-4(%ebp)
! pushl %edi
! pushl %esi
! /**/
! fldl 16(%ebp)
!
! fstcw -8(%ebp)
! fstcw -12(%ebp)
! orw $0x0400, -12(%ebp)
X fldcw -12(%ebp)
!
! frndint
! fldcw -8(%ebp)
! /**/
! fstpl -16(%ebp)
! pushl %edi
! pushl %esi
! fldl (%esp)
! addl $8,%esp
! fsubl -16(%ebp)
! fstpl -16(%ebp)
! addl $8,%esp
! fldl -16(%ebp)
! ftst
! fstp %st(0)
! fnstsw %ax
! sahf
! je .L3
! movl $33,errno
! pushl $.LC0
! pushl $_iob+32
! call fprintf
! fldl .LC1
! jmp .L1
! .align 4
! .L3:
! pushl %edi
! pushl %esi
! /**/
X fldl 16(%ebp)
! fistpl -8(%ebp)
! movl -8(%ebp),%eax
! /**/
! testl %eax,%eax
! jge .L5
! incl %eax
! .L5:
! andl $-2,%eax
! movl -8(%ebp),%ecx
! subl %eax,%ecx
! movl %ecx,%eax
! testl %eax,%eax
! je .L2
! xorl %ebx,%ebx
! .L2:
! fldl 8(%ebp)
! ftst
! fstp %st(0)
! fnstsw %ax
! sahf
! jne .L6
! pushl %edi
! pushl %esi
! fldl (%esp)
! addl $8,%esp
! ftst
! fstp %st(0)
! fnstsw %ax
! sahf
! je .L6
! fldl .LC1
! jmp .L1
! .align 4
! .L6:
! pushl %edi
! pushl %esi
! fldl (%esp)
! addl $8,%esp
! ftst
! fstp %st(0)
! fnstsw %ax
! sahf
! jne .L8
! fldl .LC2
! jmp .L1
! .align 4
! .L8:
! /APP
! fldl 16(%ebp)
! fldl 8(%ebp)
! /NO_APP
! cmpl $0,-4(%ebp)
! je .L10
! /APP
! fchs
! /NO_APP
! .L10:
! /APP
! fyl2x
! fstl %st(1)
! frndint
! fstl %st(2)
! fsubrp
! f2xm1
! fld1
! faddp
! fscale
! /NO_APP
! testl %ebx,%ebx
! jne .L1
! /APP
! fchs
! /NO_APP
! .L1:
! leal -28(%ebp),%esp
! popl %ebx
! popl %esi
! popl %edi
! leave
! ret
--- 1,190 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // This file started life as a C implemenation of pow, it then evolved
! // into an embeded asm version (with some C) and finally, all assembler.
! // It's actually hacked assembler produced by gcc.
! //
! // Copyright 1990 G. Geers
! //
! //
X
! .data
! .align 4
! .L92:
! .double 0.0000000000000000000000e+00
! .data
! .align 4
! .L94:
! .double 0.0000000000000000000000e+00
! .data
! .align 4
! .L96:
! .double 0.0000000000000000000000e+00
! .data
! .align 4
! .L99:
! .double 0.0000000000000000000000e+00
! .align 4
! .L100:
! .double 0.0000000000000000000000e+00
! .data
! .align 4
! .L101:
! .double 0.0000000000000000000000e+00
! .data
! .align 4
! .L103:
! .double 0.0000000000000000000000e+00
! .data
! .align 4
! .L104:
! .double 1.0000000000000000000000e+00
! .data
! .long __fltused
! .text
! .align 4
! .def pow; .val pow; .scl 2; .type 047; .endef
! .globl pow
X pow:
! pushl %ebp
! movl %esp,%ebp
! subl $16,%esp
! movl $0,-4(%ebp)
! movl $1,-8(%ebp)
! fldl 8(%ebp)
! fcompl .L92
! fstsw %ax
! sahf
! jae .L91
! movl $1,-4(%ebp)
! //
! fldl 16(%ebp)
! fstcw -12(%ebp)
! fstcw -16(%ebp)
! orw $0x0400, -16(%ebp)
! fldcw -16(%ebp)
! frndint
X fldcw -12(%ebp)
! //
! addl $8,%esp
! fsubrl 16(%ebp)
! fcompl .L94
! fstsw %ax
! sahf
! je .L93
! movl $33,errno
! pushl $.L95
! pushl $_iob+32
! call fprintf
! addl $8,%esp
! fldl .L96
! .L106:
! .L88:
! leave
! ret
! .align 4
! .L93:
! fstcw -12(%ebp)
! movw -12(%ebp),%ax
! orw $0x0c00,%ax
! movw %ax,-10(%ebp)
! fldcw -10(%ebp)
X fldl 16(%ebp)
! fistpl -16(%ebp)
! fldcw -12(%ebp)
! movl -16(%ebp),%eax
! movl $2,%ecx
! cltd
! idivl %ecx
! testl %edx,%edx
! je .L97
! movl $0,-8(%ebp)
! .L97:
! .L91:
! fldl 8(%ebp)
! fcompl .L100
! fstsw %ax
! sahf
! jne .L98
! fldl 16(%ebp)
! fcompl .L99
! fstsw %ax
! sahf
! je .L98
! fldl .L101
! leave
! ret
! .align 4
! .L98:
! fldl 16(%ebp)
! fcompl .L103
! fstsw %ax
! sahf
! jne .L102
! fldl .L104
! leave
! ret
! .align 4
! .L102:
! /ASM
! fldl 16(%ebp)
! /ASMEND0
! /ASM
! fldl 8(%ebp)
! /ASMEND1
! cmpl $0,-4(%ebp)
! je .L105
! /ASM
! fchs
! /ASMEND2
! .L105:
! /ASM
! fyl2x
! /ASMEND3
! /ASM
! fst %st(1)
! /ASMEND4
! /ASM
! frndint
! /ASMEND5
! /ASM
! fst %st(2)
! /ASMEND6
! /ASM
! fsubr %st(1), %st
! /ASMEND7
! /ASM
! f2xm1
! /ASMEND8
! /ASM
! fld1
! /ASMEND9
! /ASM
! faddp %st, %st(1)
! /ASMEND10
! /ASM
! fld %st(2)
! /ASMEND11
! /ASM
! fstp %st(2)
! /ASMEND12
! /ASM
! fscale
! /ASMEND13
! cmpl $0,-8(%ebp)
! jne .L106
! /ASM
! fchs
! /ASMEND14
! leave
! ret
! .align 4
! .def pow; .val .; .scl -1; .endef
! .data
! .L95:
! .byte 0x70,0x6f,0x77,0x3a,0x20,0x44,0x4f,0x4d,0x41,0x49
! .byte 0x4e,0x20,0x45,0x52,0x52,0x4f,0x52,0x0a,0x00
! .text
*** ../rint.s Sun Dec 9 18:13:56 1990
--- rint.s Mon Dec 17 14:53:52 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl rint
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl rint
*** ../scalb.s Thu Dec 13 13:55:10 1990
--- scalb.s Mon Dec 17 14:54:21 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl scalb
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl scalb
*** ../setcont.s Sun Dec 9 18:13:57 1990
--- setcont.s Mon Dec 17 14:54:38 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl setcont
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl setcont
*** ../setinternal.s Sun Dec 9 18:13:57 1990
--- setinternal.s Mon Dec 17 14:54:47 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl setinternal
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl setinternal
*** ../sin.s Sun Dec 9 18:13:57 1990
--- sin.s Mon Dec 17 14:54:58 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl sin
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl sin
*** ../sinh.s Sun Dec 16 08:51:42 1990
--- sinh.s Tue Dec 18 06:53:16 1990
***************
*** 1,15 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! ** This file started life as a C program but has been massively hacked.
! **
! ** The coefficients are from Hart, et.al. via Berkeley
! **
! */
X
X .data
X .align 4
--- 1,15 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! // This file started life as a C program but has been massively hacked.
! //
! // The coefficients are from Hart, et.al. via Berkeley
! //
! //
X
X .data
X .align 4
***************
*** 71,87 ****
X jbe .L3
X fldl -8(%ebp)
X fldl2e
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X fldl .LC1
! fmulp
X testl %edx,%edx
X jg .L7
X fchs
--- 71,87 ----
X jbe .L3
X fldl -8(%ebp)
X fldl2e
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X fldl .LC1
! fmulp %st, %st(1)
X testl %edx,%edx
X jg .L7
X fchs
***************
*** 97,117 ****
X jbe .L6
X fldl 8(%ebp)
X fldl2e
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
X fst %st(1)
X fld1
! fdivp
! fsubrp
X fldl .LC1
! fmulp
X leave
X ret
X .L6:
--- 97,117 ----
X jbe .L6
X fldl 8(%ebp)
X fldl2e
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
X fst %st(1)
X fld1
! fdivp %st, %st(1)
! fsubrp %st, %st(1)
X fldl .LC1
! fmulp %st, %st(1)
X leave
X ret
X .L6:
*** ../sqrt.s Sun Dec 9 18:13:57 1990
--- sqrt.s Mon Dec 17 14:58:28 1990
***************
*** 1,12 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! ** sqrt in the prevailing precision
! */
X
X .align 4
X .globl sqrt
--- 1,12 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! // sqrt in the prevailing precision
! //
X
X .align 4
X .globl sqrt
*** ../sqrtp.s Sun Dec 9 18:13:57 1990
--- sqrtp.s Mon Dec 17 14:58:52 1990
***************
*** 1,12 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! ** sqrt in 64 bit precision always
! */
X
X .align 4
X .globl sqrtp
--- 1,12 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! // sqrt in 64 bit precision always
! //
X
X .align 4
X .globl sqrtp
*** ../tan.s Sun Dec 9 18:13:57 1990
--- tan.s Mon Dec 17 14:59:55 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl tan
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl tan
*** ../tanh.s Sun Dec 9 18:13:58 1990
--- tanh.s Tue Dec 18 06:56:49 1990
***************
*** 1,11 ****
! /*
! ** This file is part of the alternative 80386 math library and is
! ** covered by the GNU General Public license with my modification
! ** as noted in the README file that accompanied this file.
! **
! ** Copyright 1990 G. Geers
! **
! */
X
X .align 4
X .globl tanh
--- 1,11 ----
! //
! // This file is part of the alternative 80386 math library and is
! // covered by the GNU General Public license with my modification
! // as noted in the README file that accompanied this file.
! //
! // Copyright 1990 G. Geers
! //
! //
X
X .align 4
X .globl tanh
***************
*** 16,39 ****
X
X fldl 8(%ebp)
X fldl2e
! fmulp
! fstl %st(1)
X frndint
! fstl %st(2)
! fsubrp
X f2xm1
X fld1
! faddp
X fscale
! fstl %st(1)
X fstl -16(%ebp)
X
X fld1
! fdivp
X
! fsubr
X faddl -16(%ebp)
! fdivrp
X
X leave
X ret
--- 16,39 ----
X
X fldl 8(%ebp)
X fldl2e
! fmulp %st, %st(1)
! fst %st(1)
X frndint
! fst %st(2)
! fsubrp %st, %st(1)
X f2xm1
X fld1
! faddp %st, %st(1)
X fscale
! fst %st(1)
X fstl -16(%ebp)
X
X fld1
! fdivp %st, %st(1)
X
! fsubr %st(1), %st
X faddl -16(%ebp)
! fdivrp %st, %st(1)
X
X leave
X ret
*** ../nextafter.c Mon Dec 17 12:00:23 1990
--- nextafter.c Tue Dec 18 10:03:34 1990
***************
*** 64,80 ****
X asm("fldl .Lulpup");
X
X asm("fldl -16(%ebp)");
! asm("fmulp");
X
X if (y > x) {
X asm("fldl 8(%ebp)");
! asm("faddp");
X asm("leave");
X asm("ret");
X }
X if (y < x) {
X asm("fldl 8(%ebp)");
! asm("fsubp");
X asm("leave");
X asm("ret");
X }
--- 64,80 ----
X asm("fldl .Lulpup");
X
X asm("fldl -16(%ebp)");
! asm("fmulp %st, %st(1)");
X
X if (y > x) {
X asm("fldl 8(%ebp)");
! asm("faddp %st, %st(1)");
X asm("leave");
X asm("ret");
X }
X if (y < x) {
X asm("fldl 8(%ebp)");
! asm("fsubp %st, %st(1)");
X asm("leave");
X asm("ret");
X }
SHAR_EOF
chmod 0644 att.pats ||
echo 'restore of att.pats failed'
Wc_c="`wc -c < 'att.pats'`"
test 40533 -eq "$Wc_c" ||
echo 'att.pats: original size 40533, current size' "$Wc_c"
fi
exit 0
--
Glenn Geers | "So when it's over, we're back to people.
Department of Theoretical Physics | Just to prove that human touch can have
The University of Sydney | no equal."
Sydney NSW 2006 Australia | - Basia Trzetrzelewska, 'Prime Time TV'
More information about the Alt.sources
mailing list