Skip to content
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

Fourth parameter should be in R10 #2

Open
ghost opened this issue Dec 19, 2019 · 3 comments
Open

Fourth parameter should be in R10 #2

ghost opened this issue Dec 19, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 19, 2019

You have register RCX listed for the fourth parameter to syscalls but it should be R10.

"System V Application Binary Interface: AMD64 Architecture Processor Supplement"
https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf
Page 148 "The kernel interface uses %rdi, %rsi, %rdx, %r10, %r8 and %r9."

@msbit
Copy link

msbit commented Dec 27, 2019

@GeDaMo that section pertains specifically to AMD64 Linux kernel conventions. I'm not sure if macOS uses the same, do you have any information to that effect?

@ghost
Copy link
Author

ghost commented Dec 29, 2019

I don't use MacOS myself but I was helping someone; syscalls using RCX didn't work but using R10 did.

@msbit
Copy link

msbit commented Jan 2, 2020

Okay, I'm satisfied :)

This seems like a good candidate for a pull request.

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

No branches or pull requests

1 participant