From: Jim Wilson Date: Tue, 21 Jan 2020 23:20:19 +0000 (-0800) Subject: RISC-V: Fix rtl checking enabled failure with -msave-restore. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0501b74264e93bf9ebf45cf10a624a549dc474f1;p=gcc.git RISC-V: Fix rtl checking enabled failure with -msave-restore. Found with an rtl checking enabled build and check. This triggered failures in the gcc.target/riscv/save-restore* tests. We are using XINT to access an XWINT value; INTVAL is the preferred solution. gcc/ * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Use INTVAL instead of XINT. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1763fe0631d..2f6e603df7a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-01-21 Jim Wilson + + * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Use INTVAL + instead of XINT. + 2020-01-21 H.J. Lu Uros Bizjak diff --git a/gcc/config/riscv/riscv-sr.c b/gcc/config/riscv/riscv-sr.c index e3180efcbcc..744d0c48c33 100644 --- a/gcc/config/riscv/riscv-sr.c +++ b/gcc/config/riscv/riscv-sr.c @@ -115,7 +115,7 @@ riscv_sr_match_prologue (rtx_insn **body) && GET_CODE (XVECEXP (PATTERN (insn), 0, 0)) == UNSPEC_VOLATILE && (GET_CODE (XVECEXP (XVECEXP (PATTERN (insn), 0, 0), 0, 0)) == CONST_INT) - && XINT (XVECEXP (XVECEXP (PATTERN (insn), 0, 0), 0, 0), 0) == 2) + && INTVAL (XVECEXP (XVECEXP (PATTERN (insn), 0, 0), 0, 0)) == 2) return insn; return NULL;