diff options
author | Joseph Myers <joseph@codesourcery.com> | 2007-05-01 18:41:48 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2007-05-01 18:41:48 +0100 |
commit | b26941b46a82ddb2915de92469ce4d2126fb0ef9 (patch) | |
tree | 2bbb6a134219c043387671e593e46f7d7eb25c08 /gcc | |
parent | 0dd7ebb3fc0495d4d4bd6132b0d40f15dd9b36bc (diff) | |
download | gcc-b26941b46a82ddb2915de92469ce4d2126fb0ef9.zip gcc-b26941b46a82ddb2915de92469ce4d2126fb0ef9.tar.gz gcc-b26941b46a82ddb2915de92469ce4d2126fb0ef9.tar.bz2 |
darwin-ldouble.c (__gcc_qunord): Define if __NO_FPRS__, not just if _SOFT_DOUBLE.
* config/rs6000/darwin-ldouble.c (__gcc_qunord): Define if
__NO_FPRS__, not just if _SOFT_DOUBLE.
* config/rs6000/libgcc-ppc-glibc.ver (__gcc_qunord): Likewise.
* config/rs6000/rs6000.c (rs6000_init_libfuncs): Use __gcc_qunord
also for E500 double.
* config/rs6000/rs6000.md (buneq, bunge, bungt, bunle, bunlt,
suneq, sunge, sungt, sunle, sunlt): Disable for (TARGET_HARD_FLOAT
&& !TARGET_FPRS).
From-SVN: r124332
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/config/rs6000/darwin-ldouble.c | 25 | ||||
-rw-r--r-- | gcc/config/rs6000/libgcc-ppc-glibc.ver | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 4 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 20 |
5 files changed, 42 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 617a0da..f7a05f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2007-05-01 Joseph Myers <joseph@codesourcery.com> + + * config/rs6000/darwin-ldouble.c (__gcc_qunord): Define if + __NO_FPRS__, not just if _SOFT_DOUBLE. + * config/rs6000/libgcc-ppc-glibc.ver (__gcc_qunord): Likewise. + * config/rs6000/rs6000.c (rs6000_init_libfuncs): Use __gcc_qunord + also for E500 double. + * config/rs6000/rs6000.md (buneq, bunge, bungt, bunle, bunlt, + suneq, sunge, sungt, sunle, sunlt): Disable for (TARGET_HARD_FLOAT + && !TARGET_FPRS). + 2007-05-01 Richard Guenther <rguenther@suse.de> * tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt diff --git a/gcc/config/rs6000/darwin-ldouble.c b/gcc/config/rs6000/darwin-ldouble.c index 7405448..7aa15b6 100644 --- a/gcc/config/rs6000/darwin-ldouble.c +++ b/gcc/config/rs6000/darwin-ldouble.c @@ -225,7 +225,6 @@ int __gcc_qeq (double, double, double, double); int __gcc_qne (double, double, double, double); int __gcc_qge (double, double, double, double); int __gcc_qle (double, double, double, double); -int __gcc_qunord (double, double, double, double); long double __gcc_stoq (float); long double __gcc_dtoq (double); float __gcc_qtos (double, double); @@ -238,7 +237,6 @@ long double __gcc_utoq (unsigned int); extern int __eqdf2 (double, double); extern int __ledf2 (double, double); extern int __gedf2 (double, double); -extern int __unorddf2 (double, double); /* Negate 'long double' value and return the result. */ long double @@ -284,15 +282,6 @@ __gcc_qge (double a, double aa, double c, double cc) strong_alias (__gcc_qge, __gcc_qgt); -/* Compare two 'long double' values for unordered. */ -int -__gcc_qunord (double a, double aa, double c, double cc) -{ - if (__eqdf2 (a, c) == 0) - return __unorddf2 (aa, cc); - return __unorddf2 (a, c); -} - /* Convert single to long double. */ long double __gcc_stoq (float a) @@ -365,6 +354,20 @@ __gcc_utoq (unsigned int a) #ifdef __NO_FPRS__ +int __gcc_qunord (double, double, double, double); + +extern int __eqdf2 (double, double); +extern int __unorddf2 (double, double); + +/* Compare two 'long double' values for unordered. */ +int +__gcc_qunord (double a, double aa, double c, double cc) +{ + if (__eqdf2 (a, c) == 0) + return __unorddf2 (aa, cc); + return __unorddf2 (a, c); +} + #include "config/soft-fp/soft-fp.h" #include "config/soft-fp/double.h" #include "config/soft-fp/quad.h" diff --git a/gcc/config/rs6000/libgcc-ppc-glibc.ver b/gcc/config/rs6000/libgcc-ppc-glibc.ver index 8fafaa3..c74d732 100644 --- a/gcc/config/rs6000/libgcc-ppc-glibc.ver +++ b/gcc/config/rs6000/libgcc-ppc-glibc.ver @@ -39,7 +39,6 @@ GCC_4.2.0 { __gcc_qge __gcc_qlt __gcc_qle - __gcc_qunord __gcc_stoq __gcc_dtoq __gcc_qtos @@ -49,4 +48,8 @@ GCC_4.2.0 { __gcc_itoq __gcc_utoq %endif + +%ifdef __NO_FPRS__ + __gcc_qunord +%endif } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index acbc708..f89175a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9587,7 +9587,6 @@ rs6000_init_libfuncs (void) set_optab_libfunc (ge_optab, TFmode, "__gcc_qge"); set_optab_libfunc (lt_optab, TFmode, "__gcc_qlt"); set_optab_libfunc (le_optab, TFmode, "__gcc_qle"); - set_optab_libfunc (unord_optab, TFmode, "__gcc_qunord"); set_conv_libfunc (sext_optab, TFmode, SFmode, "__gcc_stoq"); set_conv_libfunc (sext_optab, TFmode, DFmode, "__gcc_dtoq"); @@ -9598,6 +9597,9 @@ rs6000_init_libfuncs (void) set_conv_libfunc (sfloat_optab, TFmode, SImode, "__gcc_itoq"); set_conv_libfunc (ufloat_optab, TFmode, SImode, "__gcc_utoq"); } + + if (!(TARGET_HARD_FLOAT && TARGET_FPRS)) + set_optab_libfunc (unord_optab, TFmode, "__gcc_qunord"); } else { diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 2359b9e..477f12e 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11530,27 +11530,27 @@ (define_expand "buneq" [(use (match_operand 0 "" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_cbranch (UNEQ, operands[0]); DONE; }") (define_expand "bunge" [(use (match_operand 0 "" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_cbranch (UNGE, operands[0]); DONE; }") (define_expand "bungt" [(use (match_operand 0 "" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_cbranch (UNGT, operands[0]); DONE; }") (define_expand "bunle" [(use (match_operand 0 "" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_cbranch (UNLE, operands[0]); DONE; }") (define_expand "bunlt" [(use (match_operand 0 "" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_cbranch (UNLT, operands[0]); DONE; }") (define_expand "bltgt" @@ -11664,27 +11664,27 @@ (define_expand "suneq" [(clobber (match_operand:SI 0 "gpc_reg_operand" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_sCOND (UNEQ, operands[0]); DONE; }") (define_expand "sunge" [(clobber (match_operand:SI 0 "gpc_reg_operand" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_sCOND (UNGE, operands[0]); DONE; }") (define_expand "sungt" [(clobber (match_operand:SI 0 "gpc_reg_operand" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_sCOND (UNGT, operands[0]); DONE; }") (define_expand "sunle" [(clobber (match_operand:SI 0 "gpc_reg_operand" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_sCOND (UNLE, operands[0]); DONE; }") (define_expand "sunlt" [(clobber (match_operand:SI 0 "gpc_reg_operand" ""))] - "" + "! (TARGET_HARD_FLOAT && !TARGET_FPRS)" "{ rs6000_emit_sCOND (UNLT, operands[0]); DONE; }") (define_expand "sltgt" |