From b43502719f0727864d5a19fe08a081a334022e42 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Wed, 4 Apr 2018 12:38:04 +0000 Subject: [PATCH] [NDS32] Restrict mov pattern that has at least one register operand. gcc/ * config/nds32/nds32-doubleword.md (move_): Require resiter_operand condition. * config/nds32/nds32.md (*move): Ditto. From-SVN: r259077 --- gcc/ChangeLog | 6 ++++++ gcc/config/nds32/nds32-doubleword.md | 3 ++- gcc/config/nds32/nds32.md | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f97ac2bc38..bd0c1b12156 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-04 Kito Cheng + + * config/nds32/nds32-doubleword.md (move_): Require + resiter_operand condition. + * config/nds32/nds32.md (*move): Ditto. + 2018-04-04 Kito Cheng Monk Chiang diff --git a/gcc/config/nds32/nds32-doubleword.md b/gcc/config/nds32/nds32-doubleword.md index beefca49c59..0e4b0dc4fb6 100644 --- a/gcc/config/nds32/nds32-doubleword.md +++ b/gcc/config/nds32/nds32-doubleword.md @@ -48,7 +48,8 @@ (define_insn "move_" [(set (match_operand:DIDF 0 "nonimmediate_operand" "=r, r, r, m") (match_operand:DIDF 1 "general_operand" " r, i, m, r"))] - "" + "register_operand(operands[0], mode) + || register_operand(operands[1], mode)" { rtx addr; rtx otherops[5]; diff --git a/gcc/config/nds32/nds32.md b/gcc/config/nds32/nds32.md index 68fe1b3c7f0..afbea8be344 100644 --- a/gcc/config/nds32/nds32.md +++ b/gcc/config/nds32/nds32.md @@ -158,7 +158,8 @@ (define_insn "*mov" [(set (match_operand:QIHISI 0 "nonimmediate_operand" "=r, r, U45, U33, U37, U45, m, l, l, l, d, r, d, r, r, r") (match_operand:QIHISI 1 "nds32_move_operand" " r, r, l, l, l, d, r, U45, U33, U37, U45, m, Ip05, Is05, Is20, Ihig"))] - "" + "register_operand(operands[0], mode) + || register_operand(operands[1], mode)" { switch (which_alternative) { -- 2.30.2