InvestorsHub Logo
icon url

sgolds

12/18/03 10:55 AM

#21094 RE: Petz #21069

Petz, OoO registers -

Because the compiler cannot see anything about the dynamic execution of a program or know what is in the registers when a subroutine is called from diverse places in a huge programming project.

Are you sure they are used that way? Simple subroutine calls expect the registers to be the same on both sides of the call (except for SP, BP). Similar for the return. This is what register passing is all about.

I would think the 400 hidden registers are used for context shifts between threads. It's been a few years (about a decade) since I did any serious assembler programming, back then a gate call (which controls context shifting) would result in a pile of stuff put on the stack, and then the popping on the return. This gave a lot of overhead on the 486. Multithreaded code would be so much more efficient if the registers could simply be shuffled around with a pointer into a set of hidden registers.

Can anyone explain how this works on current processors? How does the processor use OoO registers? Much appreciated!