]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorDavid S. Miller <davem@redhat.com>
Thu, 16 May 2002 11:08:37 +0000 (04:08 -0700)
committerDavid S. Miller <davem@gcc.gnu.org>
Thu, 16 May 2002 11:08:37 +0000 (04:08 -0700)
2002-05-09  David S. Miller  <davem@redhat.com>

* config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9.

2002-05-07  David S. Miller  <davem@redhat.com>

PR target/6103
* config/sparc/sparc.h (TARGET_BUGGY_QP_LIB): Define to zero.
* config/sparc/sol2.h (TARGET_BUGGY_QP_LIB): Override to one.
* config/sparc/sparc.c (emit_soft_tfmode_libcall): If the Qp
library implementation clobbers the output before the inputs
are fully consumed, use stack temporary for the output.

From-SVN: r53516

gcc/ChangeLog
gcc/config/sparc/sol2.h
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.h

index 62e3fb9f067638c4bf510f6567c6d3588bef6b82..58c163b4685b4149fa5b1dd6301c31b566ae0069 100644 (file)
@@ -1,3 +1,16 @@
+2002-05-09  David S. Miller  <davem@redhat.com>
+
+       * config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9.
+
+2002-05-07  David S. Miller  <davem@redhat.com>
+
+       PR target/6103
+       * config/sparc/sparc.h (TARGET_BUGGY_QP_LIB): Define to zero.
+       * config/sparc/sol2.h (TARGET_BUGGY_QP_LIB): Override to one.
+       * config/sparc/sparc.c (emit_soft_tfmode_libcall): If the Qp
+       library implementation clobbers the output before the inputs
+       are fully consumed, use stack temporary for the output.
+
 Wed May 15 10:38:27 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * invoke.texi (-malign-double): Re-add lost warning.
index 67e064dd544d130cf0894c28fdf67d847c650f9d..56bfbb7f14c1ef78d0d92f004e96d7749358f3a4 100644 (file)
@@ -71,17 +71,21 @@ Boston, MA 02111-1307, USA.  */
 
 /* This is here rather than in sparc.h because it's not known what
    other assemblers will accept.  */
+
 #if TARGET_CPU_DEFAULT == TARGET_CPU_v9
 #undef ASM_CPU_DEFAULT_SPEC
 #define ASM_CPU_DEFAULT_SPEC "-xarch=v8plus"
 #endif
+
 #if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
 #undef ASM_CPU_DEFAULT_SPEC
 #define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusa"
 #endif
+
 #undef ASM_CPU_SPEC
 #define ASM_CPU_SPEC "\
 %{mcpu=v8plus:-xarch=v8plus} \
+%{mcpu=v9:-xarch=v8plus} \
 %{mcpu=ultrasparc:-xarch=v8plusa} \
 %{!mcpu*:%(asm_cpu_default)} \
 "
@@ -227,6 +231,12 @@ Boston, MA 02111-1307, USA.  */
 #define MODDI3_LIBCALL "__rem64"
 #define UMODDI3_LIBCALL "__urem64"
 
+/* Solaris's _Qp_* library routine implementation clobbers the output
+   memory before the inputs are fully consumed.  */
+
+#undef TARGET_BUGGY_QP_LIB
+#define TARGET_BUGGY_QP_LIB    1
+
 #undef INIT_SUBTARGET_OPTABS
 #define INIT_SUBTARGET_OPTABS                                          \
   fixsfdi_libfunc                                                      \
index 28bbcecc76c5c25190cb66cbee4bc7b7fdcfb159..91c64aedf9889707c5abda59f7da054b0985c9bd 100644 (file)
@@ -2489,9 +2489,17 @@ emit_soft_tfmode_libcall (func_name, nargs, operands)
       /* TFmode arguments and return values are passed by reference.  */
       if (GET_MODE (this_arg) == TFmode)
        {
-         if (GET_CODE (this_arg) == MEM)
+         int force_stack_temp;
+
+         force_stack_temp = 0;
+         if (TARGET_BUGGY_QP_LIB && i == 0)
+           force_stack_temp = 1;
+
+         if (GET_CODE (this_arg) == MEM
+             && ! force_stack_temp)
            this_arg = XEXP (this_arg, 0);
-         else if (CONSTANT_P (this_arg))
+         else if (CONSTANT_P (this_arg)
+                  && ! force_stack_temp)
            {
              this_slot = force_const_mem (TFmode, this_arg);
              this_arg = XEXP (this_slot, 0);
index 3f2157810b6b9dbfbd10f41d90c1b5ac4fa512fb..8ff5d719382d5ea2fbb46d5e77a30d0ac75e614f 100644 (file)
@@ -2568,6 +2568,11 @@ do {                                                                    \
 #define LTTF2_LIBCALL "_Q_flt"
 #define LETF2_LIBCALL "_Q_fle"
 
+/* Assume by default that the _Qp_* 64-bit libcalls are implemented such
+   that the inputs are fully consumed before the output memory is clobbered.  */
+
+#define TARGET_BUGGY_QP_LIB    0
+
 /* 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