From eb3ebda430000cd4982eae33cc15a76da99e61f1 Mon Sep 17 00:00:00 2001 From: wilson Date: Fri, 25 Sep 1992 05:33:07 +0000 Subject: [PATCH] (movti): Split CONST_INTs into 4 moves, and force all other constants to memory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2236 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/a29k/a29k.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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 -- 2.7.4