Commit 312f9b9d by Christian Bruel Committed by Christian Bruel

predicates.md (t_reg_operand): Check REG_P for SUBREG.

2012-09-14  Christian Bruel  <christian.bruel@st.com>

       * config/sh/predicates.md (t_reg_operand): Check REG_P for SUBREG.
       * config/sh/sh.c (sequence_insn_p: Check INSNP_P for SEQUENCE.

From-SVN: r191300
parent 5f08ae1e
2012-09-14 Christian Bruel <christian.bruel@st.com>
* config/sh/predicates.md (t_reg_operand): Check REG_P for SUBREG.
* config/sh/sh.c (sequence_insn_p: Check INSNP_P for SEQUENCE.
2012-09-14 Jakub Jelinek <jakub@redhat.com> 2012-09-14 Jakub Jelinek <jakub@redhat.com>
PR target/54564 PR target/54564
......
...@@ -998,11 +998,12 @@ ...@@ -998,11 +998,12 @@
return REGNO (op) == T_REG; return REGNO (op) == T_REG;
case SUBREG: case SUBREG:
return REGNO (SUBREG_REG (op)) == T_REG; return REG_P (SUBREG_REG (op)) && REGNO (SUBREG_REG (op)) == T_REG;
case ZERO_EXTEND: case ZERO_EXTEND:
case SIGN_EXTEND: case SIGN_EXTEND:
return GET_CODE (XEXP (op, 0)) == SUBREG return GET_CODE (XEXP (op, 0)) == SUBREG
&& REG_P (SUBREG_REG (XEXP (op, 0)))
&& REGNO (SUBREG_REG (XEXP (op, 0))) == T_REG; && REGNO (SUBREG_REG (XEXP (op, 0))) == T_REG;
default: default:
......
...@@ -9876,7 +9876,7 @@ fpscr_set_from_mem (int mode, HARD_REG_SET regs_live) ...@@ -9876,7 +9876,7 @@ fpscr_set_from_mem (int mode, HARD_REG_SET regs_live)
static bool static bool
sequence_insn_p (rtx insn) sequence_insn_p (rtx insn)
{ {
rtx prev, next, pat; rtx prev, next;
prev = PREV_INSN (insn); prev = PREV_INSN (insn);
if (prev == NULL) if (prev == NULL)
...@@ -9886,11 +9886,7 @@ sequence_insn_p (rtx insn) ...@@ -9886,11 +9886,7 @@ sequence_insn_p (rtx insn)
if (next == NULL) if (next == NULL)
return false; return false;
pat = PATTERN (next); return INSN_P (next) && GET_CODE (PATTERN (next)) == SEQUENCE;
if (pat == NULL)
return false;
return GET_CODE (pat) == SEQUENCE;
} }
int int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment