News for hackers. Stuff that matters.
Re:Cooperative Threading by lilyball on Wednesday November 13, 2019 @01:04AM (#21521514)
Good question. https://github.com/byuu/bsnes/blob/bd8e94a7c7cbfdf7ac0b7f24c... suggests there are reasons why the section(text) approach might not work, and https://github.com/byuu/bsnes/blob/6b7e6e01bb025bf5cbeb92e65... explicitly says it doesn't work with clang, though I don't see why there's not some way of solving this without mprotect that works everywhere.
Re:Cooperative Threading by gpderetta on Wednesday November 13, 2019 @05:36AM (#21522686)
but why is it not simply using a separate asm file instead of embedding the preassembled binary as a constant?
Re:Cooperative Threading by byuu on Wednesday November 13, 2019 @06:56AM (#21523100)
Because for many years libco has supported all C89 compilers. I didn't want a dependency on GNU as on Windows, nor did I want to write an MSVC variant. There is no technical reason it cannot be inline now, especially now that we have Clang with a compatible asm syntax.