Request for assistance closing some old pull requests

Michael keybounce at gmail.com
Mon Mar 19 19:22:09 UTC 2018


On 2018-03-19, at 10:03 AM, Perry E. Metzger <pmetzger at macports.org> wrote:

> So my understanding (and I might be mangling it) is that the issue
> here is that there are two x86_64 registers that are reasonable
> candidates for pointing at thread local data, and Windows has picked
> a different one from macOS. The result of this is that a register
> that Windows programs expect will be preserved gets destroyed in the
> course of calling in to the rest of the OS.
> 
> There's no good way to shim the ABI without having something
> physically deal with this problem, which likely requires a lot of
> work on very low level hacking. This might be feasible, but it is not
> ready for a Pull Request.

Maybe there is something that I did not understand here. Isn't a simple solution to say that on entering wine controlled territory when on Mac OS that one register is saved, and then restored before returning?

If the issue is just that the Windows binaries (Exe's, DLLs, etc.) assume that they can use a register that will be destroyed when entering context X (Mac OS system code or whatever), can't you just save the registers in question (swap those two registers, or say one to the stack, or something) each time you make that context switch?




More information about the macports-dev mailing list