Module Name: src
Committed By: maxv
Date: Fri May 25 15:33:56 UTC 2018
Modified Files:
src/sys/arch/amd64/amd64: amd64_trap.S
Log Message:
When the previous contrext is in kernel mode we are not guaranteed to have
a 16-byte-aligned stack pointer, so align it. That's what the CPU would do
on exception entry.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/amd64/amd64/amd64_trap.S
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/amd64/amd64/amd64_trap.S
diff -u src/sys/arch/amd64/amd64/amd64_trap.S:1.41 src/sys/arch/amd64/amd64/amd64_trap.S:1.42
--- src/sys/arch/amd64/amd64/amd64_trap.S:1.41 Tue May 8 17:20:44 2018
+++ src/sys/arch/amd64/amd64/amd64_trap.S Fri May 25 15:33:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: amd64_trap.S,v 1.41 2018/05/08 17:20:44 maxv Exp $ */
+/* $NetBSD: amd64_trap.S,v 1.42 2018/05/25 15:33:56 maxv Exp $ */
/*
* Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc.
@@ -121,6 +121,7 @@
movq PCB_RSP0(%rax),%rax
.else
movq TF_RSP(%rsp),%rax
+ andq $(~0xF),%rax
.endif
subq $(5*8),%rax