Add register prefixes.
This commit is contained in:
parent
b12f1e565f
commit
bebf6897b4
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_ceil.S,v 1.6 1999/11/10 16:45:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,26 +42,26 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_ceil.S,v 1.5 1999/08/21 21:26:16 is Exp $")
|
||||
RCSID("$NetBSD: s_ceil.S,v 1.6 1999/11/10 16:45:33 thorpej Exp $")
|
||||
|
||||
| ceil(x)
|
||||
| -floor(-x), for all real x
|
||||
ENTRY(ceil)
|
||||
fmovel fpcr,d0 | save old FPCR
|
||||
fmoved sp@(4),fp0 | get argument
|
||||
fmovel %fpcr,%d0 | save old FPCR
|
||||
fmoved %sp@(4),%fp0 | get argument
|
||||
fbun Lret | if NaN, return NaN
|
||||
fbolt Lrtz | <0, round to zero
|
||||
fmovel #0x30,fpcr | >=0, round to inf
|
||||
fmovel #0x30,%fpcr | >=0, round to inf
|
||||
jra Ldoit
|
||||
Lrtz:
|
||||
fmovel #0x10,fpcr
|
||||
fmovel #0x10,%fpcr
|
||||
Ldoit:
|
||||
fintd sp@(4),fp0 | truncate
|
||||
fmovel d0,fpcr | restore old FPCR
|
||||
fintd %sp@(4),%fp0 | truncate
|
||||
fmovel %d0,%fpcr | restore old FPCR
|
||||
Lret:
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_copysign.S,v 1.6 1999/11/10 16:45:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,29 +42,29 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_copysign.S,v 1.5 1999/08/21 21:24:46 is Exp $")
|
||||
RCSID("$NetBSD: s_copysign.S,v 1.6 1999/11/10 16:45:33 thorpej Exp $")
|
||||
|
||||
| copysign(x,y)
|
||||
| returns x with the sign of y.
|
||||
ENTRY(copysign)
|
||||
#ifdef __SVR4_ABI__
|
||||
tstw sp@(12)
|
||||
tstw %sp@(12)
|
||||
jmi Lneg
|
||||
bclr #31,sp@(4)
|
||||
fmoved sp@(4),fp0
|
||||
bclr #31,%sp@(4)
|
||||
fmoved %sp@(4),%fp0
|
||||
rts
|
||||
Lneg:
|
||||
bset #31,sp@(4)
|
||||
fmoved sp@(4),fp0
|
||||
bset #31,%sp@(4)
|
||||
fmoved %sp@(4),%fp0
|
||||
rts
|
||||
#else
|
||||
movl sp@(4),d0
|
||||
movl sp@(8),d1
|
||||
tstw sp@(12)
|
||||
movl %sp@(4),%d0
|
||||
movl %sp@(8),%d1
|
||||
tstw %sp@(12)
|
||||
jmi Lneg
|
||||
bclr #31,d0
|
||||
bclr #31,%d0
|
||||
rts
|
||||
Lneg:
|
||||
bset #31,d0
|
||||
bset #31,%d0
|
||||
rts
|
||||
#endif
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_finite.S,v 1.6 1999/11/10 16:45:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,16 +42,16 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_finite.S,v 1.5 1999/08/21 21:25:40 is Exp $")
|
||||
RCSID("$NetBSD: s_finite.S,v 1.6 1999/11/10 16:45:33 thorpej Exp $")
|
||||
|
||||
| finite(x)
|
||||
| returns the value TRUE if -INF < x < +INF and returns FALSE otherwise.
|
||||
ENTRY(finite)
|
||||
movw sp@(4),d0
|
||||
movw #0x7FF0,d1
|
||||
andw d1,d0
|
||||
cmpw d1,d0
|
||||
sne d0
|
||||
extbl d0
|
||||
negl d0
|
||||
movw %sp@(4),%d0
|
||||
movw #0x7FF0,%d1
|
||||
andw %d1,%d0
|
||||
cmpw %d1,%d0
|
||||
sne %d0
|
||||
extbl %d0
|
||||
negl %d0
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_floor.S,v 1.6 1999/11/10 16:45:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,26 +42,26 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_floor.S,v 1.5 1999/08/21 21:26:28 is Exp $")
|
||||
RCSID("$NetBSD: s_floor.S,v 1.6 1999/11/10 16:45:34 thorpej Exp $")
|
||||
|
||||
| floor(x)
|
||||
| the largest integer no larger than x
|
||||
ENTRY(floor)
|
||||
fmovel fpcr,d0 | save old FPCR
|
||||
fmoved sp@(4),fp0 | get argument
|
||||
fmovel %fpcr,%d0 | save old FPCR
|
||||
fmoved %sp@(4),%fp0 | get argument
|
||||
fbun Lret | if NaN, return NaN
|
||||
fboge Lrtz | >=0, round to zero
|
||||
fmovel #0x20,fpcr | <0, round to -inf
|
||||
fmovel #0x20,%fpcr | <0, round to -inf
|
||||
jra Ldoit
|
||||
Lrtz:
|
||||
fmovel #0x10,fpcr
|
||||
fmovel #0x10,%fpcr
|
||||
Ldoit:
|
||||
fintd sp@(4),fp0 | truncate
|
||||
fmovel d0,fpcr | restore old FPCR
|
||||
fintd %sp@(4),%fp0 | truncate
|
||||
fmovel %d0,%fpcr | restore old FPCR
|
||||
Lret:
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_rint.S,v 1.6 1999/11/10 16:45:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,15 +42,15 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_rint.S,v 1.5 1999/08/21 21:26:40 is Exp $")
|
||||
RCSID("$NetBSD: s_rint.S,v 1.6 1999/11/10 16:45:34 thorpej Exp $")
|
||||
|
||||
| rint(x)
|
||||
| delivers integer nearest x in direction of prevailing rounding mode
|
||||
ENTRY(rint)
|
||||
fintd sp@(4),fp0 | use prevailing rounding mode
|
||||
fintd %sp@(4),%fp0 | use prevailing rounding mode
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_acos.S,v 1.5 1999/11/10 16:45:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)asincos.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_acos.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_acos.S,v 1.5 1999/11/10 16:45:37 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_acos)
|
||||
facosd sp@(4),fp0
|
||||
facosd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_asin.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)asincos.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_asin.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_asin.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_asin)
|
||||
fasind sp@(4),fp0
|
||||
fasind %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_atanh.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)atanh.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_atanh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_atanh.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_atanh)
|
||||
fatanhd sp@(4),fp0
|
||||
fatanhd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_cosh.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)cosh.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_cosh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_cosh.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_cosh)
|
||||
fcoshd sp@(4),fp0
|
||||
fcoshd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_exp.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)exp.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_exp.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_exp.S,v 1.5 1999/11/10 16:45:38 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_exp)
|
||||
fetoxd sp@(4),fp0
|
||||
fetoxd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_fmod.S,v 1.3 1999/11/10 16:45:38 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin <jtc@netbsd.org>.
|
||||
* Public domain.
|
||||
@ -5,14 +7,14 @@
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: e_fmod.S,v 1.2 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_fmod.S,v 1.3 1999/11/10 16:45:38 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_fmod)
|
||||
fmoved sp@(4),fp0
|
||||
fmodd sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fmodd %sp@(12),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_log.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)log.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_log.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_log.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_log)
|
||||
flognd sp@(4),fp0
|
||||
flognd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_log10.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)log10.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_log10.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_log10.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_log10)
|
||||
flog10d sp@(4),fp0
|
||||
flog10d %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_remainder.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin <jtc@netbsd.org>.
|
||||
* Public domain.
|
||||
@ -5,14 +7,14 @@
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: e_remainder.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_remainder.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_remainder)
|
||||
fmoved sp@(4),fp0
|
||||
fremd sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fremd %sp@(12),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_scalb.S,v 1.7 1999/11/10 16:45:39 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Written by J.T. Conklin <jtc@netbsd.org>.
|
||||
* Public domain.
|
||||
@ -5,15 +7,15 @@
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
RCSID("$NetBSD: e_scalb.S,v 1.6 1999/08/21 17:29:37 is Exp $")
|
||||
RCSID("$NetBSD: e_scalb.S,v 1.7 1999/11/10 16:45:39 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_scalb)
|
||||
fmoved sp@(4),fp0
|
||||
fscaled sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fscaled %sp@(12),%fp0
|
||||
Ldone:
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_sinh.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)sinh.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_sinh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_sinh.S,v 1.5 1999/11/10 16:45:39 thorpej Exp $")
|
||||
|
||||
ENTRY(__ieee754_sinh)
|
||||
fsinhd sp@(4),fp0
|
||||
fsinhd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: e_sqrt.S,v 1.6 1999/11/10 16:45:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,7 +42,7 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)sqrt.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: e_sqrt.S,v 1.5 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: e_sqrt.S,v 1.6 1999/11/10 16:45:40 thorpej Exp $")
|
||||
|
||||
/*
|
||||
* sqrt(x)
|
||||
@ -49,10 +51,10 @@ RCSID("$NetBSD: e_sqrt.S,v 1.5 1999/08/15 18:45:18 kleink Exp $")
|
||||
*/
|
||||
|
||||
ENTRY(__ieee754_sqrt)
|
||||
fsqrtd sp@(4),fp0
|
||||
fsqrtd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_atan.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)atan.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_atan.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_atan.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $")
|
||||
|
||||
ENTRY(atan)
|
||||
fatand sp@(4),fp0
|
||||
fatand %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_cos.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)sincos.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_cos.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_cos.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $")
|
||||
|
||||
ENTRY(cos)
|
||||
fcosd sp@(4),fp0
|
||||
fcosd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_expm1.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)expm1.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_expm1.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_expm1.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $")
|
||||
|
||||
ENTRY(expm1)
|
||||
fetoxm1d sp@(4),fp0
|
||||
fetoxm1d %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_log1p.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)log1p.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_log1p.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_log1p.S,v 1.5 1999/11/10 16:45:40 thorpej Exp $")
|
||||
|
||||
ENTRY(log1p)
|
||||
flognp1d sp@(4),fp0
|
||||
flognp1d %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_logb.S,v 1.6 1999/11/10 16:45:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,32 +42,32 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_logb.S,v 1.5 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_logb.S,v 1.6 1999/11/10 16:45:40 thorpej Exp $")
|
||||
|
||||
| logb(x)
|
||||
| returns the unbiased exponent of x, a signed integer in double precision,
|
||||
| except that logb(0) is -INF, logb(INF) is +INF, and logb(NAN) is that NAN.
|
||||
ENTRY(logb)
|
||||
movw sp@(4),d0
|
||||
movw #0x7FF0,d1 | exponent bits
|
||||
andw d1,d0 | mask off all else
|
||||
cmpw d1,d0 | max exponent?
|
||||
movw %sp@(4),%d0
|
||||
movw #0x7FF0,%d1 | exponent bits
|
||||
andw %d1,%d0 | mask off all else
|
||||
cmpw %d1,%d0 | max exponent?
|
||||
bne Lfinite | no, is finite
|
||||
fmoved sp@(4),fp0 | yes, infinite or NaN
|
||||
fmoved %sp@(4),%fp0 | yes, infinite or NaN
|
||||
fbun Ldone | NaN returns NaN
|
||||
fabsx fp0 | +-inf returns inf
|
||||
fabsx %fp0 | +-inf returns inf
|
||||
jra Ldone
|
||||
Lfinite:
|
||||
fmoved sp@(4),fp0 | get entire number
|
||||
fmoved %sp@(4),%fp0 | get entire number
|
||||
fbne Lnonz | zero?
|
||||
flog2x fp0 | yes, log(0) a convenient source of -inf
|
||||
flog2x %fp0 | yes, log(0) a convenient source of -inf
|
||||
jra Ldone
|
||||
Lnonz:
|
||||
fgetexpx fp0 | get exponent
|
||||
fgetexpx %fp0 | get exponent
|
||||
Ldone:
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_scalbn.S,v 1.6 1999/11/10 16:45:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,16 +42,16 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)support.s 5.2 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_scalbn.S,v 1.5 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_scalbn.S,v 1.6 1999/11/10 16:45:40 thorpej Exp $")
|
||||
|
||||
| scalbn(x, N)
|
||||
| returns x * (2**N), for integer values N.
|
||||
ENTRY(scalbn)
|
||||
fmoved sp@(4),fp0
|
||||
fscalel sp@(12),fp0
|
||||
fmoved %sp@(4),%fp0
|
||||
fscalel %sp@(12),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_sin.S,v 1.5 1999/11/10 16:45:41 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)sincos.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_sin.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_sin.S,v 1.5 1999/11/10 16:45:41 thorpej Exp $")
|
||||
|
||||
ENTRY(sin)
|
||||
fsind sp@(4),fp0
|
||||
fsind %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_tan.S,v 1.5 1999/11/10 16:45:41 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)tan.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_tan.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_tan.S,v 1.5 1999/11/10 16:45:41 thorpej Exp $")
|
||||
|
||||
ENTRY(tan)
|
||||
ftand sp@(4),fp0
|
||||
ftand %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: s_tanh.S,v 1.5 1999/11/10 16:45:41 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@ -40,13 +42,13 @@
|
||||
;_sccsid:
|
||||
;.asciz "from: @(#)tanh.s 5.1 (Berkeley) 5/17/90"
|
||||
|
||||
RCSID("$NetBSD: s_tanh.S,v 1.4 1999/08/15 18:45:18 kleink Exp $")
|
||||
RCSID("$NetBSD: s_tanh.S,v 1.5 1999/11/10 16:45:41 thorpej Exp $")
|
||||
|
||||
ENTRY(tanh)
|
||||
ftanhd sp@(4),fp0
|
||||
ftanhd %sp@(4),%fp0
|
||||
#ifndef __SVR4_ABI__
|
||||
fmoved fp0,sp@-
|
||||
movel sp@+,d0
|
||||
movel sp@+,d1
|
||||
fmoved %fp0,%sp@-
|
||||
movel %sp@+,%d0
|
||||
movel %sp@+,%d1
|
||||
#endif
|
||||
rts
|
||||
|
Loading…
Reference in New Issue
Block a user