Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/nvmm/x86 Micro-optimize: use pushq instead of pushw....
details: https://anonhg.NetBSD.org/src/rev/3668fd93acaa
branches: trunk
changeset: 937205:3668fd93acaa
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Aug 11 15:48:42 2020 +0000
description:
Micro-optimize: use pushq instead of pushw. To avoid LCP stalls and
unaligned stack accesses.
diffstat:
sys/dev/nvmm/x86/nvmm_x86_svmfunc.S | 10 +++++-----
sys/dev/nvmm/x86/nvmm_x86_vmxfunc.S | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (57 lines):
diff -r ad0a49279146 -r 3668fd93acaa sys/dev/nvmm/x86/nvmm_x86_svmfunc.S
--- a/sys/dev/nvmm/x86/nvmm_x86_svmfunc.S Tue Aug 11 15:35:17 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svmfunc.S Tue Aug 11 15:48:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmm_x86_svmfunc.S,v 1.4 2020/07/19 06:36:37 maxv Exp $ */
+/* $NetBSD: nvmm_x86_svmfunc.S,v 1.5 2020/08/11 15:48:42 maxv Exp $ */
/*
* Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -75,10 +75,10 @@
#define HOST_SAVE_TR \
strw %ax ;\
- pushw %ax
+ pushq %rax
#define HOST_RESTORE_TR \
- popw %ax ;\
+ popq %rax ;\
movzwq %ax,%rdx ;\
movq CPUVAR(GDT),%rax ;\
andq $~0x0200,4(%rax,%rdx, 1) ;\
@@ -86,10 +86,10 @@
#define HOST_SAVE_LDT \
sldtw %ax ;\
- pushw %ax
+ pushq %rax
#define HOST_RESTORE_LDT \
- popw %ax ;\
+ popq %rax ;\
lldtw %ax
/*
diff -r ad0a49279146 -r 3668fd93acaa sys/dev/nvmm/x86/nvmm_x86_vmxfunc.S
--- a/sys/dev/nvmm/x86/nvmm_x86_vmxfunc.S Tue Aug 11 15:35:17 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_vmxfunc.S Tue Aug 11 15:48:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmm_x86_vmxfunc.S,v 1.4 2020/07/19 06:36:37 maxv Exp $ */
+/* $NetBSD: nvmm_x86_vmxfunc.S,v 1.5 2020/08/11 15:48:42 maxv Exp $ */
/*
* Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -100,10 +100,10 @@
#define HOST_SAVE_LDT \
sldtw %ax ;\
- pushw %ax
+ pushq %rax
#define HOST_RESTORE_LDT \
- popw %ax ;\
+ popq %rax ;\
lldtw %ax
/*
Home |
Main Index |
Thread Index |
Old Index