Skip to content

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Jan 29, 2026

Followup to #243. Prior to #243, a non-natural alignment for an atomic instruction was not a parse, validation or runtime failure in the spec interpreter / tests, although the spec specified that it would be a parse error (and would be a validation error after #243). Change the reference interpreter and spec test to make a non-natural alignment into a validation error. 8-bit instructions aren't tested for the validation failure since there's no way to have a non-natural alignment for those cases (only a greater one which results in a different validation failure).

Also removed some extra spaces in cmpxchg tests.

Tested with make test locally.

@stevenfontanella stevenfontanella changed the title Add tests when the alignment hint less than the natural alignment Make non-natural alignment a validation error in spec interpreter / test Feb 3, 2026
@stevenfontanella stevenfontanella marked this pull request as ready for review February 3, 2026 00:43
Copy link
Member

@tlively tlively 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 see what @conrad-watt and @rossberg think.

Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

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

Looks good, I only have stylistic nits regarding the validator change.

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.

3 participants