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 Replace %rax -> %rdi, so that check_swa...
details: https://anonhg.NetBSD.org/src/rev/c6f1708ff6b1
branches: trunk
changeset: 359771:c6f1708ff6b1
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Feb 25 08:28:55 2018 +0000
description:
Replace %rax -> %rdi, so that check_swapgs clobbers only one register.
diffstat:
sys/arch/amd64/amd64/amd64_trap.S | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r e7c932454f62 -r c6f1708ff6b1 sys/arch/amd64/amd64/amd64_trap.S
--- a/sys/arch/amd64/amd64/amd64_trap.S Sun Feb 25 08:27:15 2018 +0000
+++ b/sys/arch/amd64/amd64/amd64_trap.S Sun Feb 25 08:28:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amd64_trap.S,v 1.34 2018/02/25 08:09:07 maxv Exp $ */
+/* $NetBSD: amd64_trap.S,v 1.35 2018/02/25 08:28:55 maxv Exp $ */
/*
* Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc.
@@ -393,8 +393,8 @@
leaq do_iret(%rip),%rdi
cmpq %rdi,TF_RIP(%rsp)
jne 5f
- movq TF_RSP(%rsp),%rax /* Must read %rsp, may be a pad word */
- testb $SEL_UPL,8(%rax) /* Check %cs of outer iret frame */
+ movq TF_RSP(%rsp),%rdi /* Must read %rsp, may be a pad word */
+ testb $SEL_UPL,8(%rdi) /* Check %cs of outer iret frame */
je 2b /* jump if iret was to kernel */
jmp 1b /* to user - must restore %gs */
5:
Home |
Main Index |
Thread Index |
Old Index