This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Pass -mtune and -march options to assembler.
- From: "Valdimir Volynsky" <vvv at ru dot ru>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 02 Jun 2009 21:43:31 +0400
- Subject: Re: [PATCH] Pass -mtune and -march options to assembler.
- References: <web-655551951@zbackend1.aha.ru> <200905261539.51071.paul@codesourcery.com> <web-659882722@zbackend1.aha.ru> <200905262251.09820.paul@codesourcery.com> <web-661253921@zbackend1.aha.ru> <4A1EBF3A.9030601@codesourcery.com> <web-665634208@zbackend1.aha.ru> <4A203D91.3000401@codesourcery.com> <web-666596970@zbackend1.aha.ru> <4A2058B8.8090905@codesourcery.com> <web-667508064@zbackend1.aha.ru> <4A214E03.9000108@gmail.com>
Hi!
This patch fixes PR 40171 by passing optimization option
-mtune to GNU assembler. Not all cpu_type passed!
2009-06-02 Vladimir Volynsky <vvv@ru.ru>
PR target/40171
* gcc.c (process_command): Pass -mtune to the GNU
assembler.
--- gcc/gcc.c 2009-06-02 21:26:13.000000000 +0400
+++ gcc/gcc.c.vv 2009-06-02 21:27:28.000000000 +0400
@@ -3749,6 +3749,34 @@ process_command (int argc, const
char **
print_multi_os_directory = 1;
else if (! strcmp (argv[i],
"-print-sysroot-headers-suffix"))
print_sysroot_headers_suffix = 1;
+#ifdef HAVE_GNU_AS
+ else if (! strncmp (argv[i], "-mtune=", 7))
+ {
+ /* Pass -mtune option to the assembler.
+ It's options supported by GNU AS 2.19.1
+ This option can be overridden by assembler option -Wa,
*/
+ if( (!strcmp (argv[i]+7,"i386"))
+ ||(!strcmp (argv[i]+7,"i486"))
+ ||(!strcmp (argv[i]+7,"pentium"))
+ ||(!strcmp (argv[i]+7,"pentiumpro"))
+ ||(!strcmp (argv[i]+7,"pentium4"))
+ ||(!strcmp (argv[i]+7,"prescott"))
+ ||(!strcmp (argv[i]+7,"nocona"))
+ ||(!strcmp (argv[i]+7,"core2"))
+ ||(!strcmp (argv[i]+7,"k6"))
+ ||(!strcmp (argv[i]+7,"athlon"))
+ ||(!strcmp (argv[i]+7,"k8"))
+ ||(!strcmp (argv[i]+7,"amdfam10"))
+ )
+ add_assembler_option (argv[i], strlen ( argv[i] ) );
+ else if (!strcmp (argv[i]+7,"pentium2"))
+ add_assembler_option ("-mtune=pentiumii", 16 );
+ else if (!strcmp (argv[i]+7,"pentium3"))
+ add_assembler_option ("-mtune=pentiumiii", 17 );
+ else if (!strcmp (argv[i]+7,"k6-2"))
+ add_assembler_option ("-mtune=k6_2", 11 );
+ }
+#endif
else if (! strncmp (argv[i], "-Wa,", 4))
{
int prev, j;
Ok for trunk?
Regards,
Vladimir Volynsky
---
Professional hosting for everyone - http://www.host.ru