RFC: PowerPC floating point features
Michael Eager
eager@eagercon.com
Sun Apr 6 20:39:00 GMT 2008
Daniel Jacobowitz wrote:
> On Sun, Apr 06, 2008 at 10:25:38AM -0700, Michael Eager wrote:
>> For an instruction supported on all variants (both BookE and E500)
>> with a double precision FPU.
>
> I think you have your terminology switched. E500 is (very
> approximately) an implementation of Book E; the FPR-based FPU is
> usually called "classic FP" and dates back long before Book E,
> at least to the 601.
Perhaps.
BookE, like some other PPC versions, has FP registers.
gcc uses E500 to mean specifically the PPC 8540:
The 8540 does FP operations in GPRs, which the docs
describe as defined in the SPE APU.
e500.h:
#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)
I'm just going with the flow: gcc describes doing FP ops in
GPRS as a E500 feature. Maybe there should be some better terminology.
I think that the ppc feature options are a bit confusing and indirect.
For example, rather than defining TARGET_FPRS directly, it's
defined backwards, by reference to doing float in GPRS:
#define TARGET_FPRS (rs6000_float_gprs == 0)
Perhaps there should be "TARGET_FPS" and "TARGET_FGPRS".
I'm happy to adopt whatever terminology is reasonable to make the
code more understandable.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Gcc
mailing list