Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 Simplify.
details: https://anonhg.NetBSD.org/src/rev/4a98633e263b
branches: trunk
changeset: 347329:4a98633e263b
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Aug 21 09:53:25 2016 +0000
description:
Simplify.
diffstat:
sys/arch/amd64/amd64/locore.S | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (36 lines):
diff -r ab67f0f79d7d -r 4a98633e263b sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S Sun Aug 21 08:30:22 2016 +0000
+++ b/sys/arch/amd64/amd64/locore.S Sun Aug 21 09:53:25 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.108 2016/07/25 16:03:38 maxv Exp $ */
+/* $NetBSD: locore.S,v 1.109 2016/08/21 09:53:25 maxv Exp $ */
/*
* Copyright-o-rama!
@@ -1247,7 +1247,7 @@
IDTVEC(syscall)
#ifndef XEN
/*
- * The user %rip is in %rcx and the user %flags in %r11. The kernel %cs
+ * The user %rip is in %rcx and the user %rflags in %r11. The kernel %cs
* and %ss are loaded, but nothing else is.
*
* The 'swapgs' instruction gives us access to cpu-specific memory where
@@ -1266,12 +1266,11 @@
/* Make stack look like an 'int nn' frame */
#define SP(x) (x)-(TF_SS+8)(%r15)
- movq $(LSEL(LUDATA_SEL, SEL_UPL)),SP(TF_SS) /* user %ss */
- movq %rsp,SP(TF_RSP) /* User space rsp */
-
- movq %r11,SP(TF_RFLAGS) /* old rflags from syscall insn */
- movq $(LSEL(LUCODE_SEL, SEL_UPL)),SP(TF_CS)
- movq %rcx,SP(TF_RIP) /* syscall saves rip in rcx */
+ movq $(LSEL(LUDATA_SEL, SEL_UPL)),SP(TF_SS) /* user %ss */
+ movq %rsp,SP(TF_RSP) /* user %rsp */
+ movq %r11,SP(TF_RFLAGS) /* user %rflags */
+ movq $(LSEL(LUCODE_SEL, SEL_UPL)),SP(TF_CS) /* user %cs */
+ movq %rcx,SP(TF_RIP) /* user %rip */
leaq SP(0),%rsp /* %rsp now valid after frame */
movq CPUVAR(SCRATCH),%r15
Home |
Main Index |
Thread Index |
Old Index