Commit bb5c97d4 by Uros Bizjak Committed by Uros Bizjak

sfp-machine.h (_FP_NANSIGN_S, [...]): Move ...

	* config/i386/32/sfp-machine.h (_FP_NANSIGN_S, _FP_NANSIGN_D,
	_FP_NANSIGN_E, _FP_NANSIGN_Q): Move ...
	* config/i386/64/sfp-machine: ... (delete here) ...
	* config/i386/sfp-machine.h: ... to here.
	(FP_EX_MASK): Remove.
	(FP_RND_MASK): New.
	(FP_INIT_ROUNDMODE): Declare asm as volatile.

From-SVN: r188518
parent cf35667e
2012-06-13 Uros Bizjak <ubizjak@gmail.com>
* config/i386/32/sfp-machine.h (_FP_NANSIGN_S, _FP_NANSIGN_D,
_FP_NANSIGN_E, _FP_NANSIGN_Q): Move ...
* config/i386/64/sfp-machine: ... (delete here) ...
* config/i386/sfp-machine.h: ... to here.
(FP_EX_MASK): Remove.
(FP_RND_MASK): New.
(FP_INIT_ROUNDMODE): Declare asm as volatile.
2012-06-11 Sriraman Tallam <tmsriram@google.com> 2012-06-11 Sriraman Tallam <tmsriram@google.com>
* config/i386/libgcc-bsd.ver: Version symbol __cpu_indicator_init. * config/i386/libgcc-bsd.ver: Version symbol __cpu_indicator_init.
......
...@@ -76,7 +76,3 @@ ...@@ -76,7 +76,3 @@
16byte since soft-fp emulation is done in 16byte. */ 16byte since soft-fp emulation is done in 16byte. */
#define _FP_NANFRAC_E _FP_QNANBIT_E, 0, 0, 0 #define _FP_NANFRAC_E _FP_QNANBIT_E, 0, 0, 0
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0, 0, 0 #define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0, 0, 0
#define _FP_NANSIGN_S 1
#define _FP_NANSIGN_D 1
#define _FP_NANSIGN_E 1
#define _FP_NANSIGN_Q 1
...@@ -17,7 +17,3 @@ typedef unsigned int UTItype __attribute__ ((mode (TI))); ...@@ -17,7 +17,3 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
#define _FP_NANFRAC_D _FP_QNANBIT_D #define _FP_NANFRAC_D _FP_QNANBIT_D
#define _FP_NANFRAC_E _FP_QNANBIT_E, 0 #define _FP_NANFRAC_E _FP_QNANBIT_E, 0
#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0 #define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
#define _FP_NANSIGN_S 1
#define _FP_NANSIGN_D 1
#define _FP_NANSIGN_E 1
#define _FP_NANSIGN_Q 1
...@@ -16,6 +16,11 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); ...@@ -16,6 +16,11 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
#define _FP_KEEPNANFRACP 1 #define _FP_KEEPNANFRACP 1
#define _FP_NANSIGN_S 1
#define _FP_NANSIGN_D 1
#define _FP_NANSIGN_E 1
#define _FP_NANSIGN_Q 1
/* Here is something Intel misdesigned: the specs don't define /* Here is something Intel misdesigned: the specs don't define
the case where we have two NaNs with same mantissas, but the case where we have two NaNs with same mantissas, but
different sign. Different operations pick up different NaNs. */ different sign. Different operations pick up different NaNs. */
...@@ -42,13 +47,11 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); ...@@ -42,13 +47,11 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
#define FP_EX_UNDERFLOW 0x10 #define FP_EX_UNDERFLOW 0x10
#define FP_EX_INEXACT 0x20 #define FP_EX_INEXACT 0x20
#define FP_EX_MASK 0x3f
void __sfp_handle_exceptions (int); void __sfp_handle_exceptions (int);
#define FP_HANDLE_EXCEPTIONS \ #define FP_HANDLE_EXCEPTIONS \
do { \ do { \
if (_fex & FP_EX_MASK) \ if (_fex) \
__sfp_handle_exceptions (_fex); \ __sfp_handle_exceptions (_fex); \
} while (0); } while (0);
...@@ -57,15 +60,17 @@ void __sfp_handle_exceptions (int); ...@@ -57,15 +60,17 @@ void __sfp_handle_exceptions (int);
#define FP_RND_PINF 0x800 #define FP_RND_PINF 0x800
#define FP_RND_MINF 0x400 #define FP_RND_MINF 0x400
#define FP_RND_MASK 0xc00
#define _FP_DECL_EX \ #define _FP_DECL_EX \
unsigned short _fcw __attribute__ ((unused)) = FP_RND_NEAREST unsigned short _fcw __attribute__ ((unused)) = FP_RND_NEAREST
#define FP_INIT_ROUNDMODE \ #define FP_INIT_ROUNDMODE \
do { \ do { \
__asm__ ("fnstcw %0" : "=m" (_fcw)); \ __asm__ __volatile__ ("fnstcw\t%0" : "=m" (_fcw)); \
} while (0) } while (0)
#define FP_ROUNDMODE (_fcw & 0xc00) #define FP_ROUNDMODE (_fcw & FP_RND_MASK)
#define __LITTLE_ENDIAN 1234 #define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321 #define __BIG_ENDIAN 4321
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment