NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/50228



The following reply was made to PR port-macppc/50228; it has been noted by GNATS.

From: Christian Groessler <chris%groessler.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: chris%groessler.org@localhost
Subject: Re: port-macppc/50228
Date: Mon, 12 Dec 2016 21:34:57 +0100

 I've added a check for zero size right at the beginning of "bzero" and
 this change fixes the problem for me:
 
 --------------
 diff -u -p -r1.14 bzero.S
 --- lib/libc/arch/powerpc/string/bzero.S	12 Sep 2013 15:36:15 -0000	1.14
 +++ lib/libc/arch/powerpc/string/bzero.S	12 Dec 2016 19:10:44 -0000
 @@ -53,6 +53,8 @@ __RCSID("$NetBSD: bzero.S,v 1.14 2013/09
  		.text
  		.align 4
  ENTRY(bzero)
 +		cmplwi	%cr1, %r4, 0		/* Zero length? */
 +		beqlr-	%cr1			/* Yes, do nothing */
  		li	r_val, 0		/* Value to stuff in */
  		b	cb_memset
  END(bzero)
 --------------
 
 regards,
 chris
 



Home | Main Index | Thread Index | Old Index