--- /dev/null
+/* Definitions of long double support for GNU compiler.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Tell real.c that we are not using INTEL_EXTENDED_IEEE_FORMAT */
+
+#undef INTEL_EXTENDED_IEEE_FORMAT
+#define INTEL_EXTENDED_IEEE_FORMAT 0
+
+/* Define library calls for quad FP operations. These are all part of the
+ IA32 and IA64 ABIs. */
+
+#define ADDTF3_LIBCALL "_U_Qfadd"
+#define SUBTF3_LIBCALL "_U_Qfsub"
+#define MULTF3_LIBCALL "_U_Qfmpy"
+#define DIVTF3_LIBCALL "_U_Qfdiv"
+#define NEGTF2_LIBCALL "_U_Qfneg"
+#define ABSTF2_LIBCALL "_U_Qfabs"
+#define SMINTF3_LIBCALL "_U_Qfmin"
+#define SMAXTF3_LIBCALL "_U_Qfmax"
+#define EXTENDSFTF2_LIBCALL "_U_Qfcnvff_sgl_to_quad"
+#define EXTENDDFTF2_LIBCALL "_U_Qfcnvff_dbl_to_quad"
+#define TRUNCTFSF2_LIBCALL "_U_Qfcnvff_quad_to_sgl"
+#define TRUNCTFDF2_LIBCALL "_U_Qfcnvff_quad_to_dbl"
+#define FLOATSITF2_LIBCALL "_U_Qfcnvxf_sgl_to_quad"
+#define FLOATDITF2_LIBCALL "_U_Qfcnvxf_dbl_to_quad"
+#define FIX_TRUNCTFSI2_LIBCALL "_U_Qfcnvfxt_quad_to_sgl"
+#define FIX_TRUNCTFDI2_LIBCALL "_U_Qfcnvfxt_quad_to_dbl"
+#define EQTF2_LIBCALL "_U_Qfeq"
+#define NETF2_LIBCALL "_U_Qfne"
+#define GTTF2_LIBCALL "_U_Qfgt"
+#define GETF2_LIBCALL "_U_Qfge"
+#define LTTF2_LIBCALL "_U_Qflt"
+#define LETF2_LIBCALL "_U_Qfle"
+
+
+#undef INIT_TARGET_OPTABS
+#define INIT_TARGET_OPTABS \
+ do { \
+ add_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL); \
+ sub_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL); \
+ smul_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL); \
+ flodiv_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL); \
+ smin_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SMINTF3_LIBCALL); \
+ smax_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, SMAXTF3_LIBCALL); \
+ abs_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, ABSTF2_LIBCALL); \
+ neg_optab->handlers[(int) TFmode].libfunc \
+ = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL); \
+ extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
+ extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
+ trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL); \
+ trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL); \
+ floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL); \
+ floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL); \
+ fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);\
+ fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);\
+ fixunstfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL); \
+ fixunstfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL); \
+ eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL); \
+ netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL); \
+ gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL); \
+ getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL); \
+ lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL); \
+ letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL); \
+ \
+ sdiv_optab->handlers[(int) SImode].libfunc = 0; \
+ udiv_optab->handlers[(int) SImode].libfunc = 0; \
+ smod_optab->handlers[(int) SImode].libfunc = 0; \
+ umod_optab->handlers[(int) SImode].libfunc = 0; \
+ \
+ INIT_SUBTARGET_OPTABS; \
+ } while (0)
+
+/* This is meant to be redefined in the host dependent files */
+#define INIT_SUBTARGET_OPTABS
+
+/* Nonzero if a floating point comparison library call for
+ mode MODE that will return a boolean value. Zero if one
+ of the libgcc2 functions is used. */
+#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
(define_expand "movtf"
[(set (match_operand:TF 0 "general_operand" "")
(match_operand:TF 1 "general_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"
{
/* We must support TFmode loads into general registers for stdarg/vararg
(define_insn "*movtf_internal"
[(set (match_operand:TF 0 "destination_tfmode_operand" "=f,f, m")
(match_operand:TF 1 "general_tfmode_operand" "fG,m,fG"))]
- "ia64_move_ok (operands[0], operands[1])"
+ "INTEL_EXTENDED_IEEE_FORMAT && ia64_move_ok (operands[0], operands[1])"
"@
mov %0 = %F1
ldfe %0 = %1%P1
(define_insn "extendsftf2"
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(float_extend:TF (match_operand:SF 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnorm %0 = %1"
[(set_attr "itanium_class" "fmac")])
(define_insn "extenddftf2"
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(float_extend:TF (match_operand:DF 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnorm %0 = %1"
[(set_attr "itanium_class" "fmac")])
(define_insn "trunctfsf2"
[(set (match_operand:SF 0 "fr_register_operand" "=f")
(float_truncate:SF (match_operand:TF 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnorm.s %0 = %1"
[(set_attr "itanium_class" "fmac")])
(define_insn "trunctfdf2"
[(set (match_operand:DF 0 "fr_register_operand" "=f")
(float_truncate:DF (match_operand:TF 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnorm.d %0 = %1"
[(set_attr "itanium_class" "fmac")])
(define_insn "floatditf2"
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(float:TF (match_operand:DI 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fcvt.xf %0 = %1"
[(set_attr "itanium_class" "fcvtfx")])
+;; ??? Suboptimal. This should be split somehow.
+(define_insn "floatdidf2"
+ [(set (match_operand:DF 0 "register_operand" "=f")
+ (float:DF (match_operand:DI 1 "register_operand" "f")))]
+ "!INTEL_EXTENDED_IEEE_FORMAT"
+ "fcvt.xf %0 = %1\;;;\;fnorm.d %0 = %0"
+ [(set_attr "itanium_class" "fcvtfx")])
+
+;; ??? Suboptimal. This should be split somehow.
+(define_insn "floatdisf2"
+ [(set (match_operand:SF 0 "register_operand" "=f")
+ (float:SF (match_operand:DI 1 "register_operand" "f")))]
+ "!INTEL_EXTENDED_IEEE_FORMAT"
+ "fcvt.xf %0 = %1\;;;\;fnorm.s %0 = %0"
+ [(set_attr "itanium_class" "fcvtfx")])
+
(define_insn "fix_truncsfdi2"
[(set (match_operand:DI 0 "fr_register_operand" "=f")
(fix:DI (match_operand:SF 1 "fr_register_operand" "f")))]
(define_insn "fix_trunctfdi2"
[(set (match_operand:DI 0 "fr_register_operand" "=f")
(fix:DI (match_operand:TF 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fcvt.fx.trunc %0 = %1"
[(set_attr "itanium_class" "fcvtfx")])
[(set (match_operand:DI 0 "fr_register_operand" "=f")
(fix:DI (match_operand:TF 1 "fr_register_operand" "f")))
(use (match_operand:SI 2 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fcvt.fx.trunc.s%2 %0 = %1"
[(set_attr "itanium_class" "fcvtfx")])
(define_insn "floatunsditf2"
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(unsigned_float:TF (match_operand:DI 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fcvt.xuf %0 = %1"
[(set_attr "itanium_class" "fcvtfx")])
(define_insn "fixuns_trunctfdi2"
[(set (match_operand:DI 0 "fr_register_operand" "=f")
(unsigned_fix:DI (match_operand:TF 1 "fr_register_operand" "f")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fcvt.fxu.trunc %0 = %1"
[(set_attr "itanium_class" "fcvtfx")])
[(set (match_operand:DI 0 "fr_register_operand" "=f")
(unsigned_fix:DI (match_operand:TF 1 "fr_register_operand" "f")))
(use (match_operand:SI 2 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fcvt.fxu.trunc.s%2 %0 = %1"
[(set_attr "itanium_class" "fcvtfx")])
\f
[(set (match_operand:SI 0 "register_operand" "")
(div:SI (match_operand:SI 1 "general_operand" "")
(match_operand:SI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op1_tf, op2_tf, op0_tf, op0_di, twon34;
[(set (match_operand:SI 0 "register_operand" "")
(mod:SI (match_operand:SI 1 "general_operand" "")
(match_operand:SI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op2_neg, op1_di, div;
[(set (match_operand:SI 0 "register_operand" "")
(udiv:SI (match_operand:SI 1 "general_operand" "")
(match_operand:SI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op1_tf, op2_tf, op0_tf, op0_di, twon34;
[(set (match_operand:SI 0 "register_operand" "")
(umod:SI (match_operand:SI 1 "general_operand" "")
(match_operand:SI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op2_neg, op1_di, div;
(clobber (match_scratch:TF 5 "=&f"))
(clobber (match_scratch:BI 6 "=c"))
(use (match_operand:TF 3 "fr_register_operand" "f"))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2)))
[(set (match_operand:DI 0 "register_operand" "")
(div:DI (match_operand:DI 1 "general_operand" "")
(match_operand:DI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op1_tf, op2_tf, op0_tf;
[(set (match_operand:DI 0 "register_operand" "")
(mod:SI (match_operand:DI 1 "general_operand" "")
(match_operand:DI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op2_neg, div;
[(set (match_operand:DI 0 "register_operand" "")
(udiv:DI (match_operand:DI 1 "general_operand" "")
(match_operand:DI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op1_tf, op2_tf, op0_tf;
[(set (match_operand:DI 0 "register_operand" "")
(umod:DI (match_operand:DI 1 "general_operand" "")
(match_operand:DI 2 "general_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx op2_neg, div;
(clobber (match_scratch:TF 4 "=&f"))
(clobber (match_scratch:TF 5 "=&f"))
(clobber (match_scratch:BI 6 "=c"))]
- "TARGET_INLINE_DIV_LAT"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2)))
(clobber (match_scratch:TF 3 "=&f"))
(clobber (match_scratch:TF 4 "=f"))
(clobber (match_scratch:BI 5 "=c"))]
- "TARGET_INLINE_DIV_THR"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2)))
[(set (match_operand:SF 0 "fr_register_operand" "")
(div:SF (match_operand:SF 1 "fr_register_operand" "")
(match_operand:SF 2 "fr_register_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx insn;
(clobber (match_scratch:TF 3 "=&f"))
(clobber (match_scratch:TF 4 "=f"))
(clobber (match_scratch:BI 5 "=c"))]
- "TARGET_INLINE_DIV_LAT"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8)))
(clobber (match_scratch:TF 3 "=&f"))
(clobber (match_scratch:TF 4 "=f"))
(clobber (match_scratch:BI 5 "=c"))]
- "TARGET_INLINE_DIV_THR"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8)))
[(set (match_operand:DF 0 "fr_register_operand" "")
(div:DF (match_operand:DF 1 "fr_register_operand" "")
(match_operand:DF 2 "fr_register_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx insn;
(clobber (match_scratch:TF 4 "=&f"))
(clobber (match_scratch:TF 5 "=&f"))
(clobber (match_scratch:BI 6 "=c"))]
- "TARGET_INLINE_DIV_LAT"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 7) (div:TF (const_int 1) (match_dup 9)))
(clobber (match_scratch:TF 3 "=&f"))
(clobber (match_scratch:DF 4 "=f"))
(clobber (match_scratch:BI 5 "=c"))]
- "TARGET_INLINE_DIV_THR"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 6) (div:TF (const_int 1) (match_dup 8)))
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(plus:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fadd %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(float_truncate:SF
(plus:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fadd.s %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(float_truncate:DF
(plus:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fadd.d %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(minus:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fsub %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(float_truncate:SF
(minus:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fsub.s %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(float_truncate:DF
(minus:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fsub.d %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmpy %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(float_truncate:SF
(mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmpy.s %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(float_truncate:DF
(mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmpy.d %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))
(use (match_operand:SI 3 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmpy.s%3 %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))
(use (match_operand:SI 3 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmpy.s.s%3 %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))
(use (match_operand:SI 3 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmpy.d.s%3 %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(define_insn "abstf2"
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(abs:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fabs %0 = %F1"
[(set_attr "itanium_class" "fmisc")])
(define_insn "negtf2"
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(neg:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fneg %0 = %F1"
[(set_attr "itanium_class" "fmisc")])
(define_insn "*nabstf2"
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(neg:TF (abs:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnegabs %0 = %F1"
[(set_attr "itanium_class" "fmisc")])
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(smin:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmin %0 = %F1, %F2"
[(set_attr "itanium_class" "fmisc")])
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(smax:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fmax %0 = %F1, %F2"
[(set_attr "itanium_class" "fmisc")])
(plus:TF (mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fma %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(plus:TF (mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fma.s %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(plus:TF (mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fma.d %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG")))
(use (match_operand:SI 4 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fma.s%4 %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))
(use (match_operand:SI 4 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fma.d.s%4 %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(minus:TF (mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fms %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(minus:TF (mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fms.s %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(minus:TF (mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fms.d %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
[(set (match_operand:TF 0 "fr_register_operand" "=f")
(neg:TF (mult:TF (match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnmpy %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(neg:TF (mult:TF
(match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnmpy.s %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(neg:TF (mult:TF
(match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnmpy.d %0 = %F1, %F2"
[(set_attr "itanium_class" "fmac")])
(match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnma %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnma.s %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(match_operand:TF 1 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnma.d %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG")))
(use (match_operand:SI 4 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnma.s%4 %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")))
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG"))))
(use (match_operand:SI 4 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fnma.d.s%4 %0 = %F1, %F2, %F3"
[(set_attr "itanium_class" "fmac")])
[(set (match_operand:TF 0 "fr_register_operand" "")
(div:TF (match_operand:TF 1 "fr_register_operand" "")
(match_operand:TF 2 "fr_register_operand" "")))]
- "TARGET_INLINE_DIV"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV"
"
{
rtx insn;
(clobber (match_scratch:TF 5 "=&f"))
(clobber (match_scratch:TF 6 "=&f"))
(clobber (match_scratch:BI 7 "=c"))]
- "TARGET_INLINE_DIV_LAT"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_LAT"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2)))
(clobber (match_scratch:TF 3 "=&f"))
(clobber (match_scratch:TF 4 "=&f"))
(clobber (match_scratch:BI 5 "=c"))]
- "TARGET_INLINE_DIV_THR"
+ "INTEL_EXTENDED_IEEE_FORMAT && TARGET_INLINE_DIV_THR"
"#"
"&& reload_completed"
[(parallel [(set (match_dup 0) (div:TF (const_int 1) (match_dup 2)))
(unspec:BI [(match_operand:TF 2 "fr_register_operand" "f")
(match_dup 3)] 5))
(use (match_operand:SI 4 "const_int_operand" ""))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"frcpa.s%4 %0, %1 = %2, %3"
[(set_attr "itanium_class" "fmisc")
(set_attr "predicable" "no")])
[(set (cc0)
(compare (match_operand:TF 0 "tfreg_or_fp01_operand" "")
(match_operand:TF 1 "tfreg_or_fp01_operand" "")))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"
{
ia64_compare_op0 = operands[0];
(match_operator:BI 1 "comparison_operator"
[(match_operand:TF 2 "tfreg_or_fp01_operand" "fG")
(match_operand:TF 3 "tfreg_or_fp01_operand" "fG")]))]
- ""
+ "INTEL_EXTENDED_IEEE_FORMAT"
"fcmp.%D1 %0, %I0 = %F2, %F3"
[(set_attr "itanium_class" "fcmp")])
The case LONG_DOUBLE_TYPE_SIZE = 128 activates TFmode support
and may deactivate XFmode since `long double' is used to refer
- to both modes. Defining INTEL_EXTENDED_IEEE_FORMAT at the same
- time enables 80387-style 80-bit floats in a 128-bit padded
- image, as seen on IA-64.
+ to both modes. Defining INTEL_EXTENDED_IEEE_FORMAT to non-zero
+ at the same time enables 80387-style 80-bit floats in a 128-bit
+ padded image, as seen on IA-64.
The macros FLOAT_WORDS_BIG_ENDIAN, HOST_FLOAT_WORDS_BIG_ENDIAN,
contributed by Richard Earnshaw <Richard.Earnshaw@cl.cam.ac.uk>,
in memory, with no holes. */
#if MAX_LONG_DOUBLE_TYPE_SIZE == 96 || \
- (defined(INTEL_EXTENDED_IEEE_FORMAT) && MAX_LONG_DOUBLE_TYPE_SIZE == 128)
+ ((INTEL_EXTENDED_IEEE_FORMAT != 0) && MAX_LONG_DOUBLE_TYPE_SIZE == 128)
/* Number of 16 bit words in external e type format */
# define NE 6
# define MAXDECEXP 4932
unsigned EMUSHORT *));
static void e53toe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
static void e64toe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
static void e113toe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
#endif
static void e24toe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
static void asctoe24 PARAMS ((const char *, unsigned EMUSHORT *));
static void asctoe53 PARAMS ((const char *, unsigned EMUSHORT *));
static void asctoe64 PARAMS ((const char *, unsigned EMUSHORT *));
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
static void asctoe113 PARAMS ((const char *, unsigned EMUSHORT *));
#endif
static void asctoe PARAMS ((const char *, unsigned EMUSHORT *));
switch (mode)
{
case TFmode:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
/* Swap halfwords in the fourth long. */
th = (unsigned long) e[6] & 0xffff;
t = (unsigned long) e[7] & 0xffff;
switch (mode)
{
case TFmode:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
/* Pack the fourth long. */
th = (unsigned long) e[7] & 0xffff;
t = (unsigned long) e[6] & 0xffff;
break;
case TFmode:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
asctoe113 (s, tem);
e113toe (tem, e);
break;
break;
case 128:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
etoe113 (dg, df);
e113toe (df, dg);
#else
break;
case 128:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
etoe113 (dg, df);
e113toe (df, dg);
#else
switch (mode)
{
case TFmode:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
etoe113 (e, t);
e113toe (t, t);
break;
/* e type constants used by high precision check routines */
-#if MAX_LONG_DOUBLE_TYPE_SIZE == 128 && !defined(INTEL_EXTENDED_IEEE_FORMAT)
+#if MAX_LONG_DOUBLE_TYPE_SIZE == 128 && (INTEL_EXTENDED_IEEE_FORMAT == 0)
/* 0.0 */
unsigned EMUSHORT ezero[NE] =
{0x0000, 0x0000, 0x0000, 0x0000,
*q++ = *p++;
}
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
/* Convert 128-bit long double precision float PE to e type Y. */
static void
#define NTEN 12
#define MAXP 4096
-#if MAX_LONG_DOUBLE_TYPE_SIZE == 128 && !defined(INTEL_EXTENDED_IEEE_FORMAT)
+#if MAX_LONG_DOUBLE_TYPE_SIZE == 128 && (INTEL_EXTENDED_IEEE_FORMAT == 0)
static unsigned EMUSHORT etens[NTEN + 1][NE] =
{
{0x6576, 0x4a92, 0x804a, 0x153f,
asctoeg (s, y, 64);
}
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
/* Convert ASCII string S to 128-bit long double Y. */
static void
used like NaN's, but probably not in the same way as IEEE. */
#if !defined(DEC) && !defined(IBM) && !defined(C4X)
case TFmode:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
n = 8;
if (REAL_WORDS_BIG_ENDIAN)
p = TFbignan;
return 64;
case 128:
-#ifndef INTEL_EXTENDED_IEEE_FORMAT
+#if (INTEL_EXTENDED_IEEE_FORMAT == 0)
return 113;
#else
return 64;