https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82485
Daniel Santos <daniel.santos at pobox dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.santos at pobox dot com --- Comment #3 from Daniel Santos <daniel.santos at pobox dot com> --- (In reply to Jakub Jelinek from comment #2) > Daniel, can you please have a look at this? Thanks. This looks like a duplicate of pr82002, which I've been a bit slow to resolve. The fix to this error is a really small patch: @@ -15682,7 +15682,7 @@ ix86_expand_epilogue (int style) the stack pointer, if we will restore SSE regs via sp. */ if (TARGET_64BIT && m->fs.sp_offset > 0x7fffffff - && sp_valid_at (frame.stack_realign_offset) + && sp_valid_at (frame.stack_realign_offset + 1) && (frame.nsseregs + frame.nregs) != 0) { pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx, The problem is that if you throw in an ms to sysv call, it breaks due to the the SP offset overflowing and needing to use a temp register. So I've rewritten choose_baseaddr so that when this is needed, it can track the value of a scratch register so that we don't end up repeating the calculation for each access beyond the 32-bit range. Anyway, I'll try to finish that up this week.