On 1/5/08, Brian <[EMAIL PROTECTED]> wrote:
> Are register values preserved between function calls on amd64?  I'm pretty 
> sure
> they are whipped out on i386, but I'm sure about amd64.
>
> Do I need to write parameters to %rbp offset, then follow the x86-abi for
> registers to write to before making the function call?  When I disassemble C
> code, it looks like the parameters are written to %rbp, then to the registers
> per the x86-84 abi, and then the function is called?  Is this the preferred 
> way
> to write function calls?  And I would use the same method to save the return
> value in %rax, right?

it should be spilling the old register values to the stack, not the
new arguments.  arguments after 4 do go on the stack though.

Reply via email to