Files
prog8/codeGenM68k
Irmen de Jong cd68356e02 m68k: fix call-site clobber of address-slot args staged in Dx
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.
2026-11-07 18:07:19 +01:00
..