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
Call convention support for x86-64 kernel interface (syscall) %rdi, %… #17954
Conversation
…rsi, %rdx, %r10, %r8, %r9
@trufae, @thestr4ng3r, @Maijin Its impossible test it yet, reason: libr/core/cmd_anal.c
|
@David-Reguera-Garcia-Dreg i have pushed a PR implementing what you need to use this cc :) can you check it out and see if it works as expected? I'm fine to merge your PR like this. it doesnt hurts to have one more cc defined, but the CI must pass green. thanks! |
Thx for your PR @trufae , but I tried your #17960 and dont works as expected:
As you can see it is still using the old amd64 call convention using %rcx instead of %r10 for the fourth argument |
Thats not how it works. See anal.cc and anal.syscc (you are interested in the last one) |
See the failing tests please https://github.com/radareorg/radare2/pull/17954/checks?check_run_id=1435913663 |
Can you rebase? |
done |
cant commit to your PR. so fixed the test in here #18074 |
…rsi, %rdx, %r10, %r8, %r9
Your checklist for this pull request
Detailed description
The current amd64 call convention in r2 supported is User-level call convention: %rdi, %rsi, %rdx, %rcx, %r8, %r9
I add the amd64 kernel interface call convention (amd64syscall): %rdi, %rsi, %rdx, %r10, %r8, %r9
Test plan
Its impossible test it yet, reason: libr/core/cmd_anal.c
Just debug a x86-64-syscall-code with 4 args or more and run "as". Example with wait4 (4 args):
Closing issues