From 09849d171af9a874483d98cad339819258e3d943 Mon Sep 17 00:00:00 2001 From: jj Date: Tue, 29 Oct 2024 15:35:58 +0100 Subject: [PATCH] x64/c: explicit ABI in comment --- metasm/cpu/x86_64/compile_c.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metasm/cpu/x86_64/compile_c.rb b/metasm/cpu/x86_64/compile_c.rb index 9a6782e52..6b70b48cc 100644 --- a/metasm/cpu/x86_64/compile_c.rb +++ b/metasm/cpu/x86_64/compile_c.rb @@ -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