Preferred registers for integer arithmetic
Paul Römer
roemer.paul@googlemail.com
Fri Apr 15 13:40:00 GMT 2011
Hi,
I'm playing around with the gcc and its generated assembler code for
some test applications. I recognized that the gcc prefers the use of
the registers eax, (ebx), ecx and edx (x86) for arithmetic
instructions like lea, add, mul, etc. I know that the gcc uses several
register classes to define which registers can be used for which task
(e.g. FIXED_REGS, GENERAL_REGS).
Is there also a class that explains the described behavior? Or does
the gcc simply looks for unused registers in a special order?
Another question: What is meant by the Q_REGS class?
Thanks,
Paul
More information about the Gcc-help
mailing list