Module Name: src
Committed By: christos
Date: Sun Sep 4 21:14:49 UTC 2011
Modified Files:
src/sys/arch/x86/x86: syscall.c
Log Message:
Remove code that was used to avoid register spills. setcontext(2) can change
the registers, so re-fetching will produce the wrong result for trace_exit().
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/x86/syscall.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/syscall.c
diff -u src/sys/arch/x86/x86/syscall.c:1.4 src/sys/arch/x86/x86/syscall.c:1.5
--- src/sys/arch/x86/x86/syscall.c:1.4 Fri Sep 2 16:01:20 2011
+++ src/sys/arch/x86/x86/syscall.c Sun Sep 4 17:14:49 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.4 2011/09/02 20:01:20 christos Exp $ */
+/* $NetBSD: syscall.c,v 1.5 2011/09/04 21:14:49 christos Exp $ */
/*-
* Copyright (c) 1998, 2000, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.4 2011/09/02 20:01:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.5 2011/09/04 21:14:49 christos Exp $");
#include "opt_sa.h"
@@ -144,8 +144,6 @@
&frame->tf_arg6, callp->sy_argsize - 6 * 8);
if (error != 0)
goto bad;
- /* Refetch to avoid register spill to stack */
- code = frame->tf_rax & (SYS_NSYSENT - 1);
}
#else
if (callp->sy_argsize) {
@@ -165,7 +163,6 @@
if (__predict_false(p->p_trace_enabled)
&& !__predict_false(callp->sy_flags & SYCALL_INDIRECT)) {
- code = X86_TF_RAX(frame) & (SYS_NSYSENT - 1);
trace_exit(code, rval, error);
}