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

fixes #23114; Nim v2 regression emit / asm var param dereference inconsistency #24547

Merged
merged 4 commits into from
Dec 25, 2024

Conversation

ringabout
Copy link
Member

fixes #23114

As in #22074, expressions in bracketed emit are strictly typechecked, this PR applies the same check for symbols in asm statements in order to keep them consistent.

@ringabout
Copy link
Member Author

ringabout commented Dec 18, 2024

It breaks stint: https://github.com/status-im/nim-stint/blob/c5a4355407551804bb4e15aa6cf8dbd881b944a3/stint/private/primitives/extended_precision_x86_64_gcc.nim#L53 => status-im/nim-stint#164

Since it's a hidden deref from var param, it is most likely breaking at compilation time

ringabout added a commit to ringabout/nim-stint that referenced this pull request Dec 18, 2024
In nim-lang/Nim#24547, asm statements require no explicit dereference
@ringabout
Copy link
Member Author

ringabout commented Dec 19, 2024

I will make it a legacy feature to use unchecked asm/emit backtick symbols after status-im/nim-stint#164 is merged

arnetheduck pushed a commit to status-im/nim-stint that referenced this pull request Dec 19, 2024
@Araq Araq merged commit 3c4246d into devel Dec 25, 2024
18 checks passed
@Araq Araq deleted the pr_emit_codegen branch December 25, 2024 08:23
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 3c4246d

Hint: mm: orc; opt: speed; options: -d:release
178147 lines; 8.650s; 653.848MiB peakmem

narimiran pushed a commit that referenced this pull request Jan 15, 2025
…nsistency (#24547)

fixes #23114

As in #22074, expressions in
bracketed emit are strictly typechecked, this PR applies the same check
for symbols in asm statements in order to keep them consistent.

(cherry picked from commit 3c4246d)
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.

Nim v2 emit / asm var param dereference inconsistency
2 participants