summary refs log tree commit diff
path: root/sysdeps/i386/fpu/s_sincosl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/s_sincosl.S')
-rw-r--r--sysdeps/i386/fpu/s_sincosl.S31
1 files changed, 24 insertions, 7 deletions
diff --git a/sysdeps/i386/fpu/s_sincosl.S b/sysdeps/i386/fpu/s_sincosl.S
index 8b6694f09f..c474e112af 100644
--- a/sysdeps/i386/fpu/s_sincosl.S
+++ b/sysdeps/i386/fpu/s_sincosl.S
@@ -1,5 +1,5 @@
 /* Compute sine and cosine of argument.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -19,18 +19,33 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <machine/asm.h>
+#include "bp-sym.h"
+#include "bp-asm.h"
 
-ENTRY(__sincosl)
-	fldt	4(%esp)
+#define PARMS	LINKAGE		/* no space for saved regs */
+#define ANGLE	PARMS
+#define SINP	ANGLE+12
+#define COSP	SINP+PTR_SIZE
+
+	.text
+ENTRY (BP_SYM (__sincosl))
+	ENTER
+
+	fldt	ANGLE(%esp)
 	fsincos
-	movl	16(%esp), %ecx
-	movl	20(%esp), %edx
+	movl	SINP(%esp), %ecx
+	CHECK_BOUNDS_BOTH_WIDE (%ecx, SINP(%esp), $12)
+	movl	COSP(%esp), %edx
+	CHECK_BOUNDS_BOTH_WIDE (%edx, COSP(%esp), $12)
 	fnstsw	%ax
 	testl	$0x400,%eax
 	jnz	1f
 	fstpt	(%edx)
 	fstpt	(%ecx)
+
+	LEAVE
 	ret
+
 	.align ALIGNARG(4)
 1:	fldpi
 	fadd	%st(0)
@@ -43,6 +58,8 @@ ENTRY(__sincosl)
 	fsincos
 	fstpt	(%edx)
 	fstpt	(%ecx)
+
+	LEAVE
 	ret
-END(__sincosl)
-weak_alias(__sincosl, sincosl)
+END (BP_SYM (__sincosl))
+weak_alias (BP_SYM (__sincosl), BP_SYM (sincosl))