diff options
Diffstat (limited to 'libc/sysdeps/i386/i586/strcpy.S')
-rw-r--r-- | libc/sysdeps/i386/i586/strcpy.S | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libc/sysdeps/i386/i586/strcpy.S b/libc/sysdeps/i386/i586/strcpy.S index af23bf5a2..c94036934 100644 --- a/libc/sysdeps/i386/i586/strcpy.S +++ b/libc/sysdeps/i386/i586/strcpy.S @@ -19,13 +19,11 @@ #include <sysdep.h> #include "asm-syntax.h" -#include "bp-sym.h" -#include "bp-asm.h" -#define PARMS LINKAGE+12 /* space for 3 saved regs */ +#define PARMS 4+12 /* space for 3 saved regs */ #define RTN PARMS -#define DEST RTN+RTN_SIZE -#define SRC DEST+PTR_SIZE +#define DEST RTN +#define SRC DEST+4 #ifndef USE_AS_STPCPY # define STRCPY strcpy @@ -34,8 +32,7 @@ #define magic 0xfefefeff .text -ENTRY (BP_SYM (STRCPY)) - ENTER +ENTRY (STRCPY) pushl %edi cfi_adjust_cfa_offset (4) @@ -48,8 +45,6 @@ ENTRY (BP_SYM (STRCPY)) cfi_rel_offset (edi, 8) movl SRC(%esp), %esi cfi_rel_offset (esi, 4) - CHECK_BOUNDS_LOW (%edi, DEST(%esp)) - CHECK_BOUNDS_LOW (%esi, SRC(%esp)) xorl %eax, %eax leal -1(%esi), %ecx @@ -152,13 +147,11 @@ L(4): movb %dl, (%edi) L(end): movb %ah, (%edi) L(end2): - /* GKM FIXME: check high bounds */ #ifdef USE_AS_STPCPY movl %edi, %eax #else movl DEST(%esp), %eax #endif - RETURN_BOUNDED_POINTER (DEST(%esp)) popl %ebx cfi_adjust_cfa_offset (-4) cfi_restore (ebx) @@ -169,9 +162,8 @@ L(end2): cfi_adjust_cfa_offset (-4) cfi_restore (edi) - LEAVE - RET_PTR -END (BP_SYM (STRCPY)) + ret +END (STRCPY) #ifndef USE_AS_STPCPY libc_hidden_builtin_def (strcpy) #endif |