billc@wupulm.UUCP (Bill Canning) (06/30/89)
Could someone out there tell me how FORTRAN/9000 expects functions to return thier values? Is it in the same registers that C would return the same type of value, (e.g., INTEGER*4 returned in register D0 by FORTRAN, long int returned in reg. D0 in C.) I am trying to port some code that is written in both FORTRAN and C, originally created on Data General equipment. Any help someone could offer would be greatly appreciated. Thanks in advance, Bill Canning ..!uunet!wugate!wupost!wupulm!billc
sjo@hpfcdc.HP.COM (Scott Omdahl) (07/05/89)
INTEGER, LOGICAL and REAL*4 are returned in D0. REAL*8 results are returned in D0 and D1. All COMPLEX, CHARACTER and RECORD/STRUCTURE results are returned on the stack. So, yes, it is the same as C's convention. The manual "HP-UX Assembler Reference and Supporting Documents" (part number 98597-90020) has all the details. Scott Omdahl {ihnp4 | hplabs} !hpfcla!sjo HP Colorado Language Lab