Improved code generation

This commit is contained in:
Eduard Urbach 2024-07-05 15:51:19 +02:00
parent 881cb0a81c
commit a80f971e8a
Signed by: eduard
GPG key ID: 49226B848C78F6C8
3 changed files with 48 additions and 12 deletions

View file

@ -27,7 +27,7 @@ func (f *Function) ExpressionToRegister(node *expression.Expression, register cp
right := node.Children[1]
final := register
if OverwritesRegister(right, register) {
if f.UsesRegister(right, register) {
register = f.cpu.MustFindFree(f.cpu.General)
}