Path: utzoo!attcan!uunet!lll-winken!lll-tis!mordor!joyce!sri-unix!garth!walter From: walter@garth.UUCP (Walter Bays) Newsgroups: comp.arch Subject: Re: separate integer and float register Message-ID: <1260@garth.UUCP> Date: 18 Aug 88 22:24:52 GMT References: <2724@wright.mips.COM> <6800002@modcomp> <1241@garth.UUCP> <879@l.cc.purdue.edu> Reply-To: walter@garth.UUCP (Walter Bays) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 50 As others have pointed out, the fastest way to handle floating point registers on a context switch is to save them only if they're used. Clipper uses a dirty-bit on the FP register file for this purpose. >In article <1241@garth.UUCP>, I wrote: >> In choosing/designing a real-time executive >> for such an application on a machine with many registers I might adopt >> register usage conventions that treated most registers as volatile. In article <879@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >If good arithmetic is involved, any convention is bad is not too rare >situations. Treating registers as volatile is bad if there are conditional >subroutine calls or even conditional branches where the condition is rare. I was speaking of a hypothetical real-time executive for the original posters' embedded application. I certainly wouldn't do that in UNIX! >Also, it is a nuisance to have separate integer and floating point registers. >I am frequently doing arithmetic which uses both simultaneously, and I would >suggest that pack and unpack instructions be part of the general set. >Since loads and stores are undesirable, the sets of registers should be >available simultaneously. Clipper has integrated on-chip floating point, and the integer and floating point registers are simultaneously available. I think that some CPU's with separate floating point co-processors access those registers through loads and stores. I don't know how long it takes such CPU's to transfer data from floating point to integer registers, but I assume it's faster than main memory. >Unless there is a big time improvement in having separate register sets, >one gains from the ability to trade off between registers used for integers >and floating point registers. I doubt that enough can be gained by having >separate register sets to compensate for the losses. Actually you do get quite a win from separate access paths, avoiding arbitrary resource conflicts for what are often independent instructions. Whether that outweighs more flexible allocation from a single register pool is debatable. It depends on how much you get from smoother pipeline flow, how the compiler uses its registers, and the workload. In the absense of profiling information, it would be difficult for a compiler to decide whether a register would be better spent for (say) remembering a floating point array value or remembering its' address. A worse loss is probably pre-allocation of registers for specific purposes before compilation. -- ------------------------------------------------------------------------------ My opinions are my own. Objects in mirror are closer than they appear. E-Mail route: ...!pyramid!garth!walter (415) 852-2384 USPS: Intergraph APD, 2400 Geng Road, Palo Alto, California 94303 ------------------------------------------------------------------------------