This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix avr build
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Denis Chertykov <chertykov at gmail dot com>, Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Mar 2017 09:54:58 +0100
- Subject: [committed] Fix avr build
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
Richard reported that after my PR79345 r245833 fix avr no longer builds:
../../gcc/config/avr/avr.md:1060:1: define_expand for setmemhi needs to have match_scratch numbers above all other operands
The following patch ought to fix that, committed as obvious to trunk.
2017-03-08 Jakub Jelinek <jakub@redhat.com>
* config/avr/avr.md (setmemhi): Make sure match_dup
operand number comes before match_scratch.
--- gcc/config/avr/avr.md.jj 2017-02-06 13:32:14.000000000 +0100
+++ gcc/config/avr/avr.md 2017-03-08 09:46:39.828773285 +0100
@@ -1062,8 +1062,8 @@ (define_expand "setmemhi"
(match_operand 2 "const_int_operand" ""))
(use (match_operand:HI 1 "const_int_operand" ""))
(use (match_operand:HI 3 "const_int_operand" ""))
- (clobber (match_scratch:HI 4 ""))
- (clobber (match_dup 5))])]
+ (clobber (match_scratch:HI 5 ""))
+ (clobber (match_dup 4))])]
""
{
rtx addr0;
@@ -1077,7 +1077,7 @@ (define_expand "setmemhi"
FAIL;
mode = u8_operand (operands[1], VOIDmode) ? QImode : HImode;
- operands[5] = gen_rtx_SCRATCH (mode);
+ operands[4] = gen_rtx_SCRATCH (mode);
operands[1] = copy_to_mode_reg (mode,
gen_int_mode (INTVAL (operands[1]), mode));
addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
Jakub