From: Richard Sandiford <richard@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Subject: [committed] Define __mips_dsp_rev
Date: Fri, 27 Jul 2007 19:42:00 -0000 [thread overview]
Message-ID: <87odhxlk1m.fsf@firetop.home> (raw)
At Thiemo's request, I've added a __mips_dsp_rev macro that specifies
the revision number of the ASE. -mdspr2 has been in mainline for a
few months now, so I think we should keep the original __mips_dspr2
macro too.
Tested on mipsisa64-elf. Applied to trunk.
Richard
gcc/
* doc/invoke.texi (mdsp, mdspr2): Document the __mips_dsp,
__mips_dspr2 and __mips_dsp_rev macros.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_dsp_rev.
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi (revision 126993)
+++ gcc/doc/invoke.texi (working copy)
@@ -11658,14 +11658,19 @@ operations. This is the default.
@itemx -mno-dsp
@opindex mdsp
@opindex mno-dsp
-Use (do not use) the MIPS DSP ASE. @xref{MIPS DSP Built-in Functions}.
+Use (do not use) revision 1 of the MIPS DSP ASE.
+@xref{MIPS DSP Built-in Functions}. This option defines the
+preprocessor macro @samp{__mips_dsp}. It also defines
+@samp{__mips_dsp_rev} to 1.
@item -mdspr2
@itemx -mno-dspr2
@opindex mdspr2
@opindex mno-dspr2
-Use (do not use) the MIPS DSP ASE REV 2. @xref{MIPS DSP Built-in Functions}.
-The option @option{-mdspr2} implies @option{-mdsp}.
+Use (do not use) revision 2 of the MIPS DSP ASE.
+@xref{MIPS DSP Built-in Functions}. This option defines the
+preprocessor macros @samp{__mips_dsp} and @samp{__mips_dspr2}.
+It also defines @samp{__mips_dsp_rev} to 2.
@item -msmartmips
@itemx -mno-smartmips
Index: gcc/config/mips/mips.h
===================================================================
--- gcc/config/mips/mips.h (revision 126993)
+++ gcc/config/mips/mips.h (working copy)
@@ -378,10 +378,16 @@ #define TARGET_CPU_CPP_BUILTINS() \
builtin_define ("__mips_smartmips"); \
\
if (TARGET_DSP) \
- builtin_define ("__mips_dsp"); \
- \
- if (TARGET_DSPR2) \
- builtin_define ("__mips_dspr2"); \
+ { \
+ builtin_define ("__mips_dsp"); \
+ if (TARGET_DSPR2) \
+ { \
+ builtin_define ("__mips_dspr2"); \
+ builtin_define ("__mips_dsp_rev=2"); \
+ } \
+ else \
+ builtin_define ("__mips_dsp_rev=1"); \
+ } \
\
MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \
MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \
reply other threads:[~2007-07-27 19:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87odhxlk1m.fsf@firetop.home \
--to=richard@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).