aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-09-09 12:35:29 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-09-09 12:35:29 -0700
commit78e9b5dfc7fd1448f1e570ff97d5ab0e9b9e51ff (patch)
treea6c38f3761b0a1d3d3bdf2caa868e029aad7fda8 /gcc
parent2bb76168f81aa2afd4838ead50ae6e87c85e708e (diff)
downloadgcc-78e9b5dfc7fd1448f1e570ff97d5ab0e9b9e51ff.zip
gcc-78e9b5dfc7fd1448f1e570ff97d5ab0e9b9e51ff.tar.gz
gcc-78e9b5dfc7fd1448f1e570ff97d5ab0e9b9e51ff.tar.bz2
(SQRTTF2_LIBCALL): Delete.
(INIT_TARGET_OPTABS): Define. (INIT_SUBTARGET_OPTABS): Define. From-SVN: r8057
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/sparc.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 1de5c5d..e025419 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -2072,7 +2072,6 @@ extern struct rtx_def *legitimize_pic_address ();
#define SUBTF3_LIBCALL "_Q_sub"
#define MULTF3_LIBCALL "_Q_mul"
#define DIVTF3_LIBCALL "_Q_div"
-#define SQRTTF2_LIBCALL "_Q_sqrt"
#define FLOATSITF2_LIBCALL "_Q_itoq"
#define FIX_TRUNCTFSI2_LIBCALL "_Q_qtoi"
#define FIXUNS_TRUNCTFSI2_LIBCALL "_Q_qtou"
@@ -2087,6 +2086,20 @@ extern struct rtx_def *legitimize_pic_address ();
#define LTTF2_LIBCALL "_Q_flt"
#define LETF2_LIBCALL "_Q_fle"
+/* We can define the TFmode sqrt optab only if TARGET_FPU. This is because
+ with soft-float, the SFmode and DFmode sqrt instructions will be absent,
+ and the compiler will notice and try to use the TFmode sqrt instruction
+ for calls to the builtin function sqrt, but this fails. */
+#define INIT_TARGET_OPTABS \
+ do { \
+ INIT_SUBTARGET_OPTABS; \
+ if (TARGET_FPU) \
+ sqrt_optab->handlers[(int) TFmode].libfunc = gen_rtx (SYMBOL_REF, Pmode, "_Q_sqrt"); \
+ } while (0)
+
+/* This is meant to be redefined in the host dependent files */
+#define INIT_SUBTARGET_OPTABS
+
/* Compute the cost of computing a constant rtl expression RTX
whose rtx-code is CODE. The body of this macro is a portion
of a switch statement. If the code is computed here,