aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fortune <mfortune@gmail.com>2018-03-01 11:37:35 +0000
committerMatthew Fortune <mpf@gcc.gnu.org>2018-03-01 11:37:35 +0000
commit523036d4dcd25b8c0fe619b2e76a3795931e74ba (patch)
treecb95793364e67f775a0ffb197e8c48f4f9c7f420
parent71a93e81a3a0b574a88364772d1074be9a7e68f6 (diff)
downloadgcc-523036d4dcd25b8c0fe619b2e76a3795931e74ba.zip
gcc-523036d4dcd25b8c0fe619b2e76a3795931e74ba.tar.gz
gcc-523036d4dcd25b8c0fe619b2e76a3795931e74ba.tar.bz2
MIPS: Fix wrong use of XINT instead of INTVAL
This issue was caught with assert checking enabled but is not a functional bug as XINT(x, 0) happens to overlay INTVAL(x) anyway. gcc/ * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect XINT with INTVAL. (mips_final_postscan_insn): Likewise. From-SVN: r258099
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mips/mips.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b934c83..447ea67 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-03-01 Matthew Fortune <mfortune@gmail.com>
+
+ * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
+ XINT with INTVAL.
+ (mips_final_postscan_insn): Likewise.
+
2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
PR rtl-optimization/84528
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 00cece2..aabd4b1 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -20426,7 +20426,7 @@ mips_final_prescan_insn (rtx_insn *insn, rtx *opvec, int noperands)
&& GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
&& XINT (PATTERN (insn), 1) == UNSPEC_CONSTTABLE)
mips_set_text_contents_type (asm_out_file, "__pool_",
- XINT (XVECEXP (PATTERN (insn), 0, 0), 0),
+ INTVAL (XVECEXP (PATTERN (insn), 0, 0)),
FALSE);
if (mips_need_noat_wrapper_p (insn, opvec, noperands))
@@ -20450,7 +20450,7 @@ mips_final_postscan_insn (FILE *file ATTRIBUTE_UNUSED, rtx_insn *insn,
&& GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
&& XINT (PATTERN (insn), 1) == UNSPEC_CONSTTABLE_END)
mips_set_text_contents_type (asm_out_file, "__pend_",
- XINT (XVECEXP (PATTERN (insn), 0, 0), 0),
+ INTVAL (XVECEXP (PATTERN (insn), 0, 0)),
TRUE);
}