Without this patch, if a signal handler tried to access TLS data (via %gs), things break, because the GS descriptor is zero.
To be compatible with i386, we shouldn't be touching the segment descriptors
before getting into signal handlers.
regs->cr_iip = IA32_SA_HANDLER(ka);
set_fs(USER_DS);
- regs->r16 = (__USER_DS << 16) | (__USER_DS); /* ES == DS, GS, FS are zero */
- regs->r17 = (__USER_DS << 16) | __USER_CS;
#if 0
regs->eflags &= ~TF_MASK;
set_fs(USER_DS);
- regs->r16 = (__USER_DS << 16) | (__USER_DS); /* ES == DS, GS, FS are zero */
- regs->r17 = (__USER_DS << 16) | __USER_CS;
-
#if 0
regs->eflags &= ~TF_MASK;
#endif