Skip to content

GH-115802: Use the GHC calling convention in JIT code #118287

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 11 commits into from
May 1, 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
Wording
  • Loading branch information
brandtbucher committed Apr 25, 2024
commit 159d318eb834ebc38b46e834f70eb8d6992fdbe1
4 changes: 2 additions & 2 deletions Tools/jit/_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ async def _compile(
*self.args,
]
if self.ghccc:
# So, this is mostly a giant hack (but it makes the code much
# smaller and faster, so it's worth it). We need to use the GHC
# This is a bit of an ugly workaround, but it makes the code much
# smaller and faster, so it's worth it. We want to use the GHC
# calling convention, but Clang doesn't support it. So, we *first*
# compile the code to LLVM IR, perform some text replacements on the
# IR to change the calling convention(!), and then compile *that*.
Expand Down
2 changes: 1 addition & 1 deletion Tools/jit/trampoline.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "pycore_jit.h"

// This is where the calling convention changes, on platforms that require it.
// The actual change is hacked in while the JIT compiler is being built, in
// The actual change is patched in while the JIT compiler is being built, in
// Tools/jit/_targets.py. On other platforms, this function compiles to nothing.
_Py_CODEUNIT *
_ENTRY(_PyInterpreterFrame *frame, PyObject **stack_pointer, PyThreadState *tstate)
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy