Path: utzoo!attcan!uunet!snorkelwacker!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.sys.m88k Subject: Re: Emulating other computers on 88K's and Benchmarks Message-ID: Date: 15 Oct 90 15:38:38 GMT References: <1990Oct3.095041.9295@canterbury.ac.nz> <41965@mips.mips.COM> <1990Oct11.174838.7990@unx.sas.com> <14903@paperboy.OSF.ORG> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 31 In-reply-to: terryl@osf.osf.org's message of 15 Oct 90 13:38:38 GMT In article <14903@paperboy.OSF.ORG> terryl@osf.osf.org writes: | In article meissner@osf.org (Michael Meissner) writes: | | The only time that I've wished the MIPS had a unified register set was | | in dealing with varargs functions where you would like to be able to | | store all unknown arguments on the stack, and walk a pointer. | | However, the 88k doesn't win any points in this arena, because the | | Greenhills inspired 88K OCS demands that you have two separate arrays, | | va_list is a 3 word structure, and the va_arg macro continually has to | | check whether or not the argument is in the first 8 words or not.... | | | Yes, but that's just the way the Greenhills compiler works with varargs. | There's no reason I can think of why the Greenhills can't spill the register | arguments onto the stack; in fact, it appears that it allocates that space | already..... No, the 88Open standard mandates that varargs use a 3 word structure, and NOT save the registers in the spill area (which would have made more sense IMHO). Otherwise you can't pass structures to your varardic function, since structures are NOT passed in registers, and are passed in the spill area instead. The way the original Motorola calling sequence worked was the first 8 words are always passed in the registers, and that you would save these registers into the spill area. If this had been used instead of the current calling sequence, then va_list would have been a normal char *. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 Do apple growers tell their kids money doesn't grow on bushes?