Xref: utzoo comp.sys.mips:405 comp.sys.dec:2434 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!mips!gumby!lai From: lai@mips.COM (David Lai) Newsgroups: comp.sys.mips,comp.sys.dec Subject: Re: ANSI-C style variadic functions on MIPS Message-ID: <34273@mips.mips.COM> Date: 9 Jan 90 20:07:30 GMT References: <1990Jan5.085205.12473@athena.mit.edu> <15370@boulder.Colorado.EDU> <1990Jan6.062805.23863@athena.mit.edu> <34218@mips.mips.COM> <1990Jan8.041547.18259@athena.mit.edu> Sender: news@mips.COM Reply-To: lai@mips.COM (David Lai) Followup-To: comp.sys.mips Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 25 In article <1990Jan8.041547.18259@athena.mit.edu> raeburn@athena.mit.edu (Ken Raeburn) writes: >In article <34218@mips.mips.COM> lai@mips.COM (David Lai) writes: >> extern foo(double,...); >> foo(2.0,3.0); /* passes 2.0 in fp reg, 3.0 in regular registers */ > >Ah, excellent. Thank you for the confirmation. I had thought this >was the solution, but it doesn't match Kane's book (well, maybe if you A new update to Kanes book is in the works. There is also updates to the Languages Programmers Guide to reflect stdarg style functions. >interpret variadic-function arguments as coming under "anything else", >regardless of type -- but that should be explicitly stated) or the >behavior I saw from the PMAX (excuse me, DECstation) compiler. (I did >have my definition -- with ellipsis -- before the call; that should be >enough.) Could the Ultrix version be an older compiler, that didn't >have this fixed? Theirs is 1.31, and puts 3.0 (from the example >above) in $f14, as does the current gcc port. If it is outdated, I'll >complain at them.... What's the current one supposed to be? The latest released compiler is 2.0. 2.10 is in beta test, which has the stdarg fully working. -- "What is a DJ if he can't scratch?" - Uncle Jamms Army David Lai (lai@mips.com || {ames,prls,pyramid,decwrl}!mips!lai)