changeset 3900:0388bcf80faf

6507249 memset in sun4v 32 bit libc_psr fails when size argument is 0
author mathue
date Mon, 26 Mar 2007 19:09:40 -0700
parents 6c4b3d85ee77
children 279598fd6d51
files usr/src/lib/libc_psr/sun4v_hwcap1/common/memset.s
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libc_psr/sun4v_hwcap1/common/memset.s	Mon Mar 26 19:04:02 2007 -0700
+++ b/usr/src/lib/libc_psr/sun4v_hwcap1/common/memset.s	Mon Mar 26 19:09:40 2007 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -233,8 +232,9 @@
 	and	%o2, 3, %o2		! leftover count, if any
 
 .wrchar:
-	! Set the remaining bytes
-	brz	%o2, .exit
+	! Set the remaining bytes, if any
+	cmp	%o2, 0
+	be	%ncc, .exit
 	nop
 
 7: