This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Pass -mtune and -march options to assembler.


On Tue, May 26, 2009 at 10:51:09PM +0100, Paul Brook wrote:
> On Tuesday 26 May 2009, Valdimir Volynsky wrote:
> >   Paul Brook <paul@codesourcery.com> wrote:
> > > Or, even better, use the .arch directive that already
> > > exists and add .tune.
> >
> > IMHO, we have use only common for all assemblers
> > directives and do not create new one. Probably comment is
> > most safety choice.
> 
> Having assembler behavior depend on the contents of a comment sounds like a 
> truly terrible idea to me.

Don't look at mips-tfile then :-)

Basically, around 1990, I was faced with the problem of the only assembler for
MIPS being the system assembler for the DEC pmax, which had absolutely no way
to pass debug information in source form (the system compiler bypassed the
first pass of the assembler, and passed the instructions and debug symbol
tables in binary form to the second pass, but there was no way to set the 3rd
eye debug stuff in the text).

So, I wrote this hack that would take the assembler file and the object file
that was created, parse the assembler file comments for the debug primatives
and rewrite the object file adding the debug information.  Eventually, the MIPS
version of the GNU assembler was created and did away with the need for this
ugly hack.  However, when DEC moved from from the MIPS to the Alpha, they did
the same trick, and mips-tfile got resurected to on that platform.  :-)

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]