Skip to content
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

stage2: Change semantics of AIR arithmetic overflow instructions #11311

Merged

Conversation

joachimschmidt557
Copy link
Contributor

This partially implements #10248 but retains compatibility with the current signature and semantics of @addWithOverflow and similar builtins.

This paves the way for implementing these AIR instructions efficiently in self-hosted backends and should also help unblocking #11174.

Copy link
Contributor

@matu3ba matu3ba left a comment

Choose a reason for hiding this comment

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

Somehow, I messed up the doc comment for sub_with_overflow

joachimschmidt557 and others added 3 commits March 26, 2022 17:21
add_with_overflow and similar functions now have the ty_pl data
attached. The Payload will now be a binary operation and the inst is
expected to return a tuple consisting of the destination integer type
and an overflow bit (u1).

Co-authored-by: Jan Philipp Hafer <[email protected]>
@joachimschmidt557 joachimschmidt557 merged commit 97a53bb into ziglang:master Mar 26, 2022
@joachimschmidt557 joachimschmidt557 deleted the builtin-with-overflow branch March 31, 2022 08:49
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