Skip to content

GH-113464: Generate a more efficient JIT #118512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing relocations
  • Loading branch information
brandtbucher committed May 1, 2024
commit fbb97fca7f0de5851f339937b39f31e7736b611d
3 changes: 2 additions & 1 deletion Python/jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ patch_aarch64_33rx(unsigned char *location, uint64_t value)
loc32[1] = 0xD503201F;
return;
}
patch_aarch64_21r(location, value);
patch_aarch64_21rx(location, value);
patch_aarch64_12(location + 4, value);
}

// 32-bit relative address.
Expand Down
3 changes: 3 additions & 0 deletions Tools/jit/_stencils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class HoleValue(enum.Enum):

_PATCH_FUNCS = {
# aarch64-apple-darwin:
"ARM64_RELOC_BRANCH26": "patch_aarch64_26r",
"ARM64_RELOC_GOT_LOAD_PAGE21": "patch_aarch64_21rx",
"ARM64_RELOC_GOT_LOAD_PAGEOFF12": "patch_aarch64_12",
"ARM64_RELOC_PAGE21": "patch_aarch64_21r",
Expand All @@ -67,7 +68,9 @@ class HoleValue(enum.Enum):
"IMAGE_REL_I386_REL32": "patch_x86_64_32rx",
# aarch64-unknown-linux-gnu:
"R_AARCH64_ABS64": "patch_64",
"R_AARCH64_ADD_ABS_LO12_NC": "patch_aarch64_12",
"R_AARCH64_ADR_GOT_PAGE": "patch_aarch64_21rx",
"R_AARCH64_ADR_PREL_PG_HI21": "patch_aarch64_21rx",
"R_AARCH64_CALL26": "patch_aarch64_26r",
"R_AARCH64_JUMP26": "patch_aarch64_26r",
"R_AARCH64_LD64_GOT_LO12_NC": "patch_aarch64_12",
Expand Down