public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [MIPS] Support for -mmcu and -mno-mcu
@ 2012-07-18 13:30 Moore, Catherine
  2012-07-18 17:22 ` Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Moore, Catherine @ 2012-07-18 13:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: Moore, Catherine, Rozycki, Maciej, rdsandiford

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Hi Richard,

This patch adds support for the -mmcu option to gcc.  Okay to commit?

Thanks,
Catherine

2012-07-18  Maciej W. Rozycki  <macro@codesourcery.com>
	    Chao-ying Fu  <fu@mips.com>

        * config/mips/mips.opt (mmcu): New option.
        * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define 
	_mips_mcu whenn TARGET_MCU.
        (ASM_SPEC): Pass mcu options to the assembler.
        * doc/invoke.texi (MIPS Options): Document -mmcu and -mno-mcu.

[-- Attachment #2: mcu.patch --]
[-- Type: application/octet-stream, Size: 2221 bytes --]

Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 189584)
+++ doc/invoke.texi	(working copy)
@@ -732,6 +732,7 @@ Objective-C and Objective-C++ Dialects}.
 -mshared  -mno-shared  -mplt  -mno-plt  -mxgot  -mno-xgot @gol
 -mgp32  -mgp64  -mfp32  -mfp64  -mhard-float  -msoft-float @gol
 -msingle-float  -mdouble-float  -mdsp  -mno-dsp  -mdspr2  -mno-dspr2 @gol
+-mmcu -mmno-mcu @gol
 -mfpu=@var{fpu-type} @gol
 -msmartmips  -mno-smartmips @gol
 -mpaired-single  -mno-paired-single  -mdmx  -mno-mdmx @gol
@@ -15686,6 +15687,12 @@ The option @option{-mips3d} implies @option{-mpair
 @opindex mno-mt
 Use (do not use) MT Multithreading instructions.
 
+@item -mmcu
+@itemx -mno-mcu
+@opindex mmcu
+@opindex mno-mcu
+Use (do not use) the MIPS MCU ASE instructions.
+
 @item -mlong64
 @opindex mlong64
 Force @code{long} types to be 64 bits wide.  See @option{-mlong32} for
Index: config/mips/mips.opt
===================================================================
--- config/mips/mips.opt	(revision 189584)
+++ config/mips/mips.opt	(working copy)
@@ -269,6 +269,10 @@ mno-float
 Target Report RejectNegative Var(TARGET_NO_FLOAT) Condition(TARGET_SUPPORTS_NO_FLOAT)
 Prevent the use of all floating-point operations
 
+mmcu
+Target Report Mask(MCU)
+Use MCU instructions
+
 mno-flush-func
 Target RejectNegative
 Do not use a cache-flushing function before calling stack trampolines
Index: config/mips/mips.h
===================================================================
--- config/mips/mips.h	(revision 189584)
+++ config/mips/mips.h	(working copy)
@@ -386,6 +386,9 @@ struct mips_cpu_info {
       if (TARGET_SMARTMIPS)						\
 	builtin_define ("__mips_smartmips");				\
 									\
+      if (TARGET_MCU)							\
+	builtin_define ("__mips_mcu");					\
+									\
       if (TARGET_DSP)							\
 	{								\
 	  builtin_define ("__mips_dsp");				\
@@ -1120,6 +1123,7 @@ struct mips_cpu_info {
 %{mdmx} %{mno-mdmx:-no-mdmx} \
 %{mdsp} %{mno-dsp} \
 %{mdspr2} %{mno-dspr2} \
+%{mmcu} %{mno-mcu} \
 %{msmartmips} %{mno-smartmips} \
 %{mmt} %{mno-mt} \
 %{mfix-vr4120} %{mfix-vr4130} \

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [MIPS] Support for -mmcu and -mno-mcu
  2012-07-18 13:30 [PATCH] [MIPS] Support for -mmcu and -mno-mcu Moore, Catherine
@ 2012-07-18 17:22 ` Richard Sandiford
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2012-07-18 17:22 UTC (permalink / raw)
  To: Moore, Catherine; +Cc: gcc-patches, Rozycki, Maciej

"Moore, Catherine" <Catherine_Moore@mentor.com> writes:
> +mmcu
> +Target Report Mask(MCU)
> +Use MCU instructions

Please use Var(TARGET_MCU) instead, in order to avoid eating up
target_flags.  OK with that change, thanks.

Richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-18 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-18 13:30 [PATCH] [MIPS] Support for -mmcu and -mno-mcu Moore, Catherine
2012-07-18 17:22 ` Richard Sandiford

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).