mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Define JumpImmediateRange on ARM64.
There are comments in the code suggesting that we've made plans at some point to handle very far jumps via patching + indirect jumps, but all of those comments are TODO/FIXME. Absent such a strategy, the furthest jump is 2^27-1 bytes, and we need to define JumpImmediateRange to reflect that.
This commit is contained in:
parent
2b7e8039f2
commit
b97da34a21
1 changed files with 6 additions and 4 deletions
|
|
@ -299,10 +299,12 @@ static const uint32_t ION_FRAME_SLACK_SIZE = 24;
|
|||
|
||||
static const uint32_t ShadowStackSpace = 0;
|
||||
|
||||
// TODO:
|
||||
// This constant needs to be updated to account for whatever near/far branching
|
||||
// strategy is used by ARM64.
|
||||
static const uint32_t JumpImmediateRange = UINT32_MAX;
|
||||
// When our only strategy for far jumps is to encode the offset directly, and
|
||||
// not insert any jump islands during assembly for even further jumps, then the
|
||||
// architecture restricts us to -2^27 .. 2^27-4, to fit into a signed 28-bit
|
||||
// value. We further reduce this range to allow the far-jump inserting code to
|
||||
// have some breathing room.
|
||||
static const uint32_t JumpImmediateRange = ((1 << 27) - (20 * 1024 * 1024));
|
||||
|
||||
static const uint32_t ABIStackAlignment = 16;
|
||||
static const uint32_t CodeAlignment = 16;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue