mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
Change the stack rewind in the end of render to be slightly less fragile, anticipating putting more stuff in the stack.
Specifically, we will soon put the su_sample_offsets and su_delay_times table addresses to stack in the render_samples, to avoid hard coding them in the api call.
This commit is contained in:
parent
b94bb79366
commit
c7c752cd73
@ -379,11 +379,13 @@ su_render_sampleloop: ; loop through every sample in the row
|
|||||||
inc eax
|
inc eax
|
||||||
cmp eax, TOTAL_ROWS
|
cmp eax, TOTAL_ROWS
|
||||||
jl su_render_rowloop
|
jl su_render_rowloop
|
||||||
%ifdef INCLUDE_MULTIVOICE_TRACKS
|
; rewind the stack. Use add when there's a lot to clean, repeated pops if only a little
|
||||||
|
%if su_stack.render_epilogue - su_stack.tick > 3*PTRSIZE
|
||||||
add _SP, su_stack.render_epilogue - su_stack.tick ; rewind the remaining tack
|
add _SP, su_stack.render_epilogue - su_stack.tick ; rewind the remaining tack
|
||||||
%else
|
%else
|
||||||
pop _AX
|
%rep (su_stack.render_epilogue - su_stack.tick)/PTRSIZE
|
||||||
pop _AX
|
pop _AX ; the entropy of 3 x pop _AX is probably lower than 3 byte add
|
||||||
|
%endrep ; but this needs to be confirmed
|
||||||
%endif
|
%endif
|
||||||
render_epilogue
|
render_epilogue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user