This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/55672] [4.8 Regression] -fstack-check=generic ICEs in print_reg, at config/i386/i386.c:13868


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

--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> 2012-12-17 21:39:28 UTC ---
If stack_realign_p is true, frame_pointer_needed is also true.   So we can use
fp to eliminate frame but i386.c::x86_can_eliminate prohibits it.  The code
looks strange:


 if (stack_realign_fp)
    return ((from == ARG_POINTER_REGNUM
             && to == HARD_FRAME_POINTER_REGNUM)
            || (from == FRAME_POINTER_REGNUM
                && to == STACK_POINTER_REGNUM));

So we permit to change argument pointer but not frame pointer to FP which again
is strange IMHO.   Changing the code to

 if (stack_realign_fp)
    return ((from == ARG_POINTER_REGNUM
             && to == HARD_FRAME_POINTER_REGNUM)
            || (from == FRAME_POINTER_REGNUM
                && to == STACK_POINTER_REGNUM)
            || (from == FRAME_POINTER_REGNUM
                && to == HARD_FRAME_POINTER_REGNUM));

solves the problem.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]