You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This proposal adds a memidx to the syntax for load/store instructions: i32.load 1 loads from memory index 1.
The SIMD proposal adds instructions with a laneidx immediate that load or store a single lane of a vector: v128.load8_lane 1 loads a scalar and replaces lane index 1 in a v128 operand.
If the proposals are merged, it's unclear whether the 1 in v128.load8_lane 1 should be parsed as a memory or lane index. It's possible to disambiguate it by saying that if there's a single index, it's the lane index, and if there are two indices, it's the memory index followed by the lane index.
Alternatively, we could require that memory index immediates are wrapped in a (memory ..) tag like in an active data segment definition. i.e.:
v128.load8_lane 2 would load a scalar from memory 0 and replace lane index 2.
v128.load8_lane (memory 1) would be malformed due to missing a lane index.
v128.load8_lane (memory 1) 2 would load a scalar from memory 1 and replace lane index 2.
The text was updated successfully, but these errors were encountered:
This proposal adds a
memidx
to the syntax for load/store instructions:i32.load 1
loads from memory index 1.The SIMD proposal adds instructions with a
laneidx
immediate that load or store a single lane of a vector:v128.load8_lane 1
loads a scalar and replaces lane index 1 in av128
operand.If the proposals are merged, it's unclear whether the
1
inv128.load8_lane 1
should be parsed as a memory or lane index. It's possible to disambiguate it by saying that if there's a single index, it's the lane index, and if there are two indices, it's the memory index followed by the lane index.Alternatively, we could require that memory index immediates are wrapped in a
(memory ..)
tag like in an active data segment definition. i.e.:v128.load8_lane 2
would load a scalar from memory 0 and replace lane index 2.v128.load8_lane (memory 1)
would be malformed due to missing a lane index.v128.load8_lane (memory 1) 2
would load a scalar from memory 1 and replace lane index 2.The text was updated successfully, but these errors were encountered: