Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Add setds and setes, will be useful in the future.



details:   https://anonhg.NetBSD.org/src/rev/83e147e616a2
branches:  trunk
changeset: 827119:83e147e616a2
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Oct 15 11:31:00 2017 +0000

description:
Add setds and setes, will be useful in the future.

diffstat:

 sys/arch/amd64/amd64/cpufunc.S |  10 +++++++++-
 sys/arch/x86/include/cpufunc.h |   4 +++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 5489d3d28e26 -r 83e147e616a2 sys/arch/amd64/amd64/cpufunc.S
--- a/sys/arch/amd64/amd64/cpufunc.S    Sun Oct 15 11:27:14 2017 +0000
+++ b/sys/arch/amd64/amd64/cpufunc.S    Sun Oct 15 11:31:00 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.S,v 1.28 2017/10/15 10:58:32 maxv Exp $        */
+/*     $NetBSD: cpufunc.S,v 1.29 2017/10/15 11:31:00 maxv Exp $        */
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -637,6 +637,14 @@
        outsl
        ret
 
+ENTRY(setds)
+       movw    %di, %ds
+       ret
+
+ENTRY(setes)
+       movw    %di, %es
+       ret
+
 ENTRY(setfs)
        movw    %di, %fs
        ret
diff -r 5489d3d28e26 -r 83e147e616a2 sys/arch/x86/include/cpufunc.h
--- a/sys/arch/x86/include/cpufunc.h    Sun Oct 15 11:27:14 2017 +0000
+++ b/sys/arch/x86/include/cpufunc.h    Sun Oct 15 11:31:00 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.h,v 1.22 2016/12/13 10:54:27 kamil Exp $       */
+/*     $NetBSD: cpufunc.h,v 1.23 2017/10/15 11:31:00 maxv Exp $        */
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -149,6 +149,8 @@
 uint64_t       rdpmc(u_int);
 void           wrmsr(u_int, uint64_t);
 void           wrmsr_locked(u_int, uint64_t);
+void           setds(int);
+void           setes(int);
 void           setfs(int);
 void           setusergs(int);
 



Home | Main Index | Thread Index | Old Index