Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

function calls

Can anyone point me to where to look up what gcc's function call semantics on the nios 2 are?

Specifically, I need to write the platform-dependent part of jamvm so that it knows how to pass arguments and take return values from function calls to native libraries. This is fairly similar to what libffi does, though I think less complicated than libffi.

But basically I need to know whether arguments are passed by register, stack, or both, and how return values are returned.

Any idea where I could find this out without having to resort to writing a short C program and using assembly to locate the values? :-)

In particular, if this is documented anywhere, I'd be very grateful for a pointer to the documentation.

Thanks.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    An alternative way to ask the question: where is the nios2/uClinux C ABI documented?