diff mbox

[libgcc] : Use __builtin_expect when checking for soft-fp exceptions

Message ID CAFULd4Yx_+==EPzamRhk1E3=NcNvjWFw18wKABFSrjzsfpWXBw@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak June 17, 2012, 1:54 p.m. UTC
Hello!

2012-06-17  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Use
	__builtin_expect when checking for exceptions.
	* config/ia64/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Ditto.

Tested on x86_64-pc-linux-gnu {,-m32} and ia64-unknown-linux-gnu,
committed to mainline SVN.

Uros.
diff mbox

Patch

Index: config/ia64/sfp-machine.h
===================================================================
--- config/ia64/sfp-machine.h	(revision 188696)
+++ config/ia64/sfp-machine.h	(working copy)
@@ -60,7 +60,7 @@ 
 
 #define FP_HANDLE_EXCEPTIONS			\
   do {						\
-    if (_fex)					\
+    if (__builtin_expect (_fex, 0))		\
       __sfp_handle_exceptions (_fex);		\
   } while (0);
 
Index: config/i386/sfp-machine.h
===================================================================
--- config/i386/sfp-machine.h	(revision 188696)
+++ config/i386/sfp-machine.h	(working copy)
@@ -51,7 +51,7 @@ 
 
 #define FP_HANDLE_EXCEPTIONS			\
   do {						\
-    if (_fex)					\
+    if (__builtin_expect (_fex, 0))		\
       __sfp_handle_exceptions (_fex);		\
   } while (0);