Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread/arch/i386 save&restore %fs and %gs registers ...



details:   https://anonhg.NetBSD.org/src/rev/3e7dfe7e9732
branches:  trunk
changeset: 571036:3e7dfe7e9732
user:      kent <kent%NetBSD.org@localhost>
date:      Wed Nov 10 01:12:57 2004 +0000

description:
save&restore %fs and %gs registers for USER_LDT applications.
PR#26900

diffstat:

 lib/libpthread/arch/i386/_getsetc.S |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r b78faa26800f -r 3e7dfe7e9732 lib/libpthread/arch/i386/_getsetc.S
--- a/lib/libpthread/arch/i386/_getsetc.S       Wed Nov 10 00:29:07 2004 +0000
+++ b/lib/libpthread/arch/i386/_getsetc.S       Wed Nov 10 01:12:57 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: _getsetc.S,v 1.3 2003/10/30 13:56:37 yamt Exp $        */
+/*     $NetBSD: _getsetc.S,v 1.4 2004/11/10 01:12:57 kent Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -40,6 +40,8 @@
 #undef SETC
 
 #define GETC \
+       movl    %gs,  (UC_REGS + _REG_GS * 4)(%ecx)     ; \
+       movl    %fs,  (UC_REGS + _REG_FS * 4)(%ecx)     ; \
        movl    %edi,  (UC_REGS + _REG_EDI * 4)(%ecx)   ; \
        movl    %esi,  (UC_REGS + _REG_ESI * 4)(%ecx)   ; \
        movl    %ebp,  (UC_REGS + _REG_EBP * 4)(%ecx)   ; \
@@ -55,6 +57,8 @@
        jnc     1f                                      ; \
                                                        ; \
        FPLOAD(%ecx)                                    ; \
+       movl    (UC_REGS + _REG_GS * 4)(%ecx), %gs      ; \
+       movl    (UC_REGS + _REG_FS * 4)(%ecx), %fs      ; \
        movl    (UC_REGS + _REG_EDI * 4)(%ecx), %edi    ; \
        movl    (UC_REGS + _REG_ESI * 4)(%ecx), %esi    ; \
        movl    (UC_REGS + _REG_EBP * 4)(%ecx), %ebp    ; \



Home | Main Index | Thread Index | Old Index