Hello, Torvald> is there documentation about what happens to setjmp() et al, and how one > should handle the setjmp intrinsics?You shouldn't use them at all.> Are setjmp() function calls transformed to intrinsics, or are > the intrinsics only used for EH?Intrisincs are used for representing necessary EH code flow. User's setjmp() are just function calls. We fixed recently optimization passes not to touch volatile loads/stores. So, now everything connected with setjmp should be ok. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
Hi Anton,> Intrisincs are used for representing necessary EH code flow. User's > setjmp() are just function calls. We fixed recently optimization passes > not to touch volatile loads/stores. So, now everything connected with > setjmp should be ok.I don't think you can treat setjmp() just like a normal function call. The C standard says that after a longjmp(), non-volatile variables that have not been changed since the call to setjmp() should have the correct value. To implement this, I think the compiler needs to know that in a function that calls setjmp(), it shouldn't keep any such variables in callee-saves registers across a call. Jay.