https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
Stas Sergeev changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #18 from Stas Sergeev ---
(In reply to Andy Lutomirski from comment #17)
> I'll chime in, possibly uselessly.
>
> Before Linux 4.1, only CS was saved. (Unless you go *way* back.) In 4.1
> or newer, SS is saved, too.
>
> In 64-bit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
Andy Lutomirski changed:
What|Removed |Added
CC||luto at mit dot edu
--- Comment #17 fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #16 from Stas Sergeev ---
Actually, Andrew, do you think this is even
TLS specific? No segregs are restored at all (not even DS,
I was wrong saying it is), so is it guaranteed, if FS
is restored by some other means, that gcc will not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #15 from Stas Sergeev ---
(In reply to Andrew Pinski from comment #13)
> Those all have pure assembly code to handle this case.
No, they actually simply don't use TLS in a handler.
That's something I'll be looking into too to save me
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #13 from Andrew Pinski ---
(In reply to Stas Sergeev from comment #11)
> (In reply to Andrew Pinski from comment #9)
> > Clang is not GCC. Really you should not be using the fs segment register
> > for your own use as it is part of t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #14 from Andrew Pinski ---
(In reply to Stas Sergeev from comment #12)
> Note that on x86_64 you can't set FS without a syscall.
> I would really hate doing that in asm it seems.
Yes because you are setting the TLS segment. Again wh
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #12 from Stas Sergeev ---
Note that on x86_64 you can't set FS without a syscall.
I would really hate doing that in asm it seems.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #11 from Stas Sergeev ---
(In reply to Andrew Pinski from comment #9)
> Clang is not GCC. Really you should not be using the fs segment register
> for your own use as it is part of the ABI that is the TLS segment. Any
> other use it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #10 from Andrew Pinski ---
Also why can't you write your segfault handler in assembly when you fixup the
fs segment and then call the C functions?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #9 from Andrew Pinski ---
(In reply to Stas Sergeev from comment #7)
> (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 S
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #8 from Stas Sergeev ---
Note that O0 and O1 are fine.
Only O2 gives the problem. So there
might be a simple solution somewhere!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #7 from Stas Sergeev ---
(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 hand
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #6 from Andrew Pinski ---
(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. Rest
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #5 from Stas Sergeev ---
(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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #4 from Andrew Pinski ---
(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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #3 from Stas Sergeev ---
The signal handler needs to do the following things:
1. Restore segment registers (init_handler() func)
2. Increment thread-local var (fault_cnt)
3. Do stuff including reads of fault_cnt var
Being thread-loca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #2 from Andrew Pinski ---
Can you better describe your use case because this is not obvious what you are
trying to achieve here.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66631
--- Comment #1 from Stas Sergeev ---
Please note that the shown code was generated
with gcc-4.8.2, but inability to clobber segreg
with inline asm was tested with gcc-5.1.1.
A bit of dissonance here, I can't do both tests
with similar gcc.
Is th
19 matches
Mail list logo