This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, MIPS] missing dsp conditions
- From: Jim Wilson <wilson at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 May 2010 11:38:00 -0700
- Subject: [PATCH, MIPS] missing dsp conditions
This is a simple patch that just fixes two places in the mips-dsp.md
file that are missing tests for ISA_HAS_DSP. Because the patterns use
DSP modes, and the DSP modes themselves depend on ISA_HAS_DSP, there is
no user visible bug here. However, fixing this bug improves the cc1
debug info a bit, since without the patch the insn-recog.c file ends up
pointing at the DSP mode macros instead of pointing at the pattern.
E.g. we get without the patch
if (rtx_equal_p (x3, operands[2])
&&
#line 28 "../../gcc/gcc/config/mips/mips-dsp.md"
(ISA_HAS_DSP))
{
return 710; /* mips_addq_s_w */
}
and with the patch we get
if (rtx_equal_p (x3, operands[2])
&&
#line 76 "../../gcc/gcc/config/mips/mips-dsp.md"
(ISA_HAS_DSP))
{
return 710; /* mips_addq_s_w */
}
This was tested with a mipsisa32r2-sde-elf C and C++ toolchain build,
with the testsuite run on the simulator. There were no regressions.
Jim
2010-05-10 James E. Wilson <wilson@codesourcery.com>
* config/mips/mips-dsp.md (add<DSPV:mode>3,
mips_add<DSP:dspfmt1>_s_<DSP:dspfmt2>): Add ISA_HAS_DSP condition.
Index: mips-dsp.md
===================================================================
--- mips-dsp.md (revision 158976)
+++ mips-dsp.md (working copy)
@@ -1,4 +1,4 @@
-;; Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
;;
;; This file is part of GCC.
;;
@@ -60,7 +60,7 @@ (define_insn "add<DSPV:mode>3"
(match_operand:DSPV 2 "register_operand" "d")))
(set (reg:CCDSP CCDSP_OU_REGNUM)
(unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDQ))])]
- ""
+ "ISA_HAS_DSP"
"add<DSPV:dspfmt1>.<DSPV:dspfmt2>\t%0,%1,%2"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])
@@ -73,7 +73,7 @@ (define_insn "mips_add<DSP:dspfmt1>_s_<D
UNSPEC_ADDQ_S))
(set (reg:CCDSP CCDSP_OU_REGNUM)
(unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDQ_S))])]
- ""
+ "ISA_HAS_DSP"
"add<DSP:dspfmt1>_s.<DSP:dspfmt2>\t%0,%1,%2"
[(set_attr "type" "arith")
(set_attr "mode" "SI")])