You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: