Skip to content

Commit ec796f4

Browse files
committed
Update to Excecption Handling(llvm.eh.sjlj.setjmp) documentation and undo accidental changes.
1 parent 82a49e2 commit ec796f4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4621,6 +4621,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
46214621

46224622
if (getTarget().getTriple().getArch() == llvm::Triple::systemz) {
46234623
// On this target, the back end fills in the context buffer completely.
4624+
// It doesn't really matter if the frontend stores to the buffer before
4625+
// calling setjmp, the back-end is going to overwrite them anyway.
46244626
Function *F = CGM.getIntrinsic(Intrinsic::eh_sjlj_setjmp);
46254627
return RValue::get(Builder.CreateCall(F, Buf.emitRawPointer(*this)));
46264628
}

llvm/docs/ExceptionHandling.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,11 @@ overall functioning of this intrinsic is compatible with the GCC
374374
to interoperate.
375375

376376
The single parameter is a pointer to a five word buffer in which the calling
377-
context is saved. The front end places the frame pointer in the first word, and
378-
the target implementation of this intrinsic should place the destination address
379-
for a `llvm.eh.sjlj.longjmp`_ in the second word. The following three words are
380-
available for use in a target-specific manner.
377+
context is saved. The format and contents of the buffer are target-specific.
378+
On certain targets, the front end places the frame pointer in the first word
379+
and the stack pointer in the third word, while the target implementation of
380+
this intrinsic fills in the remaining words. On other targets, saving the
381+
calling context to the buffer is left completely to the target implementation.
381382

382383
.. _llvm.eh.sjlj.longjmp:
383384

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- systemzisellowering.cpp - systemz dag lowering implementation -----===//
1+
//===-- SystemZISelLowering.cpp - SystemZ DAG lowering implementation -----===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

0 commit comments

Comments
 (0)