24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

In a 32-bit environment, this area is at least 8 words long, regardless of the length<br />

or existence of any argument list. If more than 8 words are being passed, an<br />

extension list is constructed beginning at offset 56 from the current stack pointer.<br />

The first 8 words only appear in registers at the call point, never in the stack.<br />

Remaining words are always in the stack, and they can also be in registers.<br />

In a 64-bit environment, this area is at least 8 doublewords long, regardless of the<br />

length or existence of any argument list. If more than 8 doublewords are being<br />

passed, an extension list is constructed, which begins at offset 112 from the current<br />

stack pointer.<br />

The first 8 doublewords only appear in registers at the call point, never in the<br />

stack. Remaining doublewords are always in the stack, and they can also be in<br />

registers.<br />

Linkage Convention <strong>for</strong> Argument Passing<br />

The system linkage convention takes advantage of the large number of registers<br />

available. The linkage convention passes arguments in both GPRs and FPRs. Two<br />

fixed lists, R3-R10 and FP1-FP13, specify the GPRs and FPRs available <strong>for</strong><br />

argument passing.<br />

When there are more argument words than available argument GPRs and FPRs,<br />

the remaining words are passed in storage on the stack. The values in storage are<br />

the same as if they were in registers.<br />

The size of the parameter area is sufficient to contain all the arguments passed on<br />

any call statement from a procedure that is associated with the stack frame.<br />

Although not all the arguments <strong>for</strong> a particular call actually appear in storage, it is<br />

convenient to consider them as <strong>for</strong>ming a list in this area, each one occupying one<br />

or more words.<br />

For call by reference (as is the default <strong>for</strong> <strong>Fortran</strong>), the address of the argument is<br />

passed in a register. The following in<strong>for</strong>mation refers to call by value, as in C or as<br />

in <strong>Fortran</strong> when %VAL is used. For purposes of their appearance in the list,<br />

arguments are classified as floating-point values or non-floating-point values:<br />

Interlanguage Calls 361

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!