Is garbage allowed in high bits of parameter and return value registers in x86-64 SysV ABI?
问题 The x86-64 SysV ABI specifies, among other things, how function parameters are passed in registers (first argument in rdi , then rsi and so on), and how integer return values are passed back (in rax and then rdx for really big values). What I can't find, however, is what the high bits of parameter or return value registers should be when passing types smaller than 64-bits. For example, for the following function: void foo(unsigned x, unsigned y); ... x will be passed in rdi and y in rsi , but