]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/i386/addmul_1.S: s2_limb is scalar so remove bounds check.
authorGreg McGary <greg@mcgary.org>
Sat, 29 Jul 2000 08:09:30 +0000 (08:09 +0000)
committerGreg McGary <greg@mcgary.org>
Sat, 29 Jul 2000 08:09:30 +0000 (08:09 +0000)
* sysdeps/i386/mul_1.S: Likewise.
* sysdeps/i386/submul_1.S: Likewise.
* sysdeps/i386/i586/addmul_1.S: Likewise.
* sysdeps/i386/i586/mul_1.S: Add bounds checks.
* sysdeps/i386/i586/submul_1.S: Likewise.

sysdeps/i386/addmul_1.S
sysdeps/i386/i586/addmul_1.S
sysdeps/i386/i586/mul_1.S
sysdeps/i386/i586/submul_1.S
sysdeps/i386/mul_1.S
sysdeps/i386/submul_1.S

index 47c875d26dfffc48eb8798b05525a1cc30905b44..2b0e40408c6545746dd2484b7691b24a9bf5e83d 100644 (file)
@@ -51,7 +51,6 @@ ENTRY (BP_SYM (__mpn_addmul_1))
        shll    $2, %sizeP      /* convert limbs to bytes */
        CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %sizeP)
        CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %sizeP)
-       CHECK_BOUNDS_BOTH_WIDE (%s2_limb, S2LIMB(%esp), %sizeP)
        shrl    $2, %sizeP
 #endif
        leal    (%res_ptr,%sizeP,4), %res_ptr
index 2cc17ddf90e4d7629ffc36cd0e23196ae3c4c16f..180d728ce571f227f015cf825c50ce7923e57dcc 100644 (file)
@@ -51,7 +51,6 @@ ENTRY (BP_SYM (__mpn_addmul_1))
        shll    $2, %size       /* convert limbs to bytes */
        CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size)
        CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size)
-       CHECK_BOUNDS_BOTH_WIDE (%s2_limb, S2LIMB(%esp), %size)
        shrl    $2, %size
 #endif
        leal    (%res_ptr,%size,4), %res_ptr
index 2d777036adc4b19ccc8542d4f9871ed78f57411a..8c477e53f282baa4b8bc5c237b051d8354213626 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-sym.h"
 #include "bp-asm.h"
 
 #define PARMS  LINKAGE+16      /* space for 4 saved regs */
@@ -34,7 +35,7 @@
 #define s2_limb ebx
 
        .text
-ENTRY(__mpn_mul_1)
+ENTRY (BP_SYM (__mpn_mul_1))
        ENTER
 
        pushl   %edi
@@ -46,7 +47,12 @@ ENTRY(__mpn_mul_1)
        movl    S1(%esp), %s1_ptr
        movl    SIZE(%esp), %size
        movl    S2LIMB(%esp), %s2_limb
-
+#if __BOUNDED_POINTERS__
+       shll    $2, %size       /* convert limbs to bytes */
+       CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size)
+       CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size)
+       shrl    $2, %size
+#endif
        leal    (%res_ptr,%size,4), %res_ptr
        leal    (%s1_ptr,%size,4), %s1_ptr
        negl    %size
@@ -76,4 +82,4 @@ L(oop):       adcl    $0, %ebp
        LEAVE
        ret
 #undef size
-END(__mpn_mul_1)
+END (BP_SYM (__mpn_mul_1))
index d9e197dcc1a7f8613038bfa3b0adf79703336c74..0624a7c04b4d376b3399a740a611eec20e568947 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-sym.h"
 #include "bp-asm.h"
 
 #define PARMS  LINKAGE+16      /* space for 4 saved regs */
@@ -34,7 +35,7 @@
 #define s2_limb ebx
 
        .text
-ENTRY(__mpn_submul_1)
+ENTRY (BP_SYM (__mpn_submul_1))
        ENTER
 
        pushl   %edi
@@ -46,7 +47,12 @@ ENTRY(__mpn_submul_1)
        movl    S1(%esp), %s1_ptr
        movl    SIZE(%esp), %size
        movl    S2LIMB(%esp), %s2_limb
-
+#if __BOUNDED_POINTERS__
+       shll    $2, %sizeP      /* convert limbs to bytes */
+       CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %sizeP)
+       CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %sizeP)
+       shrl    $2, %sizeP
+#endif
        leal    (%res_ptr,%size,4), %res_ptr
        leal    (%s1_ptr,%size,4), %s1_ptr
        negl    %size
@@ -80,4 +86,4 @@ L(oop):       adcl    $0, %ebp
        LEAVE
        ret
 #undef size
-END(__mpn_submul_1)
+END (BP_SYM (__mpn_submul_1))
index 91483eb28e48a9ca740734c14f9cf539da8cb0ee..d673dcf7cd41d95ad2fae15480fa85499f12ce1b 100644 (file)
@@ -51,7 +51,6 @@ ENTRY (BP_SYM (__mpn_mul_1))
        shll    $2, %size       /* convert limbs to bytes */
        CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size)
        CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size)
-       CHECK_BOUNDS_BOTH_WIDE (%s2_limb, S2LIMB(%esp), %size)
        shrl    $2, %size
 #endif
        leal    (%res_ptr,%size,4), %res_ptr
index 56a015eb4bf3fe9b52ed51872d36a915ba8543f1..ff6920c8f127e6921cd7cb2566e645526c670f57 100644 (file)
@@ -51,7 +51,6 @@ ENTRY (BP_SYM (__mpn_submul_1))
        shll    $2, %sizeP      /* convert limbs to bytes */
        CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %sizeP)
        CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %sizeP)
-       CHECK_BOUNDS_BOTH_WIDE (%s2_limb, S2LIMB(%esp), %sizeP)
        shrl    $2, %sizeP
 #endif
        leal    (%res_ptr,%sizeP,4), %res_ptr