aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-09-24 22:33:07 -0700
committerJim Wilson <wilson@gcc.gnu.org>1992-09-24 22:33:07 -0700
commita9fb8bb9590ac49cfe0dd70856311e523dfe13eb (patch)
tree4ee60e325424160ce5f02016ca51f941749cb300
parent1154b096fa7adf994299811ab5824de6c77e1f68 (diff)
downloadgcc-a9fb8bb9590ac49cfe0dd70856311e523dfe13eb.zip
gcc-a9fb8bb9590ac49cfe0dd70856311e523dfe13eb.tar.gz
gcc-a9fb8bb9590ac49cfe0dd70856311e523dfe13eb.tar.bz2
(movti): Split CONST_INTs into 4 moves, and force all other constants to
memory. From-SVN: r2236
-rw-r--r--gcc/config/a29k/a29k.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/config/a29k/a29k.md b/gcc/config/a29k/a29k.md
index 8f73924..06fe6f1 100644
--- a/gcc/config/a29k/a29k.md
+++ b/gcc/config/a29k/a29k.md
@@ -2254,6 +2254,35 @@
{
if (GET_CODE (operands[0]) == MEM)
operands[1] = force_reg (TImode, operands[1]);
+
+ /* We can't handle constants in general because there is no rtl to represent
+ 128 bit constants. Splitting happens to work for CONST_INTs so we split
+ them for good code. Other constants will get forced to memory. */
+
+ if (GET_CODE (operands[1]) == CONST_INT)
+ {
+ rtx part0, part1, part2, part3;
+
+ part0 = operand_subword (operands[0], 0, 1, TImode);
+ part1 = operand_subword (operands[0], 1, 1, TImode);
+ part2 = operand_subword (operands[0], 2, 1, TImode);
+ part3 = operand_subword (operands[0], 3, 1, TImode);
+
+ emit_move_insn (part0, const0_rtx);
+ emit_move_insn (part1, const0_rtx);
+ emit_move_insn (part2, const0_rtx);
+ emit_move_insn (part3, const0_rtx);
+
+ DONE;
+ }
+ else if (CONSTANT_P (operands[1]))
+ {
+ operands[1] = force_const_mem (TImode, operands[1]);
+ if (! memory_address_p (TImode, XEXP (operands[1], 0))
+ && ! reload_in_progress)
+ operands[1] = change_address (operands[1], TImode,
+ XEXP (operands[1], 0));
+ }
}")
;; For compare operations, we simply store the comparison operands and