http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58269
tocarip.intel at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tocarip.intel at gmail dot com --- Comment #6 from tocarip.intel at gmail dot com --- - || (TARGET_SSE && SSE_REGNO_P (regno) && !fixed_regs[regno])); + || (TARGET_SSE && SSE_REGNO_P (regno) + && (regno < FIRST_SSE_REG + SSE_REGPARM_MAX) + && !fixed_regs[regno])); Those changes are not needed. If TARGET_64BIT is fasle all sse registers except xmm0-xmm7 should be fixed. Correct fix is index 0f4edb3..44b4b16 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4231,10 +4231,10 @@ ix86_conditional_register_usage (void) /* If AVX512F is disabled, squash the registers. */ if (! TARGET_AVX512F) { - for (i = FIRST_EXT_REX_SSE_REG; i < LAST_EXT_REX_SSE_REG; i++) + for (i = FIRST_EXT_REX_SSE_REG; i <= LAST_EXT_REX_SSE_REG; i++) fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; - for (i = FIRST_MASK_REG; i < LAST_MASK_REG; i++) + for (i = FIRST_MASK_REG; i <= LAST_MASK_REG; i++) fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; } } - if (TARGET_MACHO) - { - if (SSE_REGNO_P (regno) && TARGET_SSE) - return true; - } - else - { - if (TARGET_SSE && SSE_REGNO_P (regno) - && (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)) - return true; - } + if (TARGET_SSE && SSE_REGNO_P (regno) + && (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)) + return true; Looks like this will break ABI. Before we returned true for e. g. xmm10. I couldn't find Darwin ABI to check which behaivor is correct. If we want to keep current behaivor something like index 0f4edb3..a603167 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5708,7 +5708,8 @@ ix86_function_arg_regno_p (int regno) if (TARGET_MACHO) { - if (SSE_REGNO_P (regno) && TARGET_SSE) + if (SSE_REGNO_P (regno) && TARGET_SSE + && ! EXT_REX_SSE_REGNO_P (regno)) return true; } else Should work.