From bb75a000abe6aa89c3544435ce56bebb6da69167 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 21 May 1997 23:35:37 -0600 Subject: [PATCH] * mn10300.md (reload_insi): Handle SUBREG properly. From-SVN: r14109 --- gcc/config/mn10300/mn10300.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index 40d3868721f..8fab7c11bf1 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -167,12 +167,26 @@ if (XEXP (operands[1], 0) == stack_pointer_rtx) { emit_move_insn (operands[0], XEXP (operands[1], 0)); - emit_move_insn (operands[2], XEXP (operands[1], 1)); + if (GET_CODE (XEXP (operands[1], 1)) == SUBREG + && (GET_MODE_SIZE (GET_MODE (XEXP (operands[1], 1))) + > GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP (operands[1], 1)))))) + emit_move_insn (operands[2], + gen_rtx (ZERO_EXTEND, GET_MODE (XEXP (operands[1], 1)), + SUBREG_REG (XEXP (operands[1], 1)))); + else + emit_move_insn (operands[2], XEXP (operands[1], 1)); } else { emit_move_insn (operands[0], XEXP (operands[1], 1)); - emit_move_insn (operands[2], XEXP (operands[1], 0)); + if (GET_CODE (XEXP (operands[1], 0)) == SUBREG + && (GET_MODE_SIZE (GET_MODE (XEXP (operands[1], 0))) + > GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP (operands[1], 0)))))) + emit_move_insn (operands[2], + gen_rtx (ZERO_EXTEND, GET_MODE (XEXP (operands[1], 0)), + SUBREG_REG (XEXP (operands[1], 0)))); + else + emit_move_insn (operands[2], XEXP (operands[1], 0)); } emit_insn (gen_addsi3 (operands[0], operands[0], operands[2])); DONE; -- 2.30.2