i386: Do not use %ecx DRAP for functions that use __builtin_eh_return [PR104362]
%ecx can't be used for both DRAP register and eh_return. Adjust find_drap_reg
to choose %edi for functions that uses __builtin_eh_return to avoid the assert
in ix86_expand_epilogue that enforces this rule.
2022-02-03 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
PR target/104362
* config/i386/i386.cc (find_drap_reg): For 32bit targets
return DI_REG if function uses __builtin_eh_return.
gcc/testsuite/ChangeLog:
PR target/104362
* gcc.target/i386/pr104362.c: New test.