2.95.2: spilling extra registers for i386 (-m486)

Ulrich Windl Ulrich.Windl@rz.uni-regensburg.de
Sun Oct 8 23:58:00 GMT 2000


I noticed that gcc-2.95.2 uses two 32 bit registers when one should 
also do the job:

When you copy a structure with two 32 bit words, gcc creates code 
similar to this:

mov 0x28,%eax
mov 0x2c,%edx
mov %eax,0x30
mov %edx,0x34

Both registers, eax and edx are reloaded (spilled) immediately 
afterwards, so there's no use having the values in two different 
registers. I don't know the internals of gcc, but I guess it is doing a 
virtual 64 bit load followed by a virtual 64 bit store when copying a 
64 bit data structure. While legant in terms of mathematics, it does 
not make much sense on a 32-bit machine.

Or will the 486 create microcode for parallel execution?


More information about the Gcc-bugs mailing list