about summary refs log tree commit diff
path: root/sysdeps/ia64
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/ia64
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/ia64')
-rw-r--r--sysdeps/ia64/memchr.S15
1 files changed, 9 insertions, 6 deletions
diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S
index 40f2bd09b5..e02945aa2e 100644
--- a/sysdeps/ia64/memchr.S
+++ b/sysdeps/ia64/memchr.S
@@ -33,8 +33,8 @@
    possible; the remaining few bytes are searched one at a time.
 
    The word by word search is performed by xor-ing the word with a word
-   containing chr in every byte.  If there is a hit, the result will 
-   contain a zero byte in the corresponding position.  The presence and 
+   containing chr in every byte.  If there is a hit, the result will
+   contain a zero byte in the corresponding position.  The presence and
    position of that zero byte is detected with a czx instruction.
 
    All the loops in this function could have had the internal branch removed
@@ -63,7 +63,7 @@ ENTRY(__memchr)
 	.rotp	p[MEMLAT+3]
         mov 	saved_lc = ar.lc 	// save the loop counter
 	mov	saved_pr = pr		// save the predicates
-	mov 	ret0 = str	
+	mov 	ret0 = str
 	and 	tmp = 7, str		// tmp = str % 8
 	cmp.ne	p7, p0 = r0, r0		// clear p7
 	extr.u	chr = in1, 0, 8		// chr = (unsigned char) in1
@@ -91,7 +91,7 @@ ENTRY(__memchr)
 	mux1	chrx8 = chr, @brcst ;;	// get a word full of chr
 	mov	ar.lc = loopcnt
 	mov	pr.rot = 1 << 16 ;;
-.l2:	
+.l2:
 (p[0])		mov	addr[0] = ret0
 (p[0])		ld8	value[0] = [ret0], 8
 (p[MEMLAT])	xor	aux[0] = value[MEMLAT], chrx8
@@ -100,7 +100,7 @@ ENTRY(__memchr)
 (p7)		br.cond.dpnt .foundit
 		br.ctop.dptk .l2
 .srchfew:
-	adds	loopcnt = -1, len 	
+	adds	loopcnt = -1, len
 	cmp.eq	p6, p0 = len, r0
 (p6)	br.cond.spnt .notfound ;;
 	mov	ar.lc = loopcnt
@@ -109,7 +109,7 @@ ENTRY(__memchr)
 	;;
 	cmp.eq	p6, p0 = val, chr
 (p6)	br.cond.dpnt	.foundit
-	br.cloop.sptk	.l3 ;;	
+	br.cloop.sptk	.l3 ;;
 .notfound:
 	cmp.ne	p6, p0 = r0, r0	// clear p6 (p7 was already 0 when we got here)
 	mov	ret0 = r0 ;;	// return NULL
@@ -124,3 +124,6 @@ ENTRY(__memchr)
 END(__memchr)
 
 weak_alias (__memchr, memchr)
+#if !__BOUNDED_POINTERS__
+weak_alias (__memchr, __ubp_memchr)
+#endif