Skip to content

Fix stacksave/stackrestore intrinsic asserts in externs.cpp#640

Open
cuiweixie wants to merge 1 commit intoValeLang:masterfrom
cuiweixie:fix/externs-stacksave-stackrestore-asserts
Open

Fix stacksave/stackrestore intrinsic asserts in externs.cpp#640
cuiweixie wants to merge 1 commit intoValeLang:masterfrom
cuiweixie:fix/externs-stacksave-stackrestore-asserts

Conversation

@cuiweixie
Copy link
Copy Markdown

Summary

In Externs::Externs, after registering llvm.stacksave and llvm.stackrestore, the code asserted LLVMGetIntrinsicID on the setjmp and longjmp intrinsics instead of the stack intrinsics just added. This fixes those asserts to use stacksaveIntrinsic and stackrestoreIntrinsic so the checks match the declarations above.

Testing

  • Build / existing CI (no behavior change beyond correct debug assertions).

The stacksave and stackrestore setup was asserting setjmp/longjmp intrinsic
IDs by mistake; assert the correct LLVM values instead.
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.

1 participant