|calling conventions for MIPS 2000/3000 firstname.lastname@example.org (1991-08-21)|
|Re: calling conventions for MIPS 2000/3000 email@example.com (1991-08-23)|
|From:||firstname.lastname@example.org (Philip J. Hatcher)|
|Keywords:||architecture, design, question|
|Date:||Wed, 21 Aug 91 16:48:50 EDT|
Can someone provide me a cogent description of the C calling
conventions for the MIPS 2000/3000? I'm executing on DECstations and
DECsystems running Ultrix 4.x and using cc.
I have read Kane (particularly the section "Linkage Conventions" in
Appendix D), but don't think that all the details are spelled out.
In particular I am confused about the size of the "procedure call
argument area". I realize that I must allocate space here even though
arguments are being passed in registers. What I'm baffled about is
exactly how much space must be allocated here.
For example, for this simple C function,
x = 1.0;
"cc -O" generates a frame of length 24 bytes. This apparently
includes 4 unused bytes at the "top" of the frame, 4 bytes for saving
r31, and 16 bytes for the arguments area. Why 16 bytes here? It looks
like only 12 bytes are needed, 4 for the char * first parameter and 8
for x converted to a double. But if only 12 bytes are allocated then
printf prints garbage.
Dept. of Computer Science
Univ. of New Hampshire
Durham, NH 03824
Return to the
Search the comp.compilers archives again.