about summary refs log tree commit diff
path: root/sysdeps/i386/fpu/s_frexpl.S
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-08-17 07:36:19 +0000
committerGreg McGary <greg@mcgary.org>2000-08-17 07:36:19 +0000
commit9e25f6e29bd6728ad4012e3c4c9b11a96b7a4acf (patch)
treea04dbc79fe333384feb84bd24a39f4e58631f01d /sysdeps/i386/fpu/s_frexpl.S
parent9a81430bf923de1145cbf52d5f1efe0bdce68e5b (diff)
downloadglibc-9e25f6e29bd6728ad4012e3c4c9b11a96b7a4acf.tar.gz
glibc-9e25f6e29bd6728ad4012e3c4c9b11a96b7a4acf.tar.xz
glibc-9e25f6e29bd6728ad4012e3c4c9b11a96b7a4acf.zip
* sysdeps/i386/fpu/s_frexp.S: Check bounds.
Wrap extern symbols in BP_SYM (). 
* sysdeps/i386/fpu/s_frexpf.S: Likewise. 
* sysdeps/i386/fpu/s_frexpl.S: Likewise. 
* sysdeps/i386/fpu/s_remquo.S: Likewise. 
* sysdeps/i386/fpu/s_remquof.S: Likewise. 
* sysdeps/i386/fpu/s_remquol.S: Likewise. 
* sysdeps/i386/fpu/s_sincos.S: Likewise. 
* sysdeps/i386/fpu/s_sincosf.S: Likewise. 
* sysdeps/i386/fpu/s_sincosl.S: Likewise. 
* sysdeps/unix/sysv/linux/i386/clone.S: Likewise. 
* sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise.
Diffstat (limited to 'sysdeps/i386/fpu/s_frexpl.S')
-rw-r--r--sysdeps/i386/fpu/s_frexpl.S39
1 files changed, 26 insertions, 13 deletions
diff --git a/sysdeps/i386/fpu/s_frexpl.S b/sysdeps/i386/fpu/s_frexpl.S
index e3019ced6d..df749f8d4c 100644
--- a/sysdeps/i386/fpu/s_frexpl.S
+++ b/sysdeps/i386/fpu/s_frexpl.S
@@ -1,5 +1,5 @@
 /* ix87 specific frexp implementation for long double.
-   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,6 +19,8 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <machine/asm.h>
+#include "bp-sym.h"
+#include "bp-asm.h"
 
 #ifdef __ELF__
 	.section .rodata
@@ -37,11 +39,19 @@ two64:	.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
 #define MO(op) op
 #endif
 
+#define PARMS	LINKAGE		/* no space for saved regs */
+#define VAL0	PARMS
+#define VAL1	VAL0+4
+#define VAL2	VAL1+4
+#define EXPP	VAL2+4
+
 	.text
-ENTRY(__frexpl)
-	movl	4(%esp), %ecx
-	movl	12(%esp), %eax
-	orl	8(%esp), %ecx
+ENTRY (BP_SYM (__frexpl))
+	ENTER
+
+	movl	VAL0(%esp), %ecx
+	movl	VAL2(%esp), %eax
+	orl	VAL1(%esp), %ecx
 	movl	%eax, %edx
 	andl	$0x7fff, %eax
 	orl	%eax, %ecx
@@ -53,7 +63,7 @@ ENTRY(__frexpl)
 	cmpl	$0, %eax
 	je	2f
 
-	fldt	4(%esp)
+	fldt	VAL0(%esp)
 #ifdef	PIC
 	call	3f
 3:	popl	%edx
@@ -61,8 +71,8 @@ ENTRY(__frexpl)
 #endif
 	fmull	MO(two64)	/* It's not necessary to use a 80bit factor */
 	movl	$-64, %ecx
-	fstpt	4(%esp)
-	movl	12(%esp), %eax
+	fstpt	VAL0(%esp)
+	movl	VAL2(%esp), %eax
 	movl	%eax, %edx
 	andl	$0x7fff, %eax
 
@@ -70,13 +80,16 @@ ENTRY(__frexpl)
 	subl	$16382, %eax
 	orl	$0x3ffe, %edx
 	addl	%eax, %ecx
-	movl	%edx, 12(%esp)
+	movl	%edx, VAL2(%esp)
 
 	/* Store %ecx in the variable pointed to by the second argument,
 	   get the factor from the stack and return.  */
-1:	movl	16(%esp), %eax
-	fldt	4(%esp)
+1:	movl	EXPP(%esp), %eax
+	CHECK_BOUNDS_BOTH_WIDE (%eax, EXPP(%esp), $4)
+	fldt	VAL0(%esp)
 	movl	%ecx, (%eax)
+
+	LEAVE
 	ret
-END(__frexpl)
-weak_alias (__frexpl, frexpl)
+END (BP_SYM (__frexpl))
+weak_alias (BP_SYM (__frexpl), BP_SYM (frexpl))