http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59644
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl.tools at gmail dot com, | |hubicka at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, on this source file the only differences caused by r206243 are caused by the ix86_save_reg hunk, the 4 functions in question before pro_and_epilogue pass don't need dynamic stack realignment, drap_reg is set to r10 but isn't live at the beginning of the function, just used somewhere in the function. Previously we'd save/restore it anyway, I assume just in case it would be used by the epilogue if drap would be needed there (but it isn't), after my commit it isn't saved (r10 is call used register, so there is no point in saving/restoring it). So, I fail to see why this change is wrong, unless the kernel say calls one of those functions from assembly and mistakenly assumes r10 is not clobbered by the call. Note that if stack realignment would happen, then r10 would not be preserved even before the patch, in that case, while r10 is saved/restored, it is saved after it has been set to the DRAP value.