Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 Remove code that was used to avoid register...



details:   https://anonhg.NetBSD.org/src/rev/447b6a570e97
branches:  trunk
changeset: 769256:447b6a570e97
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Sep 04 21:14:49 2011 +0000

description:
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().

diffstat:

 sys/arch/x86/x86/syscall.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r d7c72a3ab72f -r 447b6a570e97 sys/arch/x86/x86/syscall.c
--- a/sys/arch/x86/x86/syscall.c        Sun Sep 04 21:08:18 2011 +0000
+++ b/sys/arch/x86/x86/syscall.c        Sun Sep 04 21:14:49 2011 +0000
@@ -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);
        }
 



Home | Main Index | Thread Index | Old Index