Inter-compiler portability of asm between gdc and ldc2 (and dmd)

Jacob Carlborg doob at me.com
Wed Jul 15 15:50:45 UTC 2020


On 2020-07-15 09:34, Stefan Koch wrote:

> There is a workaround which I used and that involves runtime overhead on 
> startup.
> You just write the bytes that make up your function into an executable 
> page of memory.
> Set a function pointer to there, and you are done ;)

There are some platforms that don't allow that, like macOS (10.15 or 
later). But I'm guessing you don't care about macOS ;)

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list