diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h index 01eaa6591c..d01bc3ac9e 100644 --- a/sysdeps/i386/nptl/tls.h +++ b/sysdeps/i386/nptl/tls.h @@ -221,22 +221,9 @@ tls_fill_user_desc (union user_desc_init *desc, THREAD_GETMEM (__pd, header.dtv); }) -/* Return the thread descriptor for the current thread. - - The contained asm must *not* be marked volatile since otherwise - assignments like - pthread_descr self = thread_self(); - do not get optimized away. */ -# if __GNUC_PREREQ (6, 0) +/* Return the thread descriptor for the current thread. */ # define THREAD_SELF \ (*(struct pthread *__seg_gs *) offsetof (struct pthread, header.self)) -# else -# define THREAD_SELF \ - ({ struct pthread *__self; \ - asm ("movl %%gs:%c1,%0" : "=r" (__self) \ - : "i" (offsetof (struct pthread, header.self))); \ - __self;}) -# endif /* Magic for libthread_db to know how to do THREAD_SELF. */ # define DB_THREAD_SELF \