From 842dcd1a7d44d70224cae4df49cb3997bbc5a774 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 12 Oct 1994 09:17:02 -0400 Subject: [PATCH] (??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 --- gcc/optabs.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) 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"); -- 2.30.2