dosemu2 / fdpp

FreeDOS plus-plus, 64bit DOS
GNU General Public License v3.0
198 stars 18 forks source link

thunk_gen: extend __CNV_PTR_VOID handling #244

Closed stsp closed 9 months ago

stsp commented 9 months ago

Currently thunk_gen uses _L_REF with hard-coded pos for CNV_PTR_VOID. This is a hack that doesn't work for dj64. Needs to un-hardcode _L_REF's pos (at least make it possible to decrement by 1, rather than to only increment) and add a multiplier argument. Also if there is no reference to some other arg, then perhaps another cvtype should be emitted, like CNV_PTR_PVOID/__CNV_PTR_CPVOID.

I guess some syntax extension is needed, so that instead of DWORD ASMPASCAL INITTEXT init_DosRead(WORD fd, void *buf, UWORD count); we write something like DWORD ASMPASCAL INITTEXT init_DosRead(WORD fd, void _V_FW(1) *buf, UWORD count); where "1" from _V_FW() goes to the multiplier in _L_REF.