[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2018-12-03 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 sandra at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2018-12-03 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #33 from sandra at gcc dot gnu.org --- Author: sandra Date: Tue Dec 4 04:22:37 2018 New Revision: 266770 URL: https://gcc.gnu.org/viewcvs?rev=266770=gcc=rev Log: 2018-12-03 Sandra Loosemore PR c/59039 gcc/

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2018-11-30 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #32 from sandra at gcc dot gnu.org --- New patch posted for review here: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg4.html

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2018-11-26 Thread gcc at kalvdans dot no-ip.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #31 from Christian Häggström --- What you describe Sandra is mentioned in the man page for longjmp(3). Maybe we can steal some of its documentation. Caveats If the function which called setjmp() returns before

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2018-11-26 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 sandra at gcc dot gnu.org changed: What|Removed |Added CC||sandra at gcc dot gnu.org

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2016-02-26 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 Eric Botcazou changed: What|Removed |Added CC||helloqirun at gmail dot com --- Comment

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2016-01-31 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 Jeffrey A. Law changed: What|Removed |Added CC||law at redhat dot com --- Comment #27

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2016-01-31 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #28 from Eric Botcazou --- > Balaji fixed the ICE a while back. Based on c#26, I don't think we should > hide the functions from being used/called from user code. So the only issue > left is the doc fix, right? That's my

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2014-01-07 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #26 from Eric Botcazou ebotcazou at gcc dot gnu.org --- I would not say that __builtin_setjmp is more efficient. It really saves just as many registers, except that it has help from the containing function's prologue/epilogue to do

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2014-01-06 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 Richard Henderson rth at gcc dot gnu.org changed: What|Removed |Added CC||rth at gcc dot

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-09 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #24 from Eric Botcazou ebotcazou at gcc dot gnu.org --- Does it look OK? Mostly, but I wouldn't go into full details about what contains the buffer, this is machine-specific and not portable. Maybe something like: The @code{setjmp}

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #16 from Richard Biener rguenth at gcc dot gnu.org --- (In reply to H.J. Lu from comment #15) (In reply to Eric Botcazou from comment #14) This is good to hear. What is each field? I assume that the first 3 fields are frame

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #17 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Richard Biener from comment #16) I couldn't find anything in GCC manual. See tm.texi / md.texi. This is the only thing I found: -- Macro: DONT_USE_BUILTIN_SETJMP

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #18 from Eric Botcazou ebotcazou at gcc dot gnu.org --- I couldn't find anything in GCC manual. There are a few documented hooks, but this looks quite light indeed, so the sources are probably the best references, i.e. builtins.c and

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #19 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Eric Botcazou from comment #18) I couldn't find anything in GCC manual. There are a few documented hooks, but this looks quite light indeed, so the sources are probably

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #20 from Eric Botcazou ebotcazou at gcc dot gnu.org --- Would it be OK to submit it a patch to document __builtin_longjmp/__builtin_setjmp based on their sources? I think that we would need to issue an error if both are in the same

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #21 from Andreas Schwab sch...@linux-m68k.org --- It's only an error if they use the same jmpbuf.

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread bviyer at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #22 from bviyer at gcc dot gnu.org --- Author: bviyer Date: Fri Nov 8 19:52:27 2013 New Revision: 204592 URL: http://gcc.gnu.org/viewcvs?rev=204592root=gccview=rev Log: +2013-11-08 Balaji V. Iyer balaji.v.i...@intel.com + +

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-08 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #23 from H.J. Lu hjl.tools at gmail dot com --- Created attachment 31186 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31186action=edit A patch to document __builtin_setjmp/__builtin_longjmp Does it look OK?

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added CC||ebotcazou at

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #5 from Richard Biener rguenth at gcc dot gnu.org --- But it seems cilk depends on implementation details of setjmp/longjmp which looks bogus anyway.

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #6 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Richard Biener from comment #4) Ah, those are the builtins used for SJLJ and they get lowered to setjmp_setup,dispatcher and longjmp. Don't use __builtin_setjmp as I

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #7 from Eric Botcazou ebotcazou at gcc dot gnu.org --- Ah, those are the builtins used for SJLJ and they get lowered to setjmp_setup,dispatcher and longjmp. Right, they are the efficient version of setjmp/longjmp. I suppose these

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #8 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Eric Botcazou from comment #7) Ah, those are the builtins used for SJLJ and they get lowered to setjmp_setup,dispatcher and longjmp. Right, they are the efficient

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #9 from Eric Botcazou ebotcazou at gcc dot gnu.org --- What restrictions do they have? Can they be used within the same function? Can they be used within functions with parameters? The only restriction I know of is that they cannot

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #10 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Eric Botcazou from comment #9) What restrictions do they have? Can they be used within the same function? Can they be used within functions with parameters? The only

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #11 from Andreas Schwab sch...@linux-m68k.org --- In the latter testcase foo doesn't call a function so there is never a need to save anything.

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #12 from Eric Botcazou ebotcazou at gcc dot gnu.org --- %rdi holds the function parameter 'i'. But when __builtin_longjmp is called, %rdi can have some random value. GCC doesn't save %rdi first. No, __builtin_longjmp doesn't touch

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #13 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Eric Botcazou from comment #12) No, __builtin_longjmp doesn't touch %rdi at all. Don't worry too much, the SJLJ mechanism of the C++ and Ada compilers has been piggybacked

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #14 from Eric Botcazou ebotcazou at gcc dot gnu.org --- This is good to hear. What is each field? I assume that the first 3 fields are frame address, resume address and stack address. Are the same for all targets? What are the

[Bug c/59039] Undocumented __builtin_longjmp/__builtin_setjmp

2013-11-07 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59039 --- Comment #15 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Eric Botcazou from comment #14) This is good to hear. What is each field? I assume that the first 3 fields are frame address, resume address and stack address. Are