Patchouli-Compiler icon indicating copy to clipboard operation
Patchouli-Compiler copied to clipboard

Porting to another OS?

Open anta40 opened this issue 4 years ago • 1 comments

Just curious, what are the steps need to be done to port this compiler to another OS, say Linux or MacOS? Probably would make a challenging programming exercise for me... :) :D

anta40 avatar Feb 13 '22 15:02 anta40

Hi, in order to port this compiler to other OS, but the same arch (x64), the first thing that need to be changed is Linker module (you need to craft compatible binary format for target OS). The second thing to modify is the Generator module. Although it's pretty much OS independent, but at the moment, the code generation for procedure calls is totally according to Windows x64 convention (https://en.wikipedia.org/wiki/X86_calling_conventions). If you want to target Linux, you need to change that part too

congdm avatar Apr 21 '22 14:04 congdm