3 ms·
But why not just do a translation — 32bit x86 to 64bit x86 doesn’t meaningfully restrict available instructions, then just* plant a bunch trampolines in the low
by olliej 7y ago
But why not just do a translation — 32bit x86 to 64bit x86 doesn’t meaningfully restrict available instructions, then just* plant a bunch trampolines in the low 4gig to the real implementations in the 64bit adds space.
* I know this isn’t a trivial “just” but it seems like a plausibly achievable approach to me
- yjftsjthsd-h 7y agoI wonder if it'd be easier to use qemu's binary compatibility features? Granted, I've only seen that used in Linux, but it's an existing layer that supports running code for another processor as if it were native.
- makomk 7y agoThat qemu mode requires a full set of libraries compiled for the processor the code you want to run executes on, so it doesn't help here - if you've got that you can just use the Linux kernel's built-in 32 bit compatibility layer which isn't going away any time soon and get better performance.
- deleted 7y ago[deleted]
- AgentME 7y ago32-bit binaries have a different ABI. I think you could put 32-bit code in a 64-bit process and have it use the 32-bit API, but then you still need a set of libraries that work with the 32-bit ABI. Ubuntu is just discontinuing packaging their own copies of the 32-bit ABI compatible libraries. Projects like Wine will just need to distribute that on their own.
- olliej 7y agoYou have the trampolines be responsible for abi translation - that’s what the old OS X ppc emulator did, or I assume the windows arm layer does
- zapzupnz 7y agoThe PPC emulator, Rosetta, also required a full compliment of PowerPC libraries and frameworks installed. Though 10.6 did not support booting on PPC and only included Intel drivers, the basic system frameworks were still Universal Binaries — PPC code was included. A Rosetta-like approach won't work on Ubuntu 19.10 as there will be no 32-bit packages, hence no libraries/frameworks in the appropriate architecture for the Rosetta-like layer to call into.