aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/i386/sfp-exceptions.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-06-01i386: Add __attribute__ ((gcc_struct)) to struct fenv [PR95418]Uros Bizjak1-1/+1
Windows ABI (MinGW) is different than Linux ABI when bitfileds are involved. The following patch adds __attribute__ ((gcc_struct)) to struct fenv in order to match the layout of x87 state image in memory. 2020-06-01 Uroš Bizjak <ubizjak@gmail.com> libatomic/ChangeLog: * config/x86/fenv.c (struct fenv): Add __attribute__ ((gcc_struct)). libgcc/ChangeLog: * config/i386/sfp-exceptions.c (struct fenv): Add __attribute__ ((gcc_struct)). libgfortran/ChangeLog: PR libfortran/95418 * config/fpu-387.h (struct fenv): Add __attribute__ ((gcc_struct)).
2020-05-06i386: Use generic division to generate INEXACT exceptionUros Bizjak1-13/+9
Introduce math_force_eval_div to use generic division to generate INEXACT as well as INVALID and DIVZERO exceptions. libgcc/ChangeLog: * config/i386/sfp-exceptions.c (__math_force_eval): Remove. (__math_force_eval_div): New define. (__sfp_handle_exceptions): Use __math_force_eval_div to use generic division to generate INVALID, DIVZERO and INEXACT exceptions. libatomic/ChangeLog: * config/x86/fenv.c (__math_force_eval): Remove. (__math_force_eval_div): New define. (__atomic_deraiseexcept): Use __math_force_eval_div to use generic division to generate INVALID, DIVZERO and INEXACT exceptions. libgfortran/ChangeLog: * config/fpu-387.h (__math_force_eval): Remove. (__math_force_eval_div): New define. (local_feraiseexcept): Use __math_force_eval_div to use generic division to generate INVALID, DIVZERO and INEXACT exceptions. (struct fenv): Define named struct instead of typedef.
2020-05-01i386: Use generic division to generate INVALID and DIVZERO exceptionsUros Bizjak1-12/+8
Introduce math_force_eval to evaluate generic division to generate INVALID and DIVZERO exceptions. libgcc/ChangeLog: * 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: * 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: * 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.
2020-04-19i386: Remove unneeded assignments when triggering SSE exceptionsUros Bizjak1-6/+0
According to "Intel 64 and IA32 Arch SDM, Vol. 3: "Because SIMD floating-point exceptions are precise and occur immediately, the situation does not arise where an x87 FPU instruction, a WAIT/FWAIT instruction, or another SSE/SSE2/SSE3 instruction will catch a pending unmasked SIMD floating-point exception." Remove unneeded assignments to volatile memory. libgcc/ChangeLog: * config/i386/sfp-exceptions.c (__sfp_handle_exceptions) [__SSE_MATH__]: Remove unneeded assignments to volatile memory. libatomic/ChangeLog: * config/x86/fenv.c (__atomic_feraiseexcept) [__SSE_MATH__]: Remove unneeded assignments to volatile memory. libgfortran/ChangeLog: * config/fpu-387.h (local_feraiseexcept) [__SSE_MATH__]: Remove unneeded assignments to volatile memory.
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-01-31sfp-exceptions.c (__sfp_handle_exceptions): Remove stray semicolon.Uros Bizjak1-1/+1
* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Remove stray semicolon. From-SVN: r268405
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-01-02Update copyright years in libgcc/Richard Sandiford1-1/+1
From-SVN: r206295
2013-12-09sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions when ↵Uros Bizjak1-3/+3
__TARGET_SSE__ is defined. libgcc/ChangeLog: 2013-12-09 Uros Bizjak <ubizjak@gmail.com> * config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions when __TARGET_SSE__ is defined. libatomic/ChangeLog: 2013-12-09 Uros Bizjak <ubizjak@gmail.com> * config/x86/fenv.c (__atomic_feraiseexcept): Emit SSE instructions when __TARGET_SSE__ is defined. From-SVN: r205811
2013-11-07sfp-exceptions.c (__sfp_handle_exceptions): Rewrite FP_EX_INEXACT handling.Uros Bizjak1-7/+11
* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Rewrite FP_EX_INEXACT handling. From-SVN: r204546
2013-11-07sfp-exceptions.c (__sfp_handle_exceptions): Handle FP_EX_DENORM.Uros Bizjak1-2/+14
* config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Handle FP_EX_DENORM. Store result to volatile location after SSE division to close interrupt window. Remove unneeded fwait after x87 division since interrupt window will be closed by emitted fstp. From-SVN: r204540
2013-02-04Update copyright in libgcc.Richard Sandiford1-1/+1
From-SVN: r195731
2012-11-02re PR target/55175 (i386/sfp-exceptions.c:52:7: error: impossible constraint ↵Uros Bizjak1-0/+2
in 'asm') PR target/55175 * config/i386/sfp-exceptions.c: Guard with _SOFT_FLOAT. * config/i386/sfp-machine.h: Guard exception handling code with _SOFT_FLOAT. * config/i386/32/sfp-machine.h: Guard rounding handling code with _SOFT_FLOAT. * config/i386/64/sfp-machine.h: Ditto. From-SVN: r193095
2012-10-11sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions for 64bit ↵Uros Bizjak1-2/+2
targets only. * config/i386/sfp-exceptions.c (__sfp_handle_exceptions): Emit SSE instructions for 64bit targets only. From-SVN: r192355
2012-06-09sfp-machine.h (__gcc_CMPtype, [...]): Move ...Uros Bizjak1-0/+90
* config/i386/32/sfp-machine.h (__gcc_CMPtype, CMPtype, _FP_KEEPNANFRACP, _FP_CHOOSENAN, FP_EX_INVALID, FP_EX_DENORM, FP_EX_DIVZERO, FP_EX_OVERFLOW, FP_EX_UNDERFLOW, FP_EX_INEXACT, FP_HANDLE_EXCEPTIONS, FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF, FP_RND_MINF, _FP_DEXL_EX, FP_INIT_ROUNDMODE, FP_ROUNDMODE, __LITTLE_ENDIAN, __BIG_ENDIAN, strong_alias): Move ... * config/i386/64/sfp-machine: ... (delete here) ... * config/i386/sfp-machine.h: ... to here. (FP_EX_MASK): New. (__sfp_handle_exceptions): New function declaration. (FP_HANDLE_EXCEPTIONS): Use __sfp_handle_exceptions. * config/i386/sfp-exceptions.c: New. * config/i386/t-softfp: New. * config.host (i[34567]86-*-* and x86_64-*-* soft-fp targets): Add i386/t-softfp to tmake_file. From-SVN: r188361