by Netch · 2y ago · 0 comments
> One of which was the automatic cast of 32 bit function arguments to 64 bit during the function call.
AFAIU this works only for unsigned arguments (as loading to %edi clears upper part of %rdi). SysV ABI spec for x86-64 says nothing about extending all values in registers or stack to full 64-bit value, and comment on boolean (only LS byte contains something significant) suggests this is a common rule.
No comments yet.