Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/powerpc/string PR/50228: Christian Groessler: ...
details: https://anonhg.NetBSD.org/src/rev/c7657cde71c9
branches: trunk
changeset: 819848:c7657cde71c9
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 19 14:30:23 2016 +0000
description:
PR/50228: Christian Groessler: fix bzero(ptr, 0) on ppc. Check for 0 length
before jumping to cb_memset like memset does.
diffstat:
lib/libc/arch/powerpc/string/bzero.S | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 409eac69f226 -r c7657cde71c9 lib/libc/arch/powerpc/string/bzero.S
--- a/lib/libc/arch/powerpc/string/bzero.S Mon Dec 19 14:10:57 2016 +0000
+++ b/lib/libc/arch/powerpc/string/bzero.S Mon Dec 19 14:30:23 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzero.S,v 1.14 2013/09/12 15:36:15 joerg Exp $ */
+/* $NetBSD: bzero.S,v 1.15 2016/12/19 14:30:23 christos Exp $ */
/*-
* Copyright (C) 2001 Martin J. Laubach <mjl%NetBSD.org@localhost>
@@ -32,7 +32,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: bzero.S,v 1.14 2013/09/12 15:36:15 joerg Exp $")
+__RCSID("$NetBSD: bzero.S,v 1.15 2016/12/19 14:30:23 christos Exp $")
#endif /* LIBC_SCCS && !lint */
#include "assym.h"
@@ -54,6 +54,8 @@
.align 4
ENTRY(bzero)
li r_val, 0 /* Value to stuff in */
+ cmplwi %cr1, %r4, 0 /* Zero length? */
+ beqlr- %cr1 /* Yes, do nothing */
b cb_memset
END(bzero)
Home |
Main Index |
Thread Index |
Old Index