From f57b1ad380462f8b4fd5ce5208b605095f81d50b Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Tue, 18 Mar 1997 09:28:41 +0000 Subject: (movhi): Handle generation of large constants during and after reload. From-SVN: r13730 --- gcc/config/arm/arm.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gcc') 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; + } } ") -- cgit v1.1