[Bug inline-asm/28686] ebp from clobber list used as operand
spark at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Feb 1 17:47:00 GMT 2007
------- Comment #5 from spark at gcc dot gnu dot org 2007-02-01 17:47 -------
-O1 error problem is due to constant assignment of var.
If you replace:
long var = 42;
with something like:
long var = func();
It compiles without an error (though it still has the #3 problem
of using %ebp even though it's marked clobbered).
This is a corner case for reload, because it knows the register contains a
constant, and thinks there will be at least some scratch register to load it
to. Unfortunately, due to the problematic asm statement having clobbers for all
registers (except %ebp, but %ebp is not available for general allocation
without -fomit-frame-pointer) there's no register available to load the
constant to.
So, the workaround for this problem is to have a local variable that's not
initialized from a constant.
So I'm deferring this #2 problem, and will take a look at #3 now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28686
More information about the Gcc-bugs
mailing list