Skip to content

Conversation

usuyus
Copy link

@usuyus usuyus commented Aug 14, 2025

This PR adds R15 to the X86-64 calling conventions for OCaml. Proper threading of runtime registers for caml_c_call'ed functions is also added.

@gretay-js
Copy link

@usuyus This PR doesn't have to be on top of #15, please split the changes.

def CSR_64 : CalleeSavedRegs<(add RBX, R12, R13, R14, R15, RBP)>;

// R14 and R15 are used as return registers, so they aren't callee saved.
def CSR_64_OCaml_C_Call : CalleeSavedRegs<(add RBX, R12, R13, RBP)>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use sub ?

@usuyus usuyus merged commit 3acad44 into ocaml-flambda:llvmize-oxcaml Aug 15, 2025
@usuyus usuyus deleted the oxcaml-allocptr branch August 22, 2025 19:09
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.

2 participants