Skip to content

Commit

Permalink
x64/c: explicit ABI in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyg committed Oct 29, 2024
1 parent 165bfd7 commit 09849d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metasm/cpu/x86_64/compile_c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,11 @@ def c_init_state(func)
@state = State.new(func)
args = func.type.args.dup
if @parser.lexer.definition['__MS_X86_64_ABI__']
# windows: rcx rdx r8 r9
@state.args_space = 32
@state.regargs = [1, 2, 8, 9]
else
# linux: rdi rsi rdx rcx r8 r9
@state.args_space = 0
@state.regargs = [7, 6, 2, 1, 8, 9]
end
Expand Down

0 comments on commit 09849d1

Please sign in to comment.