(movhi): Handle generation of large constants during
authorRichard Earnshaw <erich@gnu.org>
Tue, 18 Mar 1997 09:28:41 +0000 (09:28 +0000)
committerRichard Earnshaw <erich@gnu.org>
Tue, 18 Mar 1997 09:28:41 +0000 (09:28 +0000)
and after reload.

From-SVN: r13730

gcc/config/arm/arm.md

index 257289c9794cdf5d7dd24e2030ed01391936094c..33cce5467176b467d02784b67a596103c9b2a9b6 100644 (file)
            }
        }
     }
+  /* 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;
+    }
 }
 ")