[Bug inline-asm/66631] inability to clobber segment regs makes tls problematic
stsp at users dot sourceforge.net
gcc-bugzilla@gcc.gnu.org
Mon Jun 22 23:30:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #7 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Andrew Pinski from comment #6)
> (In reply to Stas Sergeev from comment #5)
> > (In reply to Andrew Pinski from comment #4)
> > > (In reply to Stas Sergeev from comment #3)
> > > > The signal handler needs to do the following things:
> > > > 1. Restore segment registers (init_handler() func)
> > >
> > > Why are you doing this, that is the question I am trying to understand here.
> > > What signal handler is happening?
> > Ah, OK.
> > This is a jit compiler.
> > It uses segment registers at will, and it uses
> > a memory protection too, so the signal is SIGSEGV.
>
> That seems bogus usage really. And very unportable. Don't use segment
> registers at all.
Well, I can't, sorry. :)
Please note that clang is getting this fixed already it seems:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140714/110476.html
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140714/110481.html
(not sure, just googled)
Really, no even a -mno-xxx option to disable this optimization?
More information about the Gcc-bugs
mailing list