WebAssembly / relaxed-simd

Relax the strict determinism requirements of SIMD operations.
Other
43 stars 9 forks source link

Possible bug in spec of relaxeddotmul #158

Open rossberg opened 2 months ago

rossberg commented 2 months ago

The spec defines:

   \EXPROFDET & \relaxeddotmul_{M,N}(i_1, i_2) &=& [ \imul_N(\signed_M(i_1), i_2), \imul_N(\signed_M(i_1), \signed_M(i_2)) ] \\
   & \relaxeddotmul_{M,N}(i_1, i_2) &=& \imul_N(\extends_{M,N}(i_1), \extends_{M,N}(i_2)) \\

The use of signed in the relaxed case seems off. Should that be

   \EXPROFDET & \relaxeddotmul_{M,N}(i_1, i_2) &=& [ \imul_N(\extends_{M,N}(i_1), extendu_{M,N}), \imul_N(\extends_{M,N}(i_1), \extends_{M,N}(i_2)) ] \\

?

rossberg commented 2 months ago

~In fact, aren't the additions missing as well?~

ngzhian commented 2 months ago

Ohyea, should be extend to make the bitwidth line up. Thanks!