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

Mention opcode name syntax for alignment #342

Merged
merged 1 commit into from
Sep 14, 2015
Merged

Conversation

lukewagner
Copy link
Member

This patch explains how alignment shows up in the opcode name, so design matches ml-proto.

To specify unnatural alignment, the opcode name can be suffixed with `/n` for
`n` any integer power of 2. For example, `float64.load/2` specifies a `float32`
load with 2-byte alignment; `int32.load16_s/1` specifies a signed 2-byte load
that is unaligned (1-byte aligned).
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a better fit for text format, since it's implicit in the bytecode format?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean that you think this para should go in TextFormat.md? I kinda see that point, but opcode names are not just a detail of the text format; they also show up in the SExpr language as the names of AST nodes and will show up in the module local opcode table (which is part of the binary format). AstSemantics is sortof the central hub, so I think it makes sense for it to define the names of opcodes.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, but I see your point too. lgtm then :-)

lukewagner added a commit that referenced this pull request Sep 14, 2015
Mention opcode name syntax for alignment
@lukewagner lukewagner merged commit 0389c3b into master Sep 14, 2015
@lukewagner lukewagner deleted the add-alignment-syntax branch September 14, 2015 18:34
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