aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <erich@gnu.org>1997-03-18 09:28:41 +0000
committerRichard Earnshaw <erich@gnu.org>1997-03-18 09:28:41 +0000
commitf57b1ad380462f8b4fd5ce5208b605095f81d50b (patch)
tree9d78692656e5e117834430c83d54c540a78eb712 /gcc
parent2033a41a96dfcbff14006e26bbc251783ea3e8a3 (diff)
downloadgcc-f57b1ad380462f8b4fd5ce5208b605095f81d50b.zip
gcc-f57b1ad380462f8b4fd5ce5208b605095f81d50b.tar.gz
gcc-f57b1ad380462f8b4fd5ce5208b605095f81d50b.tar.bz2
(movhi): Handle generation of large constants during
and after reload. From-SVN: r13730
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/arm/arm.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 257289c..33cce54 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -2590,6 +2590,20 @@
}
}
}
+ /* Handle loading a large integer during reload */
+ else if (GET_CODE (operands[1]) == CONST_INT
+ && ! const_ok_for_arm (INTVAL (operands[1]))
+ && ! const_ok_for_arm (~INTVAL (operands[1])))
+ {
+ /* Writing a constant to memory needs a scratch, which should
+ be handled with SECONDARY_RELOADs. */
+ if (GET_CODE (operands[0]) != REG)
+ abort ();
+
+ operands[0] = gen_rtx (SUBREG, SImode, operands[0], 0);
+ emit_insn (gen_movsi (operands[0], operands[1]));
+ DONE;
+ }
}
")