Skip to content

Conversation

@Sonicadvance1
Copy link
Member

@Sonicadvance1 Sonicadvance1 commented Dec 22, 2025

Needs #5140, and #5142 merged first.

The final audit step. Goes through all instances of Constant(...) usage and determines if any of these need padding or not.
The main takeaway is that all RIP relative accesses tend to do _EntryPointOffset plus some immediate which never changes, and the _EntryPointOffset is always using a FEX relocation. Additionally if the frontend informs if anything is a guest side relocation, those literal get fully relocated as well.

Nothing too scary in here, but that wraps up the audit and now all constant generation is explicit about needing padding or not.

`Constant` IR op needs the frontend to be audited and pass padding
information through.
`ThreadRemoveCodeEntry` doesn't properly have relations wired up but it
does use the Entry. So this would be broken on code caching with
relocations.
All direct usages have been audited. Now we need to do indirect usages
through the `Constant` IR operation.
Kind of annoying that it is overlapping with LoadConstant.

NFC
Fixes an issue that a potential same constant could be padded for one
use and not padded for another.
`MOVGPRImmediate` is changing in another PR and we need to come back to
it.
All use cases now pass a pad type in to this.
Default argument is no longer used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant