[Bug inline-asm/11807] GCC should error out when clobbering the stack or frame pointer

falk at debian dot org gcc-bugzilla@gcc.gnu.org
Sat Nov 22 17:55:00 GMT 2003


------- Additional Comments From falk at debian dot org  2003-11-22 17:55 -------
(In reply to comment #11)
> > +         case HARD_FRAME_POINTER_REGNUM:
> > +           error ("Frame pointer register `%s' clobbered in `asm'", regname);
> 
> This one's more interesting, since if CAN_DEBUG_WITHOUT_FP we often won't
> need or use a frame pointer.  I think this error should be delayed until
> reload has decided that a frame pointer is necessary.

Maybe. It's currently broken even for frameless, though, at least on
Alpha:

int f(int x) { asm ("nop" : : : "$15");  return x; }
        mov     a0,v0
        nop
        ret

even though $15/fp/s6 is a callee-saved register in frameless
functions.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11807



More information about the Gcc-bugs mailing list