Skip to content

SystemZ: Add support for __builtin_setjmp and __builtin_longjmp. #119257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Dec 10, 2024

Conversation

anoopkg6
Copy link
Contributor

@anoopkg6 anoopkg6 commented Dec 9, 2024

This pr includes fixes for original pr##116642.
Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ..

1. Using 64-bit virtual register instead of 32-bit in SystemZISelLowering.cpp for -mbackchain option. -verify-machineinstrs option exposed it.
2. Adding -verify-machineinstrs option to run llvm tests.
3. Using %clang_cc1 instead of %clang for clang test failure.
4. Fix issue with unused variable being used in assert().
Copy link
Member

@uweigand uweigand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing those issues. Just a couple of further comments inline.

On certain targets (ARM, PowerPC, VE, X86), the front end places the
frame pointer in the first word and the stack pointer in the third word,
while the target implementation of this intrinsic fills in the remaining
words. On other targets (SystemZ), saving the calling context to the buffer is left completely to the target implementation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is very long, can you add a line break?


; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck %s

; RUN: llc < %s -mtriple=s390x-linux-gnu -O2 | FileCheck %s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to run this twice? Apparently this gives the exact same output as the same FileCheck prefix matches both? If so, I don't think we need this. (Same for the other tests.)

Copy link
Member

@uweigand uweigand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's try to merge again.

@uweigand uweigand merged commit dc04d41 into llvm:main Dec 10, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants