public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/40171]  New: GCC does not pass -mtune and -march options to assembler!
@ 2009-05-16 14:18 vvv at ru dot ru
  2009-05-24 21:17 ` [Bug target/40171] " rguenth at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: vvv at ru dot ru @ 2009-05-16 14:18 UTC (permalink / raw)
  To: gcc-bugs

GNU Assembler support optimization options, but GCC does not pass -mtune and
-march options to assembler! For full optimization it's required to use this
twice:

# gcc ... -mtune=core2 -Wa,-mtune=core2

There is no default passing optimization options from GCC to AS. But many
programmers imply that passing. Because it's very strange to optimize code on
GCC-level and do not optimize on assembler level.

Even Linux kernel use -march without -Wa,-march.

PS. CCing to vvv@ru.ru, please.


-- 
           Summary: GCC does not pass -mtune and -march options to
                    assembler!
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vvv at ru dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
  2009-05-16 14:18 [Bug c/40171] New: GCC does not pass -mtune and -march options to assembler! vvv at ru dot ru
@ 2009-05-24 21:17 ` rguenth at gcc dot gnu dot org
  2009-05-25  0:46 ` sabre at nondot dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-24 21:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-24 21:17 -------
Confirmed.  But properly supporting this is a bit of a hassle because we need
to
support assemblers other than GNU as.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-05-24 21:17:12
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
  2009-05-16 14:18 [Bug c/40171] New: GCC does not pass -mtune and -march options to assembler! vvv at ru dot ru
  2009-05-24 21:17 ` [Bug target/40171] " rguenth at gcc dot gnu dot org
@ 2009-05-25  0:46 ` sabre at nondot dot org
  2009-05-25  0:55 ` pinskia at gcc dot gnu dot org
  2009-05-25 19:54 ` vvv at ru dot ru
  3 siblings, 0 replies; 9+ messages in thread
From: sabre at nondot dot org @ 2009-05-25  0:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sabre at nondot dot org  2009-05-25 00:46 -------
This is very odd?  What is the assembler doing that the compiler isn't?


-- 

sabre at nondot dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sabre at nondot dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
  2009-05-16 14:18 [Bug c/40171] New: GCC does not pass -mtune and -march options to assembler! vvv at ru dot ru
  2009-05-24 21:17 ` [Bug target/40171] " rguenth at gcc dot gnu dot org
  2009-05-25  0:46 ` sabre at nondot dot org
@ 2009-05-25  0:55 ` pinskia at gcc dot gnu dot org
  2009-05-25 19:54 ` vvv at ru dot ru
  3 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-25  0:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2009-05-25 00:55 -------
(In reply to comment #2)
> This is very odd?  What is the assembler doing that the compiler isn't?

different processors have better nops for different sizes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
  2009-05-16 14:18 [Bug c/40171] New: GCC does not pass -mtune and -march options to assembler! vvv at ru dot ru
                   ` (2 preceding siblings ...)
  2009-05-25  0:55 ` pinskia at gcc dot gnu dot org
@ 2009-05-25 19:54 ` vvv at ru dot ru
  3 siblings, 0 replies; 9+ messages in thread
From: vvv at ru dot ru @ 2009-05-25 19:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from vvv at ru dot ru  2009-05-25 19:54 -------
(In reply to comment #2)
> This is very odd?  What is the assembler doing that the compiler isn't?

There are exist some optimizations impossible without exact knowledge of
address and opcodes,
One example avoiding of branch mispredicts -
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942
Other example - Ensure instructions using 0xF7 opcode byte does not start at
offset 14 of a fetch line...

Unfortunately, current version GNU AS cat't do this optimizations.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
       [not found] <bug-40171-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-11-18 12:38 ` mahatma at eu dot by
@ 2011-04-15 16:33 ` mahatma at eu dot by
  3 siblings, 0 replies; 9+ messages in thread
From: mahatma at eu dot by @ 2011-04-15 16:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171

Dzianis Kahanovich <mahatma at eu dot by> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22444|0                           |1
        is obsolete|                            |

--- Comment #8 from Dzianis Kahanovich <mahatma at eu dot by> 2011-04-15 16:30:58 UTC ---
Created attachment 23999
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23999
atune-4.6.patch

Cleanup (+ unused macros), reduce code (ASM_SPEC_MTUNE moved to i386.h), adopt
to 4.6.


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
       [not found] <bug-40171-4@http.gcc.gnu.org/bugzilla/>
  2010-11-07 16:16 ` mahatma at eu dot by
  2010-11-17 19:26 ` mahatma at eu dot by
@ 2010-11-18 12:38 ` mahatma at eu dot by
  2011-04-15 16:33 ` mahatma at eu dot by
  3 siblings, 0 replies; 9+ messages in thread
From: mahatma at eu dot by @ 2010-11-18 12:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171

Dzianis Kahanovich <mahatma at eu dot by> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22434|0                           |1
        is obsolete|                            |

--- Comment #7 from Dzianis Kahanovich <mahatma at eu dot by> 2010-11-18 12:31:25 UTC ---
Created attachment 22444
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22444
atune2.patch

Bugfix & targets.


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
       [not found] <bug-40171-4@http.gcc.gnu.org/bugzilla/>
  2010-11-07 16:16 ` mahatma at eu dot by
@ 2010-11-17 19:26 ` mahatma at eu dot by
  2010-11-18 12:38 ` mahatma at eu dot by
  2011-04-15 16:33 ` mahatma at eu dot by
  3 siblings, 0 replies; 9+ messages in thread
From: mahatma at eu dot by @ 2010-11-17 19:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171

--- Comment #6 from Dzianis Kahanovich <mahatma at eu dot by> 2010-11-17 19:15:10 UTC ---
Created attachment 22434
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22434
atune.patch

Yes, I read maillist archives. But I don't know current state of process and
may suggest own solution (best for me). Sorry if not actual.

I pass only "native" march|mtune|Wa,-mtune - driver-i386.c -mtune results set
are more compatible with GAS -mtune. And host_detect_local_cpu changed to
process "astune" parameter and few (atom & generic) incompatible keywords.

There are only linux64.h changed. Others - likewise if somebody find this
useful.

patch produced on 5.0, but used on 4.5.


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

* [Bug target/40171] GCC does not pass -mtune and -march options to assembler!
       [not found] <bug-40171-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-07 16:16 ` mahatma at eu dot by
  2010-11-17 19:26 ` mahatma at eu dot by
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: mahatma at eu dot by @ 2010-11-07 16:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40171

Dzianis Kahanovich <mahatma at eu dot by> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mahatma at eu dot by

--- Comment #5 from Dzianis Kahanovich <mahatma at eu dot by> 2010-11-07 16:15:37 UTC ---
(In reply to comment #0)

> Even Linux kernel use -march without -Wa,-march.

If I pass "-Wa,-march=prescott" option to Linux kernel - they failed to build
(used wide range of directives like AMD's prefetch). IMHO only "-mtune" need to
be passed to not bound directives range.


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

end of thread, other threads:[~2011-04-15 16:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-16 14:18 [Bug c/40171] New: GCC does not pass -mtune and -march options to assembler! vvv at ru dot ru
2009-05-24 21:17 ` [Bug target/40171] " rguenth at gcc dot gnu dot org
2009-05-25  0:46 ` sabre at nondot dot org
2009-05-25  0:55 ` pinskia at gcc dot gnu dot org
2009-05-25 19:54 ` vvv at ru dot ru
     [not found] <bug-40171-4@http.gcc.gnu.org/bugzilla/>
2010-11-07 16:16 ` mahatma at eu dot by
2010-11-17 19:26 ` mahatma at eu dot by
2010-11-18 12:38 ` mahatma at eu dot by
2011-04-15 16:33 ` mahatma at eu dot by

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