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

Question regarding function cvu64 in minix3.1 #347

Open
LeoHaveFun123 opened this issue Aug 26, 2023 · 0 comments
Open

Question regarding function cvu64 in minix3.1 #347

LeoHaveFun123 opened this issue Aug 26, 2023 · 0 comments

Comments

@LeoHaveFun123
Copy link

I am not sure if this is the correct place to ask this question, I am reading minix3 source code these days but I cannot understand the asm code of this function. The original code is as below, this function is used to covert the input 32bit unsigned value to 64 bit.

_cvu64: ! u64_t cvu64(unsigned i);
_cvul64: ! u64_t cvul64(unsigned long i);
mov eax, 4(esp) !this line is saving input paramter to eax, which is i
mov edx, 8(esp) !this line saves something above i which is something unknown on caller stackframe? Why???
mov (eax), edx !move unknown value to address pointed by i??
mov 4(eax), 0
ret

I have added my understanding in above comments, I may have made mistakes but I dont know how. Thanks for any help in advance.

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