diff options
author | Richard Earnshaw <erich@gnu.org> | 1997-03-18 09:28:41 +0000 |
---|---|---|
committer | Richard Earnshaw <erich@gnu.org> | 1997-03-18 09:28:41 +0000 |
commit | f57b1ad380462f8b4fd5ce5208b605095f81d50b (patch) | |
tree | 9d78692656e5e117834430c83d54c540a78eb712 | |
parent | 2033a41a96dfcbff14006e26bbc251783ea3e8a3 (diff) | |
download | gcc-f57b1ad380462f8b4fd5ce5208b605095f81d50b.zip gcc-f57b1ad380462f8b4fd5ce5208b605095f81d50b.tar.gz gcc-f57b1ad380462f8b4fd5ce5208b605095f81d50b.tar.bz2 |
(movhi): Handle generation of large constants during
and after reload.
From-SVN: r13730
-rw-r--r-- | gcc/config/arm/arm.md | 14 |
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; + } } ") |