diff options
| author | Dan Gohman <sunfish@mozilla.com> | 2015-05-07 08:11:10 -0700 |
|---|---|---|
| committer | Dan Gohman <sunfish@mozilla.com> | 2015-05-07 12:42:04 -0700 |
| commit | df965e349e80c0993f8e38244f1be959de05c916 (patch) | |
| tree | 7adf31df4f8865564dce88bfaddd537c78eb4b73 /BinaryEncoding.md | |
| parent | c538e60ba9333adac06f2513e2ccf76cefa8918c (diff) | |
| download | nanowasm-design-df965e349e80c0993f8e38244f1be959de05c916.tar.gz | |
Add more operations.
* The following floating-point opcodes are important fundamentals I
think we should include in the platform from the beginning:
* Sqrt - All important hardware has sqrt, asm.js has sqrt, there are no
precision tradeoffs to consider, and it's a commonly used operation.
* Neg - IEEE-754 requires that negate be a "quiet-computational sign
bit operation", and while we don't support alternate rounding modes or
floating-point exceptions, we do have NaNs, so we should have a Neg
which guarantees to just flip the sign bit.
* Copysign - Along with Neg and Abs, this finishes the set of IEEE-754
quiet-computational operations. It is also nice to have this operation
instead of the synthisized form with reinterpret-casting to integer
and back so that the value doesn't appear to leave the floating-point
register file.
* The following items added to "Operations under consideration". They
aren't directly available in asm.js, so they're not essential for v1,
but they're worth considering:
* Int32Ctz - This can be synthesized as popcnt(~x & (x - 1)), but that
references the input multiple times, which breaks the single-use
property, so having this as a regular operation is useful.
* Int32BSwap, Int32Rotr, Int32Rotl - These can be synthesized too, but
their synthesized forms also reference the input multiple times.
Either of rotl or rotr can be synthesized in terms of the other, so
in theory we'd only need one of those if we wanted to keep it minimal.
Diffstat (limited to 'BinaryEncoding.md')
0 files changed, 0 insertions, 0 deletions
