> I saw that stack instructions on Intel platform are not used that > much. I think this is a pity cause stack operations are small (size > optimization) and usually fast (from Pentium two consecutive push/pop > are executed together -> speed optimization). Consider this small > piece of code
whether push(pop instructions or mov instructions are faster depends on the type of processor used. GCC is well aware of this. If you specify the desired processor with -mtune then GCC will use whatever is best for that processor. For example if you optimize for old Pentium processors, use -mtune=pentium and you will see that the compiler uses push/pop instructions even when not using -Os -- Marcel Cox