------- Comment #4 from Martin dot vGagern at gmx dot net 2006-08-07 16:14 ------- (In reply to comment #2) > I bet this is not a bug. x86 is known to be very register starved.
Yes, I know that. But this situation does not explain, why adding two more functions containing the asm statements separately suddenly causes the combined version to work as expected. It's not like including those functions suddenly caused my x86 to grow additional registers, after all... :-) I still don't see why my code should not compile even for register starved x86. Including the -fomit-frame-pointer optimization should allow using the ebp register at least for leaf functions. So I should have six registers at hand to use as I please, and gcc should know about this and allow using them all, especially since the constraints are all the same, so that any mapping between variables and registers should work equally well. I forgot to mention, the combination without optimization and with neither -fPIC nor -fomit-frame-pointer works well enough. So why is ebp handled so different from ebx if the frame pointer can be omitted for the function in question? And I know I repeat myself, but why does adding the single functions help? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28635