summaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-10-12 13:17:02 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-10-12 13:17:02 +0000
commit9557005f695f0353a2e27d461f368320e65c3482 (patch)
treed7e2ee5990af24d7dfc680998b8b2853f6abcbc0 /gcc/optabs.c
parent1c4fbc137b53bf6360478b010a197c0b1e2b40d0 (diff)
downloadgcc-9557005f695f0353a2e27d461f368320e65c3482.tar.gz
(??hf2_libfunc): Define like ??sf2_libfunc.
(emit_float_lib_cmp): Call HFmode library functions. (init_optabs): Set names for HFmode comparison functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8259 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 09f7773171b..fefb2a5da68 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");