Re: Go to CLAX and enjoy the difference




Frank Kotler wrote:
>
> Yeah, but different registers. What happened to ebx, ecx, edx, esi, edi,
> (ebp in some calls)...
>
> Well I suppose it's because syscall trashes [e|r]cx... Uses it to store
> [e|r]ip, I guess... ???
>
> Best,
> Frank

I intentionally did not set up a stack frame in those examples. You
have the
option in amd64 to use %rbp as another register and use %rsp to index
the
the stack. This is explained in a footnote in the ABI.

You have a lot more registers to work with. There is a table in the
ABI that tells you what registers are used for what parameter and which
ones are preserved across function calls.

Floats are now passed using the %xmm set of registers. I would post an
example, but I do not understand 128 bit media yet.

Cheers,

Brian

.



Relevant Pages

  • Re: Too many one line function calls
    ... the overhead depends upon the ABI and upon the ... program would see that the registers themselves are not being modified ... upon the architecture and ABI: some ABIs are set up to save the ... Suppose you were able to save two instructions per invocation by ...
    (comp.lang.c)
  • Re: [OT] caller-save/callee-save register styles
    ... >I would like to know various people's experiences about the caller-save ... >and callee-save style of preserving register values across procedure ... callee-save registers, so you need to save those caller-save ... Neither the ELF spec nor the generic SVR4 ABI documents these things. ...
    (Linux-Kernel)
  • Re: how to "wrap" vfork?
    ... >> assembly and in such a way that it keeps all its state in registers ... And when vfork() returned in the parent it would ... > find the stack frame where it expected. ... but it seems that making a tail call to vforkinside your wrapper ...
    (comp.unix.solaris)
  • Re: how to "wrap" vfork?
    ... >> assembly and in such a way that it keeps all its state in registers ... And when vfork() returned in the parent it would ... > find the stack frame where it expected. ... but it seems that making a tail call to vforkinside your wrapper ...
    (comp.unix.programmer)
  • Re: Uses for an exchange instruction?
    ... uncommon for short structures to be returned in registers. ... The SysV ABI for i386 says this: ... "If a function returns a structure or union, then the caller provides ... larger than "four eightbytes" are handled similarly to i386. ...
    (comp.arch)