diff options
| author | kent <kent@NetBSD.org> | 2004-11-10 01:12:57 +0000 |
|---|---|---|
| committer | kent <kent@NetBSD.org> | 2004-11-10 01:12:57 +0000 |
| commit | 63a8cde23142950db1c7db161ea08d5a18bfdb67 (patch) | |
| tree | d0b2b8492155a144782ad504194f463acb71effc /lib/libpthread | |
| parent | d7ef73e56142a5c12d109970043bb6e9b244b292 (diff) | |
save&restore %fs and %gs registers for USER_LDT applications.
PR#26900
Diffstat (limited to 'lib/libpthread')
| -rw-r--r-- | lib/libpthread/arch/i386/_getsetc.S | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libpthread/arch/i386/_getsetc.S b/lib/libpthread/arch/i386/_getsetc.S index 12f6cc9cd54..5174c2a91db 100644 --- a/lib/libpthread/arch/i386/_getsetc.S +++ b/lib/libpthread/arch/i386/_getsetc.S @@ -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 ; \ |
