From 9c5143260e97429727cd40ad3743924d78fb0f72 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Wed, 11 Jan 2006 13:43:08 +0000 Subject: [PATCH] re PR target/25706 (invalid asm: "mov") PR target/25706 * config/cris/cris.md ("*extopqihi_side", "*extopsi_side") ("*extopsi_swap_side_biap", "*extopsi_swap_side", ("*extopqihi", "*extopsi", "*extopsi_swap"): Use %E output pattern modifier, not %e. * config/cris/cris.c (cris_op_str): Update comment about pattern modifier. (cris_print_operand) : Clear cris_output_insn_is_bound before falling through into... : Redefined from old 'e' case. From-SVN: r109584 --- gcc/ChangeLog | 13 +++++++++++++ gcc/config/cris/cris.c | 9 ++++++++- gcc/config/cris/cris.md | 38 +++++++++++++++++++------------------- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3624d2fea59..929e003f112 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2006-01-11 Hans-Peter Nilsson + + PR target/25706 + * config/cris/cris.md ("*extopqihi_side", "*extopsi_side") + ("*extopsi_swap_side_biap", "*extopsi_swap_side", + ("*extopqihi", "*extopsi", "*extopsi_swap"): Use %E + output pattern modifier, not %e. + * config/cris/cris.c (cris_op_str): Update comment about pattern + modifier. + (cris_print_operand) : Clear cris_output_insn_is_bound + before falling through into... + : Redefined from old 'e' case. + 2006-01-11 Jan Hubicka PR target/25042 diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 63b5ba71d1f..8271a4ff4a1 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -468,7 +468,7 @@ cris_op_str (rtx x) break; case UMIN: - /* Used to control the sign/zero-extend character for the 'e' modifier. + /* Used to control the sign/zero-extend character for the 'E' modifier. BOUND has none. */ cris_output_insn_is_bound = 1; return "bound"; @@ -872,6 +872,13 @@ cris_print_operand (FILE *file, rtx x, int code) break; case 'e': + /* Like 'E', but ignore state set by 'x'. FIXME: Use code + iterators ("code macros") and attributes in cris.md to avoid + the need for %x and %E (and %e) and state passed between + those modifiers. */ + cris_output_insn_is_bound = 0; + /* FALL THROUGH. */ + case 'E': /* Print 's' if operand is SIGN_EXTEND or 'u' if ZERO_EXTEND unless cris_output_insn_is_bound is nonzero. */ if (GET_CODE (operand) != SIGN_EXTEND diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index a6573195b44..9fcc4b01e4b 100644 --- a/gcc/config/cris/cris.md +++ b/gcc/config/cris/cris.md @@ -1686,8 +1686,8 @@ || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) - return "%x5%e6.%m6 [%4=%3%S2],%0"; - return "%x5%e6.%m6 [%4=%2%S3],%0"; + return "%x5%E6.%m6 [%4=%3%S2],%0"; + return "%x5%E6.%m6 [%4=%2%S3],%0"; }) (define_insn "*extopsi_side" @@ -1715,8 +1715,8 @@ || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) - return "%x5%e6 [%4=%3%S2],%0"; - return "%x5%e6 [%4=%2%S3],%0"; + return "%x5%E6 [%4=%3%S2],%0"; + return "%x5%E6 [%4=%2%S3],%0"; }) @@ -1766,7 +1766,7 @@ && cris_side_effect_mode_ok (MULT, operands, 5, 4, 2, 3, 0)" "@ # - %x7%e6 [%5=%4+%2%T3],%0") + %x7%E6 [%5=%4+%2%T3],%0") ;; [rx=ry+i] ;; FIXME: GCC should widen. @@ -1823,8 +1823,8 @@ || CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'J'))) return "#"; if (which_alternative == 4) - return \"%x6%e5.%m5 [%4=%3%S2],%0\"; - return "%x6%e5 [%4=%2%S3],%0"; + return \"%x6%E5.%m5 [%4=%3%S2],%0\"; + return "%x6%E5 [%4=%2%S3],%0"; }) ;; Extend versions (zero/sign) of normal add/sub (no side-effects). @@ -1843,10 +1843,10 @@ "GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && (operands[1] != frame_pointer_rtx || GET_CODE (operands[3]) != PLUS)" "@ - %x3%e4.%m4 %2,%0 - %x3%e4.%m4 %2,%0 - %x3%e4.%m4 %2,%0 - %x3%e4.%m4 %2,%1,%0" + %x3%E4.%m4 %2,%0 + %x3%E4.%m4 %2,%0 + %x3%E4.%m4 %2,%0 + %x3%E4.%m4 %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no") (set_attr "cc" "clobber")]) @@ -1864,10 +1864,10 @@ && GET_MODE_SIZE (GET_MODE (operands[0])) <= UNITS_PER_WORD && (operands[1] != frame_pointer_rtx || GET_CODE (operands[3]) != PLUS)" "@ - %x3%e4 %2,%0 - %x3%e4 %2,%0 - %x3%e4 %2,%0 - %x3%e4 %2,%1,%0" + %x3%E4 %2,%0 + %x3%E4 %2,%0 + %x3%E4 %2,%0 + %x3%E4 %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no")]) @@ -1903,10 +1903,10 @@ "(GET_CODE (operands[4]) != UMIN || GET_CODE (operands[3]) == ZERO_EXTEND) && operands[1] != frame_pointer_rtx" "@ - %x4%e3 %2,%0 - %x4%e3 %2,%0 - %x4%e3 %2,%0 - %x4%e3 %2,%1,%0" + %x4%E3 %2,%0 + %x4%E3 %2,%0 + %x4%E3 %2,%0 + %x4%E3 %2,%1,%0" [(set_attr "slottable" "yes,yes,no,no")]) ;; This is the special case when we use what corresponds to the -- 2.30.2