earl@mips.COM (Earl Killian) (08/06/88)
I thought I had posted this a while ago, but it appears not have have made it. I have a question for the Motorola folks in the crowd: what were the tradeoffs that went into the decision to make the floating point and integer registers the same? Before micros, there was about an even split between architectures with separate fp registers and those without. Then came micros and their architectures, where the floating point registers were always separate because they were on different chips. Finally as it is becoming feasible to put cpu and fpu on the same chip, the question becomes relevant again. It is interesting that one of the first such chips, the 88100, choose to take advantage of 1-chipness and combine the register files. Why? How is the 88100's register file organized? Is it a 2x32 read, 1x32 write? 2x64 read, 1x64 write? Or something else? I'm guessing from the fact that the repeat rate for double-precision fp ops is a new one every 2 cycles that it is 2x32, so it takes 2 cycles to read the operands and 2 cycles to write the results. Is that right? Does that mean that after a fadd you must wait a cycle before starting an integer instruction, because the register file is in use? -- UUCP: {ames,decwrl,prls,pyramid}!mips!earl USPS: MIPS Computer Systems, 930 Arques Ave, Sunnyvale CA, 94086
alverson@decwrl.dec.com (Robert Alverson) (08/15/88)
>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. I can't help there, but I can point out some of the advantages >found in the Intel 80960 which also has floating-point operations that >operate on the general (integer) registers. > 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. In truth, this is probably a better argument against varargs than for unified register file. Unfortunately, varargs are here to stay for a while, at least. Bob - alverson@decwrl.dec.com
dneff@garth.UUCP (David Neff) (08/16/88)
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.
chip@ateng.uucp (Chip Salzenberg) (09/06/88)
[ this is becoming language-specific; followups are directed to comp.lang.c ] According to alverson@decwrl.dec.com (Robert Alverson): >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. No. Fp variables may reside in a separate set of registers and be found there by a varargs function. This approach requires compiler support for noticing the actual type of each varargs parameter instead of just its size; but that's why we have varargs (or stdarg) in the first place. -- Chip Salzenberg <chip@ateng.uu.net> or <uunet!ateng!chip> A T Engineering My employer may or may not agree with me. The urgent leaves no time for the important.