mirror of
https://github.com/irmen/prog8.git
synced 2026-11-22 19:24:41 +00:00
When a pointer argument staged through a data register shared that register with another argument's slot, the slot transfer was emitted in argument order with no liveness protection, so an earlier-indexed data load destroyed the staged value first (e.g. a screen pointer staged in D2 bound for A1, with x2's slot also D2: x2's load landed first and movea.l d2,a1 read garbage). Every affected call drew through a corrupt address register. Hoist such transfers ahead of the data-slot loads in translateCall when no later argument reads the transfer target; hoisted moves only write their own slot and movea leaves CCR alone. Adds a regression test mirroring blitter.line_draw(x1,y1,x2,y2,screen_ptr,erase,fill) calls with a D2-staged pointer.