subtype,
@subtype@insufferable.tools avatar

Okay, the tutorials from here aren’t enough to understand how to compile to WASM: https://developer.mozilla.org/en-US/docs/WebAssembly
and I don’t feel like reading all of that right now: https://webassembly.github.io/spec/core/ (that’s not even counting the extensions)
So whatever, I’ll leave WASM for now and try native compilation instead.

QBE seems a lot more understandable https://c9x.me/compile/doc/il.html
Though it’s a bummer that there aren’t any atomic and vector instructions (?)
It’s not like I need any of that right now, but it bugs me that if I start with QBE I’m going to hit a ceiling sooner or later.
Maybe it would be easy to move to LLVM later since it’s also SSA, or maybe even contribute some code to QBE myself? I don’t have anything to test the risc64 backend though.

I should probably start actually doing something instead of screwing around and poring over possibilities.

icedquinn,
@icedquinn@blob.cat avatar

@subtype wasm doesn't support vector instructions anyway?

icedquinn,
@icedquinn@blob.cat avatar

@subtype if i recall the spec (and it has been a while) wasm really only defines kinda normal cpu logic, and then tries to store the control flow graph in a structured form (because they hate gotos, and don't want the wasm runtimes to have to recover the control flow graph when transpiling), and things like AVX instructions are exiled to being functions you import from the runtime (like it works for GCC intrinsics) and they turn it in to what it should be, if they can, on their end.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • Hentai
  • doujinshi
  • announcements
  • general
  • All magazines