Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Rename LaneIdx{2,4,8,16,32} to ImmLaneIdx{2,4,8,16,32} - #34

Merged
dtig merged 8 commits into
WebAssembly:masterfrom
gnzlbg:patch-1
Dec 17, 2018
Merged

dtig merged 8 commits into
WebAssembly:masterfrom
gnzlbg:patch-1

Conversation

@gnzlbg

@gnzlbg gnzlbg commented Aug 7, 2018

Copy link
Copy Markdown
Contributor

This makes it clear everywhere that ImmLaneIdx is an immediate operand and also makes the nomenclature for immediate operands consistent (both ImmByte and ImmLaneIdx start with the prefix Imm) .

See #33 .

This makes it clear everywhere that `ImmLaneIdx` is an immediate operand and also makes the nomenclature for immediate operands consistent (both `ImmByte` and `ImmLaneIdx`  start with the prefix `Imm`) .

See WebAssembly#33 .
@gnzlbg

gnzlbg commented Aug 8, 2018

Copy link
Copy Markdown
Contributor Author

So now I think this PR is incorrect, since some instructions like extract_lanes do not appear to require immediate mode operands (or at least the spec doesn't say so). I am re-opening the issue #33 .

@gnzlbg

gnzlbg commented Aug 8, 2018

Copy link
Copy Markdown
Contributor Author

So looking at the binary encoding it appears that the extract_lanes / replace_lanes / ... all take immediate mode operands... so I think this PR is correct, but incomplete, in that the nomenclature should be made consistent for those other operations as well.

@gnzlbg

gnzlbg commented Aug 8, 2018

Copy link
Copy Markdown
Contributor Author

So I've pushed another commit with new changes that:

  • consistently prefix immediate mode arguments with imm
  • consistently describes how these immediate mode arguments are encoded in the binary
  • contains a text-form explanation of the semantics of the shuffle instruction indices
  • contains further explanations and examples of what the interpretation and the hierarchy are since they are only a naming scheme for instructions.

@binji

binji commented Aug 10, 2018

Copy link
Copy Markdown
Member

This looks like a good clarification, thanks! When this is converted to formal spec text it will be less of an issue because the immediate args vs. stack args are specified separately. See for example set_local: https://webassembly.github.io/spec/core/exec/instructions.html#exec-set-local. The x is immediate and the expected stack structure is specified in the associated validation section.

@gnzlbg

gnzlbg commented Sep 25, 2018

Copy link
Copy Markdown
Contributor Author

@penzn

I don't know why the wording in the spec is the way it is, but you can definitely try submitting a PR to correct it :)

I've got your back :P

@penzn

penzn commented Sep 25, 2018

Copy link
Copy Markdown
Contributor

@penzn

I don't know why the wording in the spec is the way it is, but you can definitely try submitting a PR to correct it :)

I've got your back :P

I see, I should've noticed that you already opened it :)

Comment thread proposals/simd/SIMD.md Resolved
Comment thread proposals/simd/SIMD.md Resolved
Comment thread proposals/simd/SIMD.md Resolved
Comment thread proposals/simd/SIMD.md Resolved
@gnzlbg

gnzlbg commented Dec 17, 2018

Copy link
Copy Markdown
Contributor Author

Thank you for your feedback @dtig , I hope I incorporated all of it correctly into the PR, let me know what you think!

@dtig dtig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for incorporating feedback!

@dtig
dtig merged commit 324cfa1 into WebAssembly:master Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants