* [PATCH, i386]: Use AVX FP instructions in libgcc soft-fp exception handler
@ 2011-08-23 9:44 Uros Bizjak
2011-08-24 12:06 ` Joseph S. Myers
0 siblings, 1 reply; 3+ messages in thread
From: Uros Bizjak @ 2011-08-23 9:44 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
Hello!
2011-08-23 Uros Bizjak <ubizjak@gmail.com>
* config/i386/64/sfp-machine.h (ASM_INVALID): New define.
(ASM_DIVZERO): Ditto.
(FP_HANLDE_EXCEPTIONS): Use ASM_INVALID and ASM_DIVZERO.
Tested on x86_64-pc-linux-gnu {,-m32}. Committed to mainline SVN, will
be backported to release branches.
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1012 bytes --]
Index: config/i386/64/sfp-machine.h
===================================================================
--- config/i386/64/sfp-machine.h (revision 177972)
+++ config/i386/64/sfp-machine.h (working copy)
@@ -73,17 +73,25 @@
unsigned short int __unused5;
};
+#ifdef __AVX__
+ #define ASM_INVALID "vdivss %0, %0, %0"
+ #define ASM_DIVZERO "vdivss %1, %0, %0"
+#else
+ #define ASM_INVALID "divss %0, %0"
+ #define ASM_DIVZERO "divss %1, %0"
+#endif
+
#define FP_HANDLE_EXCEPTIONS \
do { \
if (_fex & FP_EX_INVALID) \
{ \
float f = 0.0; \
- __asm__ __volatile__ ("divss %0, %0 " : : "x" (f)); \
+ __asm__ __volatile__ (ASM_INVALID : : "x" (f)); \
} \
if (_fex & FP_EX_DIVZERO) \
{ \
float f = 1.0, g = 0.0; \
- __asm__ __volatile__ ("divss %1, %0" : : "x" (f), "x" (g)); \
+ __asm__ __volatile__ (ASM_DIVZERO : : "x" (f), "x" (g)); \
} \
if (_fex & FP_EX_OVERFLOW) \
{ \
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, i386]: Use AVX FP instructions in libgcc soft-fp exception handler
2011-08-23 9:44 [PATCH, i386]: Use AVX FP instructions in libgcc soft-fp exception handler Uros Bizjak
@ 2011-08-24 12:06 ` Joseph S. Myers
2011-08-24 21:52 ` Uros Bizjak
0 siblings, 1 reply; 3+ messages in thread
From: Joseph S. Myers @ 2011-08-24 12:06 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches
On Tue, 23 Aug 2011, Uros Bizjak wrote:
> Hello!
>
> 2011-08-23 Uros Bizjak <ubizjak@gmail.com>
>
> * config/i386/64/sfp-machine.h (ASM_INVALID): New define.
> (ASM_DIVZERO): Ditto.
> (FP_HANLDE_EXCEPTIONS): Use ASM_INVALID and ASM_DIVZERO.
>
> Tested on x86_64-pc-linux-gnu {,-m32}. Committed to mainline SVN, will
> be backported to release branches.
The 4.5 and 4.4 commits (r178009 and r178010) appear to include spurious
changes to libgcc/config.host.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, i386]: Use AVX FP instructions in libgcc soft-fp exception handler
2011-08-24 12:06 ` Joseph S. Myers
@ 2011-08-24 21:52 ` Uros Bizjak
0 siblings, 0 replies; 3+ messages in thread
From: Uros Bizjak @ 2011-08-24 21:52 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: gcc-patches
On Wed, Aug 24, 2011 at 12:54 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Tue, 23 Aug 2011, Uros Bizjak wrote:
>> 2011-08-23 Uros Bizjak <ubizjak@gmail.com>
>>
>> * config/i386/64/sfp-machine.h (ASM_INVALID): New define.
>> (ASM_DIVZERO): Ditto.
>> (FP_HANLDE_EXCEPTIONS): Use ASM_INVALID and ASM_DIVZERO.
>>
>> Tested on x86_64-pc-linux-gnu {,-m32}. Committed to mainline SVN, will
>> be backported to release branches.
>
> The 4.5 and 4.4 commits (r178009 and r178010) appear to include spurious
> changes to libgcc/config.host.
Thanks for noticing! Unwanted changes have been removed from both branches.
Uros.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-24 18:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 9:44 [PATCH, i386]: Use AVX FP instructions in libgcc soft-fp exception handler Uros Bizjak
2011-08-24 12:06 ` Joseph S. Myers
2011-08-24 21:52 ` Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).