summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-17 23:37:20 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-17 23:37:20 +0000
commit64a6336929486105128304ac1680d6ef9df4376f (patch)
tree35e9723f9a9b5d6fd2195c515bc2225d9ff66306
parent36d63243fd1ae1967d043bde834c64e84c3e4c4b (diff)
downloadgcc-64a6336929486105128304ac1680d6ef9df4376f.tar.gz
* config/rs6000/rs6000.c (rs6000_emit_move): Use low word of
sdmode_stack_slot also in little-endian mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204927 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d4e0260450f..725f66d34c4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_emit_move): Use low word of
+ sdmode_stack_slot also in little-endian mode.
+
2013-11-17 Jan Hubicka <jh@suse.cz>
* doc/md.texi (setmem, movstr): Update documentation.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d042fad044a..fa9d56929a6 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -8188,7 +8188,9 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
}
else if (INT_REGNO_P (REGNO (operands[1])))
{
- rtx mem = adjust_address_nv (operands[0], mode, 4);
+ rtx mem = operands[0];
+ if (BYTES_BIG_ENDIAN)
+ mem = adjust_address_nv (mem, mode, 4);
mem = eliminate_regs (mem, VOIDmode, NULL_RTX);
emit_insn (gen_movsd_hardfloat (mem, operands[1]));
}
@@ -8211,7 +8213,9 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
}
else if (INT_REGNO_P (REGNO (operands[0])))
{
- rtx mem = adjust_address_nv (operands[1], mode, 4);
+ rtx mem = operands[1];
+ if (BYTES_BIG_ENDIAN)
+ mem = adjust_address_nv (mem, mode, 4);
mem = eliminate_regs (mem, VOIDmode, NULL_RTX);
emit_insn (gen_movsd_hardfloat (operands[0], mem));
}