From 3cbc5003618998a7bcbcb3fdc675fbd2968b7727 Mon Sep 17 00:00:00 2001 From: vsariola <5684185+vsariola@users.noreply.github.com> Date: Sun, 21 Mar 2021 11:46:51 +0200 Subject: [PATCH] optimize(templates): don't use LEA in player, use MOV Compresses better. --- templates/amd64-386/player.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/amd64-386/player.asm b/templates/amd64-386/player.asm index 268fc05..ba7b921 100644 --- a/templates/amd64-386/player.asm +++ b/templates/amd64-386/player.asm @@ -63,7 +63,7 @@ su_render_sampleloop: ; loop through every sample in the row mov {{.COM}}, {{.PTRWORD}} su_patch_code ; COM points to vm code mov {{.VAL}}, {{.PTRWORD}} su_patch_parameters ; VAL points to unit params {{- if .HasOp "delay"}} - lea {{.CX}}, [{{.DX}} + su_synthworkspace.size - su_delayline_wrk.filtstate] + mov {{.CX}}, {{.PTRWORD}} su_synth_obj + su_synthworkspace.size - su_delayline_wrk.filtstate {{- end}} lea {{.WRK}}, [{{.DX}} + su_synthworkspace.voices] ; WRK points to the first voice {{.Call "su_run_vm"}} ; run through the VM code