Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali.cs.montana.edu!masscomp!mod From: mod@masscomp.ccur.com (2915) Newsgroups: comp.sys.mips Subject: Re: Question on cc Message-ID: <31665@masscomp.ccur.com> Date: 18 Jul 90 21:33:11 GMT Reply-To: mod@masscomp.UUCP (Michael O'Donnell 508-392-2915) Distribution: na Organization: Concurrent Computer Corp. - Westford, Ma Lines: 28 In article David.Steere@CS.CMU.EDU writes: ...... > It turns out that the compiler looks for the symbol "va_alist" in >the procedure header, and if it is found forces all the arguments to be >written to the stack. Okay, this seems like a hack and it seems to work I'm pretty sure this isn't quite true. My observation is that the generated code writes all register-based argument values to the stack frame any time it sees a reference to the ADDRESS of any of them. Another MIPS vararg gotcha is the inability to pass a float or double as the FIRST item in a variable argument list - try it and see... (The explanation has been provided here before - the integer registers get copied into the stack frame instead of the float registers - Ouch! ) ---------------------------------------------------------------------------- Michael O'Donnell (508)392-2915 home(508)251-7576 fax(508)692-8307 ___________ / ________/__ ...!{harvard,uunet,petsd}!masscomp!mod /__/_______/ / mod@westford.ccur.com Concurrent /__________/ Computer Corporation 1 Technology Way Westford, MA 01886 DISCLAIMER: My opinions only coincidentally resemble those of my employer. ----------------------------------------------------------------------------