Module Name:    src
Committed By:   matt
Date:           Mon Aug 24 05:25:26 UTC 2009

Modified Files:
        src/lib/libc/arch/mips/sys [matt-nb5-mips64]: cerror.S

Log Message:
Fix an O32'ism.  Store the error into the S0 slot, not the arguments array
above us (since that doesn't always exist in NewABI).


To generate a diff of this commit:
cvs rdiff -u -r1.13.46.2 -r1.13.46.3 src/lib/libc/arch/mips/sys/cerror.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/sys/cerror.S
diff -u src/lib/libc/arch/mips/sys/cerror.S:1.13.46.2 src/lib/libc/arch/mips/sys/cerror.S:1.13.46.3
--- src/lib/libc/arch/mips/sys/cerror.S:1.13.46.2	Tue Aug 18 06:56:52 2009
+++ src/lib/libc/arch/mips/sys/cerror.S	Mon Aug 24 05:25:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cerror.S,v 1.13.46.2 2009/08/18 06:56:52 matt Exp $	*/
+/*	$NetBSD: cerror.S,v 1.13.46.3 2009/08/24 05:25:25 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 	RCSID("from: @(#)cerror.s	8.1 (Berkeley) 6/16/93")
 #else
-	RCSID("$NetBSD: cerror.S,v 1.13.46.2 2009/08/18 06:56:52 matt Exp $")
+	RCSID("$NetBSD: cerror.S,v 1.13.46.3 2009/08/24 05:25:25 matt Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -49,14 +49,14 @@
 	PIC_PROLOGUE(__cerror)
 	PTR_SUBU	sp, sp, CALLFRAME_SIZ
 	PTR_S		ra, CALLFRAME_RA(sp)
-	INT_S		v0, 3*SZREG(sp)		# save errno value
+	INT_S		v0, CALLFRAME_S0(sp)	# save errno value
 
 	SAVE_GP(CALLFRAME_GP)
 
 	la		t9, _C_LABEL(__errno)	# locate address of errno
 	jalr		t9
 
-	INT_L		t0, 3*SZREG(sp)
+	INT_L		t0, CALLFRAME_S0(sp)
 	PTR_L		ra, CALLFRAME_RA(sp)
 	INT_S		t0, 0(v0)		# update errno value
 	PTR_ADDU	sp, sp, CALLFRAME_SIZ

Reply via email to