aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-03 22:19:35 +0000
committerDavid S. Miller <davem@gcc.gnu.org>2012-05-03 15:19:35 -0700
commitd333c3ebce0df3f2c4d976698bea0d96642a2ead (patch)
tree01a989235afba1e8b1a9134a9399b245310f5a14
parent65d512d10ecd585b72a099c54453831c40d2e4f7 (diff)
downloadgcc-d333c3ebce0df3f2c4d976698bea0d96642a2ead.zip
gcc-d333c3ebce0df3f2c4d976698bea0d96642a2ead.tar.gz
gcc-d333c3ebce0df3f2c4d976698bea0d96642a2ead.tar.bz2
Fix long double float miscompilations on sparc 64-bit.
PR target/52684 * config/sparc/sparc.c (emit_soft_tfmode_libcall): If we pass a MEM directly into a libcall, mark it's MEM_EXPR as addressable. (sparc_emit_float_lib_cmp): Likewise. From-SVN: r187120
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/sparc/sparc.c23
2 files changed, 26 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8907303..a310e38 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-03 David S. Miller <davem@davemloft.net>
+
+ PR target/52684
+ * config/sparc/sparc.c (emit_soft_tfmode_libcall): If we pass a
+ MEM directly into a libcall, mark it's MEM_EXPR as addressable.
+ (sparc_emit_float_lib_cmp): Likewise.
+
2012-05-03 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/53199
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 11bd1fe..0db1718 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -1,7 +1,7 @@
/* Subroutines for insn-output.c for SPARC.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011
+ 2011, 2012
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
@@ -2724,7 +2724,12 @@ emit_soft_tfmode_libcall (const char *func_name, int nargs, rtx *operands)
if (GET_CODE (this_arg) == MEM
&& ! force_stack_temp)
- this_arg = XEXP (this_arg, 0);
+ {
+ tree expr = MEM_EXPR (this_arg);
+ if (expr)
+ mark_addressable (expr);
+ this_arg = XEXP (this_arg, 0);
+ }
else if (CONSTANT_P (this_arg)
&& ! force_stack_temp)
{
@@ -7413,7 +7418,12 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison)
if (TARGET_ARCH64)
{
if (MEM_P (x))
- slot0 = x;
+ {
+ tree expr = MEM_EXPR (x);
+ if (expr)
+ mark_addressable (expr);
+ slot0 = x;
+ }
else
{
slot0 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);
@@ -7421,7 +7431,12 @@ sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison)
}
if (MEM_P (y))
- slot1 = y;
+ {
+ tree expr = MEM_EXPR (y);
+ if (expr)
+ mark_addressable (expr);
+ slot1 = y;
+ }
else
{
slot1 = assign_stack_temp (TFmode, GET_MODE_SIZE(TFmode), 0);