Number of registers on x86

Daniel Berlin dan@www.cgsoftware.com
Mon Jan 29 13:19:00 GMT 2001


Can we please lie and say we have 32 GP registers on x86?
Why, you ask?

Well, there are 40 universal temporaries that are used by the hardware
register renaming.
Everything but floating status word, and floating point control word, can
be renamed.

Intel's compiler (IIRC), and SML/NJ do this (I'm positive about this one),
and it improves performance, and helps to eliminate a lot of worthless
spills.
They just map them back into the 8 registers right before emitting.


--Dan



More information about the Gcc mailing list