Is it possible to use SIMD without loading it into memory? The only way I can get it to work is by loading it's value into memory and then reading it from memory. Is this really the only way to interact with SIMD values? Can't it read and write from the stack?
This is the only solution I can get to compile, am I missing something or is this the only way?
(module
(import "console" "log" (func $log (param i32 i32 i32 i32)))
(func $main
i32.const 0
v128.const i32x4 1 2 3 4
v128.store
i32.const 0
i32.load
i32.const 4
i32.load
i32.const 8
i32.load
i32.const 12
i32.load
call $log
)
(start $main)
(memory $memory (export "memory") 1)
)
(Solutions in other languages would also be helpful, as long as they don't need memory to read and write SIMD values.)
I'm new to SIMD so any pointers would be greatly appreciated!