zlacker

[parent] [thread] 3 comments
1. samsar+(OP)[view] [source] 2023-10-14 14:41:33
I helped make a really cursed RISC-V version of this for a class project last year! The idea was to first compile each program to WASM using clang, and lower the WASM back to C but this time with all opcodes implemented in terms of the RISC-V vector intrinsics. That was a hack to be sure, but a surprisingly elegant one since 1. WASM's structured control flow maps really well to lane masking 2. Stack and local values easily use "structure of arrays" layout 3. Heap values easily use "array of structures" layout

It never went anywhere but the code is still online if anyone wants to stare directly at the madness: https://gitlab.com/samsartor/wasm2simt

replies(2): >>vmlade+BG1 >>junon+Rr2
2. vmlade+BG1[view] [source] 2023-10-15 06:06:04
>>samsar+(OP)
This is cool! If you wrote a blog post going detail about the insights, I'd read it
replies(1): >>mparte+8i2
◧◩
3. mparte+8i2[view] [source] [discussion] 2023-10-15 13:41:46
>>vmlade+BG1
The linked github page has a link to a paper.
4. junon+Rr2[view] [source] 2023-10-15 14:50:19
>>samsar+(OP)
I don't know that I'd ever use this in production but this is really really cool. Nice work.
[go to top]