aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-10-26 17:52:23 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-10-26 17:52:23 -0400
commit0a0b733a3d3ce0e9a0ff0c932356bea25c82b6f9 (patch)
tree16091a1ba82bcda9af3c89a27c8fb0961b03a5a2 /gcc
parent9bf22b75fcd618405074a24cffe37f9c877e4c36 (diff)
downloadgcc-0a0b733a3d3ce0e9a0ff0c932356bea25c82b6f9.zip
gcc-0a0b733a3d3ce0e9a0ff0c932356bea25c82b6f9.tar.gz
gcc-0a0b733a3d3ce0e9a0ff0c932356bea25c82b6f9.tar.bz2
(negdi2): Use TARGET_LITTLE_ENDIAN.
From-SVN: r10514
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sh/sh.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 73fc26e..36ec02e 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -949,11 +949,14 @@
""
"
{
- rtx low_src = operand_subword (operands[1], 1, 0, DImode);
- rtx high_src = operand_subword (operands[1], 0, 0, DImode);
+ int low_word = (TARGET_LITTLE_ENDIAN ? 0 : 1);
+ int high_word = (TARGET_LITTLE_ENDIAN ? 1 : 0);
- rtx low_dst = operand_subword (operands[0], 1, 1, DImode);
- rtx high_dst = operand_subword (operands[0], 0, 1, DImode);
+ rtx low_src = operand_subword (operands[1], low_word, 0, DImode);
+ rtx high_src = operand_subword (operands[1], high_word, 0, DImode);
+
+ rtx low_dst = operand_subword (operands[0], low_word, 1, DImode);
+ rtx high_dst = operand_subword (operands[0], high_word, 1, DImode);
emit_insn (gen_clrt ());
emit_insn (gen_negc (low_dst, low_src));