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 Declare and use TRAP_ENTRY_POINT_FPU. N...
details: https://anonhg.NetBSD.org/src/rev/e8cc240dd610
branches: trunk
changeset: 359623:e8cc240dd610
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Feb 17 20:28:18 2018 +0000
description:
Declare and use TRAP_ENTRY_POINT_FPU. No real functional change.
diffstat:
sys/arch/amd64/amd64/amd64_trap.S | 39 ++++++++++++++++++++-------------------
1 files changed, 20 insertions(+), 19 deletions(-)
diffs (62 lines):
diff -r bb9a314ae556 -r e8cc240dd610 sys/arch/amd64/amd64/amd64_trap.S
--- a/sys/arch/amd64/amd64/amd64_trap.S Sat Feb 17 20:22:05 2018 +0000
+++ b/sys/arch/amd64/amd64/amd64_trap.S Sat Feb 17 20:28:18 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amd64_trap.S,v 1.25 2018/02/17 20:22:05 maxv Exp $ */
+/* $NetBSD: amd64_trap.S,v 1.26 2018/02/17 20:28:18 maxv Exp $ */
/*
* Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc.
@@ -132,6 +132,23 @@
IDTVEC_END(\name)
.endm
+.macro TRAP_ENTRY_POINT_FPU name,code,is_ztrap
+IDTVEC(\name)
+ .if \is_ztrap
+ ZTRAP_NJ(\code)
+ .else
+ TRAP_NJ(\code)
+ .endif
+ INTRENTRY
+#ifdef DIAGNOSTIC
+ movl CPUVAR(ILEVEL),%ebx
+#endif
+ movq %rsp,%rdi
+ call _C_LABEL(fputrap)
+ jmp .Lalltraps_checkusr
+IDTVEC_END(\name)
+.endm
+
.text
TEXT_USER_BEGIN
@@ -290,26 +307,10 @@
jmp .Lalltraps_checkusr
IDTVEC_END(trap15)
-IDTVEC(trap16)
- ZTRAP_NJ(T_ARITHTRAP)
-.Ldo_fputrap:
- INTRENTRY
-#ifdef DIAGNOSTIC
- movl CPUVAR(ILEVEL),%ebx
-#endif
- movq %rsp,%rdi
- call _C_LABEL(fputrap)
- jmp .Lalltraps_checkusr
-IDTVEC_END(trap16)
-
+TRAP_ENTRY_POINT_FPU trap16,T_ARITHTRAP,1
TRAP_ENTRY_POINT trap17,T_ALIGNFLT,0
TRAP_ENTRY_POINT trap18,T_MCA,1
-
-IDTVEC(trap19)
- ZTRAP_NJ(T_XMM)
- jmp .Ldo_fputrap
-IDTVEC_END(trap19)
-
+TRAP_ENTRY_POINT_FPU trap19,T_XMM,1
TRAP_ENTRY_POINT trap20,T_RESERVED,1
TRAP_ENTRY_POINT trap21,T_RESERVED,1
TRAP_ENTRY_POINT trap22,T_RESERVED,1
Home |
Main Index |
Thread Index |
Old Index