From: Jim Wilson Date: Fri, 25 Sep 1992 05:33:07 +0000 (-0700) Subject: (movti): Split CONST_INTs into 4 moves, and force all other constants to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9fb8bb9590ac49cfe0dd70856311e523dfe13eb;p=gcc.git (movti): Split CONST_INTs into 4 moves, and force all other constants to memory. From-SVN: r2236 --- diff --git a/gcc/config/a29k/a29k.md b/gcc/config/a29k/a29k.md index 8f739247341..06fe6f177eb 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