From 84d90cf0f3f99f2c81ac83576ef7453944099dff Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Sun, 5 May 2024 11:34:47 +0300 Subject: [PATCH] fix(vm/compiler): use more yasm-compatible syntax Closes #134. --- vm/compiler/templates/amd64-386/library.asm | 2 +- vm/compiler/templates/amd64-386/player.asm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/compiler/templates/amd64-386/library.asm b/vm/compiler/templates/amd64-386/library.asm index 4391331..27b0084 100644 --- a/vm/compiler/templates/amd64-386/library.asm +++ b/vm/compiler/templates/amd64-386/library.asm @@ -56,7 +56,7 @@ su_render_samples_loop: push {{.DI}} fnstsw [{{.SP}}] ; store the FPU status flag to stack top pop {{.DI}} ; {{.DI}} = FPU status flag - and {{.DI}}, 0b0011100001000101 ; mask TOP pointer, stack error, zero divide and in{{.VAL}}id operation + and {{.DI}}, 0011100001000101b ; mask TOP pointer, stack error, zero divide and in{{.VAL}}id operation test {{.DI}},{{.DI}} ; all the aforementioned bits should be 0! jne su_render_samples_time_finish ; otherwise, we exit due to error cmp eax, [{{.Stack "RowLength"}}] ; if rowtick >= maxtime diff --git a/vm/compiler/templates/amd64-386/player.asm b/vm/compiler/templates/amd64-386/player.asm index 0267173..a52efcc 100644 --- a/vm/compiler/templates/amd64-386/player.asm +++ b/vm/compiler/templates/amd64-386/player.asm @@ -120,7 +120,7 @@ su_update_voices_trackloop: movzx eax, byte [{{.SI}}] ; eax = current pattern imul eax, {{.PatternLength}} ; eax = offset to current pattern data {{- .Prepare "su_patterns" .AX | indent 4}} - movzx eax,byte [{{.Use "su_patterns" .AX}},{{.DX}}] ; eax = note + movzx eax,byte [{{.Use "su_patterns" .AX}} + {{.DX}}] ; eax = note push {{.DX}} ; Stack: ptrnrow xor edx, edx ; edx=0 mov ecx, ebx ; ecx=first voice of the track to be done