From 58bbec2442aa59926b3ef60910e90b3ca18cbd9d Mon Sep 17 00:00:00 2001 From: kleink Date: Sun, 15 Aug 1999 18:45:18 +0000 Subject: [PATCH] Make these SVR4 ABI ready. --- lib/libm/arch/mc68881/e_acos.S | 4 +++- lib/libm/arch/mc68881/e_asin.S | 4 +++- lib/libm/arch/mc68881/e_atanh.S | 4 +++- lib/libm/arch/mc68881/e_cosh.S | 4 +++- lib/libm/arch/mc68881/e_exp.S | 4 +++- lib/libm/arch/mc68881/e_fmod.S | 4 +++- lib/libm/arch/mc68881/e_log.S | 4 +++- lib/libm/arch/mc68881/e_log10.S | 4 +++- lib/libm/arch/mc68881/e_remainder.S | 4 +++- lib/libm/arch/mc68881/e_scalb.S | 4 +++- lib/libm/arch/mc68881/e_sinh.S | 4 +++- lib/libm/arch/mc68881/e_sqrt.S | 4 +++- lib/libm/arch/mc68881/s_atan.S | 4 +++- lib/libm/arch/mc68881/s_ceil.S | 4 +++- lib/libm/arch/mc68881/s_copysign.S | 14 +++++++++++++- lib/libm/arch/mc68881/s_cos.S | 4 +++- lib/libm/arch/mc68881/s_expm1.S | 4 +++- lib/libm/arch/mc68881/s_floor.S | 4 +++- lib/libm/arch/mc68881/s_log1p.S | 4 +++- lib/libm/arch/mc68881/s_logb.S | 4 +++- lib/libm/arch/mc68881/s_rint.S | 4 +++- lib/libm/arch/mc68881/s_scalbn.S | 4 +++- lib/libm/arch/mc68881/s_sin.S | 4 +++- lib/libm/arch/mc68881/s_tan.S | 4 +++- lib/libm/arch/mc68881/s_tanh.S | 4 +++- 25 files changed, 85 insertions(+), 25 deletions(-) diff --git a/lib/libm/arch/mc68881/e_acos.S b/lib/libm/arch/mc68881/e_acos.S index e1a1f9d24692..533aa014f6aa 100644 --- a/lib/libm/arch/mc68881/e_acos.S +++ b/lib/libm/arch/mc68881/e_acos.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)asincos.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_acos.S,v 1.3 1995/05/09 00:38:23 jtc Exp $") +RCSID("$NetBSD: e_acos.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_acos) facosd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_asin.S b/lib/libm/arch/mc68881/e_asin.S index abd608b9f2b8..a050f58e2dec 100644 --- a/lib/libm/arch/mc68881/e_asin.S +++ b/lib/libm/arch/mc68881/e_asin.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)asincos.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_asin.S,v 1.3 1995/05/09 00:42:19 jtc Exp $") +RCSID("$NetBSD: e_asin.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_asin) fasind sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_atanh.S b/lib/libm/arch/mc68881/e_atanh.S index 23ef840fa517..ddfccca7b217 100644 --- a/lib/libm/arch/mc68881/e_atanh.S +++ b/lib/libm/arch/mc68881/e_atanh.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)atanh.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_atanh.S,v 1.3 1995/05/09 00:45:54 jtc Exp $") +RCSID("$NetBSD: e_atanh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_atanh) fatanhd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_cosh.S b/lib/libm/arch/mc68881/e_cosh.S index c1282260b537..f1dbbe9b1667 100644 --- a/lib/libm/arch/mc68881/e_cosh.S +++ b/lib/libm/arch/mc68881/e_cosh.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)cosh.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_cosh.S,v 1.3 1995/05/09 00:48:41 jtc Exp $") +RCSID("$NetBSD: e_cosh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_cosh) fcoshd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_exp.S b/lib/libm/arch/mc68881/e_exp.S index f337306b70a1..a812aba01256 100644 --- a/lib/libm/arch/mc68881/e_exp.S +++ b/lib/libm/arch/mc68881/e_exp.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)exp.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_exp.S,v 1.3 1995/05/09 00:52:06 jtc Exp $") +RCSID("$NetBSD: e_exp.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_exp) fetoxd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_fmod.S b/lib/libm/arch/mc68881/e_fmod.S index 263a5a589760..201d9bef6e0a 100644 --- a/lib/libm/arch/mc68881/e_fmod.S +++ b/lib/libm/arch/mc68881/e_fmod.S @@ -5,12 +5,14 @@ #include -RCSID("$NetBSD: e_fmod.S,v 1.1 1996/07/08 03:27:25 thorpej Exp $") +RCSID("$NetBSD: e_fmod.S,v 1.2 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_fmod) fmoved sp@(4),fp0 fmodd sp@(12),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_log.S b/lib/libm/arch/mc68881/e_log.S index 19f83b227689..7b6eda31294f 100644 --- a/lib/libm/arch/mc68881/e_log.S +++ b/lib/libm/arch/mc68881/e_log.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)log.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_log.S,v 1.3 1995/05/09 00:56:09 jtc Exp $") +RCSID("$NetBSD: e_log.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_log) flognd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_log10.S b/lib/libm/arch/mc68881/e_log10.S index 3e37d21e79b1..03ea3c1bc9d3 100644 --- a/lib/libm/arch/mc68881/e_log10.S +++ b/lib/libm/arch/mc68881/e_log10.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)log10.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_log10.S,v 1.3 1995/05/09 01:01:17 jtc Exp $") +RCSID("$NetBSD: e_log10.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_log10) flog10d sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_remainder.S b/lib/libm/arch/mc68881/e_remainder.S index b60b2bbec894..a88716f49a8c 100644 --- a/lib/libm/arch/mc68881/e_remainder.S +++ b/lib/libm/arch/mc68881/e_remainder.S @@ -5,12 +5,14 @@ #include -RCSID("$NetBSD: e_remainder.S,v 1.3 1995/05/11 23:03:44 jtc Exp $") +RCSID("$NetBSD: e_remainder.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_remainder) fmoved sp@(4),fp0 fremd sp@(12),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_scalb.S b/lib/libm/arch/mc68881/e_scalb.S index e322ce591103..469c59c0bdd3 100644 --- a/lib/libm/arch/mc68881/e_scalb.S +++ b/lib/libm/arch/mc68881/e_scalb.S @@ -5,14 +5,16 @@ #include -RCSID("$NetBSD: e_scalb.S,v 1.4 1995/05/11 23:03:44 jtc Exp $") +RCSID("$NetBSD: e_scalb.S,v 1.5 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_scalb) fmoved sp@(4),fp0 fbeq Ldone fscaled sp@(12),fp0 Ldone: +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_sinh.S b/lib/libm/arch/mc68881/e_sinh.S index dbe0f5b3aceb..2080fbcc62c3 100644 --- a/lib/libm/arch/mc68881/e_sinh.S +++ b/lib/libm/arch/mc68881/e_sinh.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)sinh.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_sinh.S,v 1.3 1995/05/09 01:22:19 jtc Exp $") +RCSID("$NetBSD: e_sinh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(__ieee754_sinh) fsinhd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/e_sqrt.S b/lib/libm/arch/mc68881/e_sqrt.S index 4cfcd9c63764..e8d206d63859 100644 --- a/lib/libm/arch/mc68881/e_sqrt.S +++ b/lib/libm/arch/mc68881/e_sqrt.S @@ -40,7 +40,7 @@ ;_sccsid: ;.asciz "from: @(#)sqrt.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: e_sqrt.S,v 1.4 1999/07/02 15:37:34 simonb Exp $") +RCSID("$NetBSD: e_sqrt.S,v 1.5 1999/08/15 18:45:18 kleink Exp $") /* * sqrt(x) @@ -50,7 +50,9 @@ RCSID("$NetBSD: e_sqrt.S,v 1.4 1999/07/02 15:37:34 simonb Exp $") ENTRY(__ieee754_sqrt) fsqrtd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_atan.S b/lib/libm/arch/mc68881/s_atan.S index 735d9f506b54..d75a5fa38a6b 100644 --- a/lib/libm/arch/mc68881/s_atan.S +++ b/lib/libm/arch/mc68881/s_atan.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)atan.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_atan.S,v 1.3 1995/05/09 01:34:03 jtc Exp $") +RCSID("$NetBSD: s_atan.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(atan) fatand sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_ceil.S b/lib/libm/arch/mc68881/s_ceil.S index c0c1f6077691..9f434a80da0c 100644 --- a/lib/libm/arch/mc68881/s_ceil.S +++ b/lib/libm/arch/mc68881/s_ceil.S @@ -40,7 +40,7 @@ ;_sccsid: ;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_ceil.S,v 1.3 1995/05/09 01:39:23 jtc Exp $") +RCSID("$NetBSD: s_ceil.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") | ceil(x) | -floor(-x), for all real x @@ -57,7 +57,9 @@ Ldoit: fintd sp@(4),fp0 | truncate fmovel d0,fpcr | restore old FPCR Lret: +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_copysign.S b/lib/libm/arch/mc68881/s_copysign.S index 151be5e7ce26..decb8e75d915 100644 --- a/lib/libm/arch/mc68881/s_copysign.S +++ b/lib/libm/arch/mc68881/s_copysign.S @@ -40,11 +40,22 @@ ;_sccsid: ;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_copysign.S,v 1.3 1995/05/09 01:46:33 jtc Exp $") +RCSID("$NetBSD: s_copysign.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") | copysign(x,y) | returns x with the sign of y. ENTRY(copysign) +#ifdef __SVR4_ABI__ + tstw sp@(12) + jmi Lneg + bclr #31,sp@(4) + fmoved sp@(4),fp0 + rts +Lneg: + bset #31,sp@(4) + fmoved sp@(4),fp0 + rts +#else movl sp@(4),d0 movl sp@(8),d1 tstw sp@(12) @@ -54,3 +65,4 @@ ENTRY(copysign) Lneg: bset #31,d0 rts +#endif diff --git a/lib/libm/arch/mc68881/s_cos.S b/lib/libm/arch/mc68881/s_cos.S index 285d277a4cd9..450fb2beca80 100644 --- a/lib/libm/arch/mc68881/s_cos.S +++ b/lib/libm/arch/mc68881/s_cos.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)sincos.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_cos.S,v 1.3 1995/05/09 01:51:45 jtc Exp $") +RCSID("$NetBSD: s_cos.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(cos) fcosd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_expm1.S b/lib/libm/arch/mc68881/s_expm1.S index 8dfef277fb79..1e04dfdcb2ce 100644 --- a/lib/libm/arch/mc68881/s_expm1.S +++ b/lib/libm/arch/mc68881/s_expm1.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)expm1.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_expm1.S,v 1.3 1995/05/09 01:57:05 jtc Exp $") +RCSID("$NetBSD: s_expm1.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(expm1) fetoxm1d sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_floor.S b/lib/libm/arch/mc68881/s_floor.S index 09691b252a8d..39a25330bc76 100644 --- a/lib/libm/arch/mc68881/s_floor.S +++ b/lib/libm/arch/mc68881/s_floor.S @@ -40,7 +40,7 @@ ;_sccsid: ;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_floor.S,v 1.3 1995/05/09 02:11:19 jtc Exp $") +RCSID("$NetBSD: s_floor.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") | floor(x) | the largest integer no larger than x @@ -57,7 +57,9 @@ Ldoit: fintd sp@(4),fp0 | truncate fmovel d0,fpcr | restore old FPCR Lret: +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_log1p.S b/lib/libm/arch/mc68881/s_log1p.S index 3b8c39c3b430..eb07206e9544 100644 --- a/lib/libm/arch/mc68881/s_log1p.S +++ b/lib/libm/arch/mc68881/s_log1p.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)log1p.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_log1p.S,v 1.3 1995/05/09 02:20:35 jtc Exp $") +RCSID("$NetBSD: s_log1p.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(log1p) flognp1d sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_logb.S b/lib/libm/arch/mc68881/s_logb.S index b912e1f39a5a..d8ede73a1c97 100644 --- a/lib/libm/arch/mc68881/s_logb.S +++ b/lib/libm/arch/mc68881/s_logb.S @@ -40,7 +40,7 @@ ;_sccsid: ;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_logb.S,v 1.4 1995/05/09 02:37:09 jtc Exp $") +RCSID("$NetBSD: s_logb.S,v 1.5 1999/08/15 18:45:18 kleink Exp $") | logb(x) | returns the unbiased exponent of x, a signed integer in double precision, @@ -63,7 +63,9 @@ Lfinite: Lnonz: fgetexpx fp0 | get exponent Ldone: +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_rint.S b/lib/libm/arch/mc68881/s_rint.S index 6ab3ac0edb95..91a6377f94cf 100644 --- a/lib/libm/arch/mc68881/s_rint.S +++ b/lib/libm/arch/mc68881/s_rint.S @@ -40,13 +40,15 @@ ;_sccsid: ;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_rint.S,v 1.3 1995/05/09 02:48:48 jtc Exp $") +RCSID("$NetBSD: s_rint.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") | rint(x) | delivers integer nearest x in direction of prevailing rounding mode ENTRY(rint) fintd sp@(4),fp0 | use prevailing rounding mode +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_scalbn.S b/lib/libm/arch/mc68881/s_scalbn.S index b95f32e49517..72742ae27ccc 100644 --- a/lib/libm/arch/mc68881/s_scalbn.S +++ b/lib/libm/arch/mc68881/s_scalbn.S @@ -40,14 +40,16 @@ ;_sccsid: ;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_scalbn.S,v 1.4 1997/10/10 10:40:40 is Exp $") +RCSID("$NetBSD: s_scalbn.S,v 1.5 1999/08/15 18:45:18 kleink Exp $") | scalbn(x, N) | returns x * (2**N), for integer values N. ENTRY(scalbn) fmoved sp@(4),fp0 fscalel sp@(12),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_sin.S b/lib/libm/arch/mc68881/s_sin.S index 3bb264a60280..8c281e55afc4 100644 --- a/lib/libm/arch/mc68881/s_sin.S +++ b/lib/libm/arch/mc68881/s_sin.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)sincos.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_sin.S,v 1.3 1995/05/10 20:44:22 jtc Exp $") +RCSID("$NetBSD: s_sin.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(sin) fsind sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_tan.S b/lib/libm/arch/mc68881/s_tan.S index d55fadb84d73..4f6418b5724b 100644 --- a/lib/libm/arch/mc68881/s_tan.S +++ b/lib/libm/arch/mc68881/s_tan.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)tan.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_tan.S,v 1.3 1995/05/10 20:44:25 jtc Exp $") +RCSID("$NetBSD: s_tan.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(tan) ftand sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts diff --git a/lib/libm/arch/mc68881/s_tanh.S b/lib/libm/arch/mc68881/s_tanh.S index 2d4a153d2039..99d4b1b0a784 100644 --- a/lib/libm/arch/mc68881/s_tanh.S +++ b/lib/libm/arch/mc68881/s_tanh.S @@ -40,11 +40,13 @@ ;_sccsid: ;.asciz "from: @(#)tanh.s 5.1 (Berkeley) 5/17/90" -RCSID("$NetBSD: s_tanh.S,v 1.3 1995/05/10 20:44:26 jtc Exp $") +RCSID("$NetBSD: s_tanh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $") ENTRY(tanh) ftanhd sp@(4),fp0 +#ifndef __SVR4_ABI__ fmoved fp0,sp@- movel sp@+,d0 movel sp@+,d1 +#endif rts