Improved label consistency

This commit is contained in:
2025-02-21 17:04:13 +01:00
parent 08436c31c0
commit 4caac57210
11 changed files with 36 additions and 31 deletions

View File

@ -38,7 +38,9 @@ func (f *Function) CompileAssignDivision(node *ast.Assign) error {
divisor := right.Children[1]
err = f.Execute(right.Token, dividendRegister, divisor)
f.RegisterRegister(asm.MOVE, quotientVariable.Register, x86.RAX)
f.UseVariable(quotientVariable)
f.RegisterRegister(asm.MOVE, remainderVariable.Register, x86.RDX)
f.UseVariable(remainderVariable)
if isTemporary {
f.FreeRegister(dividendRegister)