aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-10-12 09:17:02 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-10-12 09:17:02 -0400
commit842dcd1a7d44d70224cae4df49cb3997bbc5a774 (patch)
treed7e2ee5990af24d7dfc680998b8b2853f6abcbc0
parent01fdf4142dc4a2d03dc12ba68037d88f486c7e87 (diff)
downloadgcc-842dcd1a7d44d70224cae4df49cb3997bbc5a774.zip
gcc-842dcd1a7d44d70224cae4df49cb3997bbc5a774.tar.gz
gcc-842dcd1a7d44d70224cae4df49cb3997bbc5a774.tar.bz2
(??hf2_libfunc): Define like ??sf2_libfunc.
(emit_float_lib_cmp): Call HFmode library functions. (init_optabs): Set names for HFmode comparison functions. From-SVN: r8259
-rw-r--r--gcc/optabs.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 09f7773..fefb2a5 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -117,6 +117,13 @@ rtx bcmp_libfunc;
rtx memset_libfunc;
rtx bzero_libfunc;
+rtx eqhf2_libfunc;
+rtx nehf2_libfunc;
+rtx gthf2_libfunc;
+rtx gehf2_libfunc;
+rtx lthf2_libfunc;
+rtx lehf2_libfunc;
+
rtx eqsf2_libfunc;
rtx nesf2_libfunc;
rtx gtsf2_libfunc;
@@ -2762,7 +2769,34 @@ emit_float_lib_cmp (x, y, comparison)
enum machine_mode mode = GET_MODE (x);
rtx libfunc = 0;
- if (mode == SFmode)
+ if (mode == HFmode)
+ switch (comparison)
+ {
+ case EQ:
+ libfunc = eqhf2_libfunc;
+ break;
+
+ case NE:
+ libfunc = nehf2_libfunc;
+ break;
+
+ case GT:
+ libfunc = gthf2_libfunc;
+ break;
+
+ case GE:
+ libfunc = gehf2_libfunc;
+ break;
+
+ case LT:
+ libfunc = lthf2_libfunc;
+ break;
+
+ case LE:
+ libfunc = lehf2_libfunc;
+ break;
+ }
+ else if (mode == SFmode)
switch (comparison)
{
case EQ:
@@ -3965,6 +3999,13 @@ init_optabs ()
memset_libfunc = gen_rtx (SYMBOL_REF, Pmode, "memset");
bzero_libfunc = gen_rtx (SYMBOL_REF, Pmode, "bzero");
+ eqhf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__eqhf2");
+ nehf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__nehf2");
+ gthf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__gthf2");
+ gehf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__gehf2");
+ lthf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__lthf2");
+ lehf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__lehf2");
+
eqsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__eqsf2");
nesf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__nesf2");
gtsf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__gtsf2");