mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 06:25:31 +02:00
Implement variadic C func calls
This commit is contained in:
parent
e111d3ae8d
commit
39b7874481
Notes:
git
2023-03-06 07:30:07 +00:00
3 changed files with 21 additions and 18 deletions
|
@ -3,8 +3,9 @@ module RubyVM::MJIT
|
|||
# 32-bit memory access
|
||||
class DwordPtr < Data.define(:reg, :disp); end
|
||||
|
||||
# C call argument registers
|
||||
C_ARG_OPNDS = [:rdi, :rsi, :rdx, :rcx, :r8, :r9]
|
||||
# SystemV x64 calling convention
|
||||
C_ARGS = [:rdi, :rsi, :rdx, :rcx, :r8, :r9]
|
||||
C_RET = :rax
|
||||
|
||||
# https://www.intel.com/content/dam/develop/public/us/en/documents/325383-sdm-vol-2abcd.pdf
|
||||
# Mostly an x86_64 assembler, but this also has some stuff that is useful for any architecture.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue