Module Name:    src
Committed By:   riastradh
Date:           Mon May  6 15:33:04 UTC 2024

Modified Files:
        src/lib/libm/arch/vax: n_sincos.S n_tan.S

Log Message:
libm: Expose sinl, cosl, tanl on vax.

While here, make sin, cos, and tan be weak aliases for internal
symbols _sin, _cos, and _tan; likewise sinf, cosf, tanf.

PR 57881


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/arch/vax/n_sincos.S
cvs rdiff -u -r1.7 -r1.8 src/lib/libm/arch/vax/n_tan.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/arch/vax/n_sincos.S
diff -u src/lib/libm/arch/vax/n_sincos.S:1.9 src/lib/libm/arch/vax/n_sincos.S:1.10
--- src/lib/libm/arch/vax/n_sincos.S:1.9	Fri Oct 10 22:06:33 2014
+++ src/lib/libm/arch/vax/n_sincos.S	Mon May  6 15:33:04 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: n_sincos.S,v 1.9 2014/10/10 22:06:33 martin Exp $	*/
+/*	$NetBSD: n_sincos.S,v 1.10 2024/05/06 15:33:04 riastradh Exp $	*/
 /*
  * Copyright (c) 1985, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -46,17 +46,19 @@
  */
 #include <machine/asm.h>
 
-ENTRY(sinf, 0)
+WEAK_ALIAS(sinf, _sinf)
+ENTRY(_sinf, 0)
 	cvtfd	4(%ap),-(%sp)
-	calls	$2,_C_LABEL(sin)
+	calls	$2,_C_LABEL(_sin)
 	cvtdf	%r0,%r0
 	ret
+END(_sinf)
 
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(_sinl, sin)
-#endif
+WEAK_ALIAS(sinl, _sinl)
+STRONG_ALIAS(_sinl, _sin)
 
-ENTRY(sin, 0xfc0)
+WEAK_ALIAS(sin, _sin)
+ENTRY(_sin, 0xfc0)
 	movq	4(%ap),%r0
 	bicw3	$0x807f,%r0,%r2
 	beql	1f		# if x is zero or reserved operand then return x
@@ -77,6 +79,7 @@ ENTRY(sin, 0xfc0)
 	jsb	_C_LABEL(__libm_sincos)+2
 	bispsw	(%sp)+
 1:	ret
+END(_sin)
 
 /*
  * double cos(arg)
@@ -85,17 +88,19 @@ ENTRY(sin, 0xfc0)
  * S. McDonald, April 4,  1985
  */
 
-ENTRY(cosf, 0)
+WEAK_ALIAS(cosf, _cosf)
+ENTRY(_cosf, 0)
 	cvtfd	4(%ap),-(%sp)
-	calls	$2,_C_LABEL(cos)
+	calls	$2,_C_LABEL(_cos)
 	cvtdf	%r0,%r0
 	ret
+END(_cosf)
 
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(_cosl, cos)
-#endif
+WEAK_ALIAS(cosl, _cosl)
+STRONG_ALIAS(_cosl, _cos)
 
-ENTRY(cos, 0x0fc0)
+WEAK_ALIAS(cos, _cos)
+ENTRY(_cos, 0x0fc0)
 	movq	4(%ap),%r0
 	bicw3	$0x7f,%r0,%r2
 	cmpw	$0x8000,%r2
@@ -117,3 +122,4 @@ ENTRY(cos, 0x0fc0)
 	jsb	_C_LABEL(__libm_sincos)+2
 	bispsw	(%sp)+
 1:	ret
+END(_cos)

Index: src/lib/libm/arch/vax/n_tan.S
diff -u src/lib/libm/arch/vax/n_tan.S:1.7 src/lib/libm/arch/vax/n_tan.S:1.8
--- src/lib/libm/arch/vax/n_tan.S:1.7	Thu Mar  6 10:59:52 2014
+++ src/lib/libm/arch/vax/n_tan.S	Mon May  6 15:33:04 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: n_tan.S,v 1.7 2014/03/06 10:59:52 martin Exp $	*/
+/*	$NetBSD: n_tan.S,v 1.8 2024/05/06 15:33:04 riastradh Exp $	*/
 /*
  * Copyright (c) 1985, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -44,7 +44,12 @@
  * method: true range reduction to [-pi/4,pi/4], P. Tang  &  B. Corbett
  * S. McDonald, April 4,  1985
  */
-ENTRY(tan, 0x0fc0)		# save %r6-%r11
+
+WEAK_ALIAS(tanl, _tanl)
+STRONG_ALIAS(_tanl, _tan)
+
+WEAK_ALIAS(tan, _tan)
+ENTRY(_tan, 0x0fc0)		# save %r6-%r11
 	movq	4(%ap),%r0
 	bicw3	$0x807f,%r0,%r2
 	beql	1f		# if x is zero or reserved operand then return x
@@ -87,11 +92,12 @@ ENTRY(tan, 0x0fc0)		# save %r6-%r11
 	divd3	%r0,%r10,%r0
 	bispsw	(%sp)+
 1:	ret
+END(_tan)
 
-
-ENTRY(tanf, 0)
+WEAK_ALIAS(tanf, _tanf)
+ENTRY(_tanf, 0)
 	cvtfd	4(%ap),-(%sp)
-	calls	$2,_C_LABEL(tan)
+	calls	$2,_C_LABEL(_tan)
 	cvtdf	%r0,%r0
 	ret
-
+END(_tanf)

Reply via email to