Improved code generation

This commit is contained in:
2024-07-09 12:43:29 +02:00
parent 8103faa8b6
commit 1204591cdc
4 changed files with 12 additions and 7 deletions

View File

@ -35,6 +35,12 @@ func (f *Function) CompileCall(root *expression.Expression) error {
return err
}
f.SaveRegister(f.cpu.Output[0])
for _, register := range registers {
f.SaveRegister(register)
}
// Push
for _, register := range f.cpu.General {
if f.cpu.IsUsed(register) {