Skip to content

Support upper-case inline assembly#1013

Merged
hernanponcedeleon merged 3 commits intodevelopmentfrom
fixASMParsingForUpperCaseASM
Mar 23, 2026
Merged

Support upper-case inline assembly#1013
hernanponcedeleon merged 3 commits intodevelopmentfrom
fixASMParsingForUpperCaseASM

Conversation

@ThomasHaas
Copy link
Copy Markdown
Collaborator

No description provided.

@ThomasHaas
Copy link
Copy Markdown
Collaborator Author

Hmm, my easy solution doesn't work. I hoped making everything lower case works, but the lexers have exactly one upper-case rule for Q. That's unfortunate.

@ThomasHaas ThomasHaas force-pushed the fixASMParsingForUpperCaseASM branch from 6713dbd to 3610088 Compare March 21, 2026 20:19
@ThomasHaas
Copy link
Copy Markdown
Collaborator Author

Upper case letters are now recognized by the lexer but they will never match a rule.
However, inline assembly seems to be case insensitive and so, e.g., mfence and MFENCE should both be valid, but we only recognize the former.

@ThomasHaas
Copy link
Copy Markdown
Collaborator Author

see cna.h in #1016, where I had to comment out asm("PAUSE") because it was tripping up the parser.
With this PR, the code is parsed and asm("PAUSE") is treated as unknown inline assembly (replaced by NOOP + logger warning).

@hernanponcedeleon hernanponcedeleon force-pushed the fixASMParsingForUpperCaseASM branch from 3610088 to ae27857 Compare March 23, 2026 14:44
@hernanponcedeleon hernanponcedeleon enabled auto-merge (squash) March 23, 2026 14:44
@hernanponcedeleon
Copy link
Copy Markdown
Owner

Let get this one merged first so you can keep the original code in #1016

@hernanponcedeleon hernanponcedeleon merged commit 3ee2709 into development Mar 23, 2026
7 checks passed
@hernanponcedeleon hernanponcedeleon deleted the fixASMParsingForUpperCaseASM branch March 23, 2026 15:28
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