-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Basic Wasm Codegen
Before we can move on to more complex stages of the Wasm backend we need to do initial setup work for the core codegen. This means cloning the architecture specific files like lower and lsra for wasm, and going through and applying ifdefs in the correct places to disable/enable architecture-specific logic in the common files.
Lowering, LSRA, and emitting for Wasm will be different from most architectures since there are not formally 'registers' to lower to and there are not myriad encodings of specific opcodes, nor equivalents to things like lea. So ideally these new files will be much smaller than the equivalents for arm64 or x64, and closer in size to riscv (at least at first).
The Wasm equivalent of LSRA will be assigning values to native Wasm locals instead of registers, with the caveat that managed references will need to live in linear memory to be visible to GC (because the GC cannot scan native locals).
(incomplete, work in progress)