glasm: Implement local memory for glasm

This commit is contained in:
ameerj 2021-05-14 21:18:53 -04:00
parent ab5dbe7c29
commit 057dee4856
4 changed files with 12 additions and 9 deletions

View file

@ -306,6 +306,9 @@ std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) {
for (size_t index = 0; index < ctx.reg_alloc.NumUsedRegisters(); ++index) {
header += fmt::format("R{},", index);
}
if (program.local_memory_size > 0) {
header += fmt::format("lmem[{}],", program.local_memory_size);
}
header += "RC;"
"LONG TEMP ";
for (size_t index = 0; index < ctx.reg_alloc.NumUsedLongRegisters(); ++index) {