This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libgcc]: Put soft-FP exception handler out-of-line for x86


On Thu, Jun 7, 2012 at 9:58 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

> Attached patch rewrites x86 soft-FP as an out-of-line function that
> gets conditionally called when exception occurs. This rewrite removes
> 17 instances of the same code from libgcc. In addition, the patch
> unifies a lot of code between 32bit and 64bit x86 target, and also
> introduces SSE instructions for 32bit targets. There is no other
> functional changes, although the change to real SSE FP ops is
> tempting. ;)
>
> 2012-06-07 ?Uros Bizjak ?<ubizjak@gmail.com>
>
> ? ? ? ?* 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.
>
> Patch was tested on x86_64-pc-linux-gnu {,-m32}.

I have committed attached, slightly changed patch (asm patterns in
__sfp_handle_exceptions) to the mainline SVN.

Uros.

Attachment: l.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]