mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-15 01:00:53 +02:00
When executing a 32-bit application we were failing to allocate a single GPR pair. This meant we only have 7 pairs when we could have had 8. This was because r30 was ending up in the middle of the allocation arrays so we couldn't safely create a sequential pair of registers. Organize the register allocation arrays to be unique for each bitness being executed and then access them through spans instead. Also works around bug where the RA validation doesn't understand when pair indexes don't correlate directly to GPR indexes. So while the previous PR fixed the RA pass, it didn't fix the RA validation pass. Noticed this when pr57018 32-bit gcc test was run with the #2700 PR which improved the RA allocation a bit.