[compiler-rt] 05cfc88 - [JITLink] Allocate frames in SystemZ atexit tests (#215482)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 04:47:16 PDT 2026


Author: Ilya Leoshkevich
Date: 2026-08-18T13:47:11+02:00
New Revision: 05cfc88431991c27e83eddd701692f9aebd53c1f

URL: https://github.com/llvm/llvm-project/commit/05cfc88431991c27e83eddd701692f9aebd53c1f
DIFF: https://github.com/llvm/llvm-project/commit/05cfc88431991c27e83eddd701692f9aebd53c1f.diff

LOG: [JITLink] Allocate frames in SystemZ atexit tests (#215482)

SystemZ JITLink atexit tests crash, because they call functions without
first allocating a frame.

Fix by allocating one. While at it, switch to the more conventional
slots for %r14 and %r15.

Added: 
    

Modified: 
    compiler-rt/test/orc/TestCases/Linux/systemz/trivial-atexit.S
    compiler-rt/test/orc/TestCases/Linux/systemz/trivial-cxa-atexit.S

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-atexit.S b/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-atexit.S
index 36b357501aede..8641d03e95395 100644
--- a/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-atexit.S
+++ b/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-atexit.S
@@ -25,13 +25,14 @@ _ZN6OnExitD2Ev:
 main:
         .cfi_startproc
 # %bb.0:
-        stmg    %r14, %r15, 48(%r15)
+        stmg    %r14, %r15, 112(%r15)
+        aghi    %r15, -160
         lgrl    %r2, _ZN6OnExitD2Ev at GOT
         brasl   %r14, atexit at PLT
         lghi    %r2, 1
         brasl   %r14, llvm_jitlink_setTestResultOverride at PLT
         lghi    %r2, 0
-        lmg     %r14, %r15, 48(%r15)
+        lmg     %r14, %r15, 272(%r15)
         br      %r14
 .Lfunc_end1:
         .size   main, .Lfunc_end1-main

diff  --git a/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-cxa-atexit.S b/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-cxa-atexit.S
index e5d5191b088fb..02ffd5ef55133 100644
--- a/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-cxa-atexit.S
+++ b/compiler-rt/test/orc/TestCases/Linux/systemz/trivial-cxa-atexit.S
@@ -21,7 +21,8 @@ _ZN6OnExitD2Ev:
 main:
         .cfi_startproc
 # %bb.0:
-        stmg    %r14, %r15, 48(%r15)
+        stmg    %r14, %r15, 112(%r15)
+        aghi    %r15, -160
         lgrl    %r2, _ZN6OnExitD2Ev at GOT
         lgrl    %r4, __dso_handle at GOT
         larl    %r3, _ZL6onExit
@@ -29,7 +30,7 @@ main:
         lghi    %r2, 1
         brasl   %r14, llvm_jitlink_setTestResultOverride at PLT
         lghi    %r2, 0
-        lmg     %r14, %r15, 48(%r15)
+        lmg     %r14, %r15, 272(%r15)
         br      %r14
 .Lfunc_end1:
         .size   main, .Lfunc_end1-main


        


More information about the llvm-commits mailing list