public void generate() { allocateStatic(); //assembly.putLine(); assembly.putComment("Init static data"); generateStaticInitializer(); assembly.putComment("Code block"); generateCodeRoutine(); assembly.putLine(); generateModulesRoutines(); assembly.putLine(); assembly.putComment("End of program"); assembly.put(AsmBuilder.label(":end")); }
private void _generateRoutine(Module module, RoutineTableEntry routine) { // todo: генерация кода одной функции assembly.put(AsmBuilder.condJump(RegistersManager.JL_REG, RegistersManager.RL_REG)); }
public void setCurrentModule(Module module) { buffer.put(AsmBuilder.setRegister(RegistersManager.SB_REG, module.staticBase)); }
public void moveFpToSp() { buffer.put(AsmBuilder.setRegister(RegistersManager.FP_REG, RegistersManager.SP_REG)); }
public void setRegister(string reg, int index) { buffer.put(AsmBuilder.setRegister(reg, index)); }