This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
2.95.2: spilling extra registers for i386 (-m486)
- To: bug-gcc at gnu dot org
- Subject: 2.95.2: spilling extra registers for i386 (-m486)
- From: "Ulrich Windl" <Ulrich dot Windl at rz dot uni-regensburg dot de>
- Date: Mon, 9 Oct 2000 08:57:57 +0200
- Organization: Universitaet Regensburg, Klinikum
Hello,
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?
Regards,
Ulrich