about summary refs log tree commit diff
path: root/sysdeps/i386/bp-asm.h
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-07-26 18:21:25 +0000
committerGreg McGary <greg@mcgary.org>2000-07-26 18:21:25 +0000
commit2ed5fd9a2ab9b9b82f7095116d8f8434b73383cc (patch)
treeac727a020d668748761bbcf5f7ce92e4c818b0b3 /sysdeps/i386/bp-asm.h
parentac556388135e5bf0578cb24bc958870ff3a0f00c (diff)
downloadglibc-2ed5fd9a2ab9b9b82f7095116d8f8434b73383cc.tar.gz
glibc-2ed5fd9a2ab9b9b82f7095116d8f8434b73383cc.tar.xz
glibc-2ed5fd9a2ab9b9b82f7095116d8f8434b73383cc.zip
update
2000-07-26  Greg McGary  <greg@mcgary.org>

	* Makeconfig (+link-bounded, link-libc-bounded,
	link-extra-libs-bounded): New variables.
	(built-program-cmd): Omit $(run-program-prefix) for static BP tests.
	* Makerules (do-tests-clean, common-mostlyclean): Remove BP test files.
	* Rules (tests-bp.out): New variable.
	(tests): Conditionally add BP tests.
	(binaries-bounded): Add variable and associated rule.
	* csu/Makefile [build-bounded] (extra-objs, install-lib):
	Move conditional stuff after place where condition is defined.

	* malloc/malloc.c (bp-checks.h): Add #include.
	(mem2chunk, chunk_at_offset, bin_at): Wrap BOUNDED_1 around expression.
	(_bin_at): Add unbounded version of bin_at.
	(IAV, chunk_alloc): Use unbounded _bin_at.
	(mALLOc, rEALLOc, chunk_realloc, mEMALIGn, cALLOc,
	chunk2mem_check, realloc_check, malloc_starter, malloc_atfork):
	Wrap BOUNDED_N around return value.
	(chunk_realloc): Adjust oldsize once.

	* sysdeps/generic/bp-checks.h (__memchr): Remove incorrect decl.
	(__ubp_memchr): Add correct decl.
	(_CHECK_STRING): Use __ubp_memchr.
	* sysdeps/alpha/memchr.S [!__BOUNDED_POINTERS__] (__ubp_memchr):
	New alias for unbounded-pointer __memchr.
	* sysdeps/i386/memchr.S: Likewise.
	* sysdeps/ia64/memchr.S: Likewise.
	* sysdeps/m68k/memchr.S: Likewise.
	* sysdeps/sparc/sparc32/memchr.S: Likewise.
	* sysdeps/sparc/sparc64/memchr.S: Likewise.
	* sysdeps/vax/memchr.s: Likewise.

	* sysdeps/i386/strtok.S: Fix bounds checks to pass tests.
	(SAVE_PTR): New macro.  (save_ptr): Expand size as BP.
	(strtok): Don't bother to write into SAVE_PTR when returning NULL.
	* sysdeps/i386/i686/strtok.S: Likewise.
	* sysdeps/i386/bp-asm.h (RETURN_BOUNDED_POINTER,
	RETURN_NULL_BOUNDED_POINTER): Use %ecx as the scratch register.

	* sysdeps/i386/bits/string.h [!__BOUNDED_POINTERS__]: Disable inlines.
	* sysdeps/i386/i486/bits/string.h [!__BOUNDED_POINTERS__]: Likewise.

	* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Copy
	bounds of copy_result to mount_proc.
Diffstat (limited to 'sysdeps/i386/bp-asm.h')
-rw-r--r--sysdeps/i386/bp-asm.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/i386/bp-asm.h b/sysdeps/i386/bp-asm.h
index bde1f6a14a..f4e4226044 100644
--- a/sysdeps/i386/bp-asm.h
+++ b/sysdeps/i386/bp-asm.h
@@ -80,21 +80,21 @@
 
 /* Take bounds from BP_MEM and affix them to the pointer
    value in %eax, stuffing all into memory at RTN(%esp).
-   Use %ecx as a scratch register.  */
+   Use %edx as a scratch register.  */
 
 #   define RETURN_BOUNDED_POINTER(BP_MEM)	\
-	movl RTN(%esp), %ecx;			\
-	movl %eax, 0(%ecx);			\
+	movl RTN(%esp), %edx;			\
+	movl %eax, 0(%edx);			\
 	movl 4+BP_MEM, %eax;			\
-	movl %eax, 4(%ecx);			\
+	movl %eax, 4(%edx);			\
 	movl 8+BP_MEM, %eax;			\
-	movl %eax, 8(%ecx)
+	movl %eax, 8(%edx)
 
 #   define RETURN_NULL_BOUNDED_POINTER		\
-	movl RTN(%esp), %ecx;			\
-	movl %eax, 0(%ecx);			\
-	movl %eax, 4(%ecx);			\
-	movl %eax, 8(%ecx)
+	movl RTN(%esp), %edx;			\
+	movl %eax, 0(%edx);			\
+	movl %eax, 4(%edx);			\
+	movl %eax, 8(%edx)
 
 /* The caller of __errno_location is responsible for allocating space
    for the three-word BP return-value and passing pushing its address