On Sun, 19 Apr 2020, Uros Bizjak wrote: > This patch implements the idea from glibc, where generic division > operations instead of assembly are used where appropriate. > > --commit-- > i386: Use generic division to generate INVALID and DIVZERO exceptions > > Introduce math_force_eval to evaluate generic division to generate > INVALID and DIVZERO exceptions. > > libgcc/ChangeLog: > > 2020-04-19 Uroš Bizjak <ubiz...@gmail.com> > > * config/i386/sfp-exceptions.c (math_force_eval): New define. > (__sfp_handle_exceptions): Use math_force_eval to evaluete > generic division to generate INVALID and DIVZERO exceptions. > > libatomic/ChangeLog: > > 2020-04-19 Uroš Bizjak <ubiz...@gmail.com> > > * config/x86/fenv.c (math_force_eval): New define. > (__atomic_feraiseexcept): Use math_force_eval to evaluete > generic division to generate INVALID and DIVZERO exceptions. > > libgfortran/ChangeLog: > > 2020-04-19 Uroš Bizjak <ubiz...@gmail.com> > > * config/fpu-387.h (_math_force_eval): New define. > (local_feraiseexcept): Use math_force_eval to evaluete > generic division to generate INVALID and DIVZERO exceptions. > --/commit-- > > The patch was bootstrapped and regression tested on x86_64-linux-gnu > {,-m32}. Also, as part of glibc's patch evaluation, I have extensively > tested it to check that it really generates only correct exceptions > for both, x87 and SSE math. > > Additionally, the patch improves code for DIVZERO exception, as we can > now use FDIVRP mnemonic. This mnemonic has its own share of confusion > (see e.g. SYSV386_COMPAT macro definition) and its use in asm should > be avoided. > --/commit message-- > > The patch looks safe to me, but I'd like to ask RMs for approval.
If it doesn't fix a regression can it wait for stage1 please? Thanks, Richard.