[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 28 04:58:29 PST 2024


================
@@ -0,0 +1,24 @@
+;Test  longjmp load from jmp_buf.
+; Frame pointer from Slot 1.
+; Jump address from Slot 2.
+; Stack Pointer from Slot 4.
+; Literal Pool Pointer from Slot 5.
+
+; RUN: llc  < %s -mtriple=s390x-linux-gnu -O2 | FileCheck %s
+
+ at buf = dso_local global [20 x ptr] zeroinitializer, align 8
+
+; Function Attrs: noreturn nounwind
+define dso_local void @foo() local_unnamed_addr #0 {
+entry:
+; CHECK:        stmg    %r11, %r15, 88(%r15)
+; CHECK:        larl    %r1, buf
+; CHECK:        lg      %r2, 8(%r1)
+; CHECK:        lg      %r11, 0(%r1)
+; CHECK:        lg      %r13, 32(%r1)
+; CHECK:        lg      %r15, 24(%r1)
+; CHECK:        br      %r2
----------------
uweigand wrote:

It would be preferable to auto-generate these checks.  This can be done by running the `utils/update_llc_test_checks.py` script - see many of the other test cases.  You'll have to pass the path to the `llc` binary you built via the `--llc=` option.

https://github.com/llvm/llvm-project/pull/116642


More information about the cfe-commits mailing list