mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
GH-135904: JIT compiler: Support 19 bit branch instructions on AArch64 for Mach-O. (GH-140453)
* Insert labels into assembly for custom relocation during stencil creation.
This commit is contained in:
parent
95953b692d
commit
61e759c2ee
4 changed files with 62 additions and 17 deletions
|
|
@ -218,6 +218,7 @@ async def _build_stencils(self) -> dict[str, _stencils.StencilGroup]:
|
|||
tasks.append(group.create_task(coro, name=opname))
|
||||
stencil_groups = {task.get_name(): task.result() for task in tasks}
|
||||
for stencil_group in stencil_groups.values():
|
||||
stencil_group.convert_labels_to_relocations()
|
||||
stencil_group.process_relocations(self.known_symbols)
|
||||
return stencil_groups
|
||||
|
||||
|
|
@ -565,7 +566,7 @@ def get_target(host: str) -> _COFF32 | _COFF64 | _ELF | _MachO:
|
|||
if re.fullmatch(r"aarch64-apple-darwin.*", host):
|
||||
host = "aarch64-apple-darwin"
|
||||
condition = "defined(__aarch64__) && defined(__APPLE__)"
|
||||
optimizer = _optimizers.OptimizerAArch64_MachO
|
||||
optimizer = _optimizers.OptimizerAArch64
|
||||
target = _MachO(host, condition, optimizer=optimizer)
|
||||
elif re.fullmatch(r"aarch64-pc-windows-msvc", host):
|
||||
host = "aarch64-pc-windows-msvc"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue