aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-03-05 02:53:03 +0000
committerRoland McGrath <roland@gnu.org>2006-03-05 02:53:03 +0000
commita935c3dc908c26b6ca87a4e892d03d84165d1e83 (patch)
tree31afc0a577ea9c41d510097c01c901a14234f424 /sysdeps/mach
parent3295976affeff4d04981811c45d466b276b6dce3 (diff)
downloadglibc-a935c3dc908c26b6ca87a4e892d03d84165d1e83.tar
glibc-a935c3dc908c26b6ca87a4e892d03d84165d1e83.tar.gz
glibc-a935c3dc908c26b6ca87a4e892d03d84165d1e83.tar.bz2
glibc-a935c3dc908c26b6ca87a4e892d03d84165d1e83.zip
* sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Make sure high bits
of SEL are clear after copying %gs to low bits. (_hurd_tls_fork): Likewise.
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/i386/tls.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h
index ff849716e0..223a47d2f2 100644
--- a/sysdeps/mach/hurd/i386/tls.h
+++ b/sysdeps/mach/hurd/i386/tls.h
@@ -98,7 +98,7 @@ _hurd_tls_init (tcbhead_t *tcb, int secondcall)
{
/* Fetch the selector set by the first call. */
int sel;
- asm ("mov %%gs, %w0" : "=q" (sel));
+ asm ("mov %%gs, %w0" : "=q" (sel) : "0" (0));
if (__builtin_expect (sel, 0x50) & 4) /* LDT selector */
{
error_t err = __i386_set_ldt (tcb->self, sel, &desc, 1);
@@ -151,7 +151,7 @@ _hurd_tls_fork (thread_t child, struct i386_thread_state *state)
{
/* Fetch the selector set by _hurd_tls_init. */
int sel;
- asm ("mov %%gs, %w0" : "=q" (sel));
+ asm ("mov %%gs, %w0" : "=q" (sel) : "0" (0));
if (sel == state->ds) /* _hurd_tls_init was never called. */
return 0;