Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!teknowledge-vaxc!sri-unix!garth!dneff
From: dneff@garth.UUCP (David Neff)
Newsgroups: comp.arch
Subject: Re: separate integer and float registers
Message-ID: <1235@garth.UUCP>
Date: 15 Aug 88 17:36:48 GMT
References: <2724@wright.mips.COM> <56@radix> <705@bacchus.DEC.COM>
Reply-To: dneff@garth.UUCP (David Neff)
Organization: INTERGRAPH (APD) -- Palo Alto, CA
Lines: 26

In article <705@bacchus.DEC.COM> alverson@decwrl.UUCP (Robert Alverson) writes:
>>In article <2724@wright.mips.COM> earl@mips.COM (Earl Killian) asks why
>>the Motorola 88100 makes the floating-point and integer registers the
>>same.  ...
>>
>One unfortunate aspect of separate fp and integer registers shows up
>with varargs parameter passing.  Given that you want to pass parameters
>in registers in optimized code, it seems that any call to a varargs
>procedure must be detected, and any fp parameters passed in integer
>registers.  In the absence of the ability to detect varargs procedures
>(old style C), you may be forced to always pass fp values via integer
>registers.
>

The CLIPPER microprocessor has separate general and fp registers and
varargs works using the standard AT&T varargs.h macros.  There is no
additional cost to callers; the varargs routines themselves are
responsible (via the macros) for saving the contents of *any* registers
that may have parameters in them, until the program has decided (via
va_arg) which parameter number and type it wants.

Note that the big change is from all parameters on the stack (for dirty
old programs that take the addresses of their parameters then increment
them) and parameters in registers, whether there is one or two sets of
registers.  Once you can handle parameters in registers at all, it's
relatively easy to handle multiple banks.