-
Notifications
You must be signed in to change notification settings - Fork 10
Instruction names #42
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
Comments
I think that the relaxed-simd instructions name should reflect the non-determinism, e.g. (There was also a comment about |
I don't think relaxed instructions need to have any special indication of their architecture-specific nature in the name. Emscripten wouldn't generate Relaxed SIMD instructions unless they are explicitly enabled, and this is sufficient to ensure they are not used unexpectedly. |
As for naming, I suggest the following:
|
You can use I quite like the |
We could also put the intrinsics for these instructions in a new header to help users differentiate between them, but I know I would personally find it helpful as someone who looks at a lot of Wasm if the relaxed instructions did have some naming convention to distinguish them from the deterministic instructions. |
For as much as I like the brevity of the (For that matter, we could discuss whether |
I feel like adding 'relaxed' to instruction names would become somewhat confusing when those get standardized, as there is no explicitly 'strict' instruction subset and the distinction between current and relaxed semantics would be somewhat lost. |
The meaning of "relaxed" would just be "unspecified behavior (more than just indeterminate NaN bits) for some of its input range", and that could be captured in a definition somewhere. It's also nice to keep the word since it points back to the present proposal. I've no objection to looking for a different word that better / more intuitively captures the meaning. My main point is that almost anything would be an improvement over having to keep explaining the difference between "pseudo" and "quasi" and having to map a single-character prefix to those words. |
I agree that it would be desirable if non-determinism (beyond NaN) was self-identifying in the instruction mnemonic. |
I propose this naming convention:
E.g.
The meaning of "relaxed" will be described in the spec text, specifically under Execution/Numerics, see the draft here https://www.ngzhian.com/relaxed-simd/core/exec/numerics.html#relaxed-operations. I need to tweak the paragraph because it mentions "host-dependent", and doesn't tie it in to the word "relaxed" (besides the heading of the paragraph). |
* Rename f32x4.fnma and f64x4.fnma instructions * Add relaxed_ prefix to all relaxed instructions Based on WebAssembly/relaxed-simd#42 (comment) * Renumber relaxed simd instructions * Implement i16x8.relaxed_q15mulr_s * Implement relaxed dot instructions
So far in Overview.md we've just been calling the instructions "relaxed X", where X is the original Wasm SIMD instruction. We probably should come up with proper instruction names which will go into the text format.
The text was updated successfully, but these errors were encountered: