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: [RFA/PATCH]: sh64: Unnecessary use of datalabel operator


On Aug  7, 2002, "Clarke, Stephen" <stephen.clarke@superh.com> wrote:

> Gcc for sh64 applies the datalabel operator to all non-function
> symbol references.

That's because I couldn't find any requirement for data symbols to be
placed in data sections.  If the definition of symbols goes in
non-standard sections, and a C translation unit just sees the symbol
declared as extern, it should use datalabel.

The assembly manual specifically recommended using datalabel when
willing to take the real address of a symbol, so this is what was
implemented, and I think it is the only safe way to make sure you get
the expected result in all cases.

I agree there is room for improvement for data symbols local to the
current translation unit that are know to be part of a data section,
but even then, I'd rather see datalabel just for consistency.


Oh, and thanks for fixing the register usage in the argument decoder,
and sorry about my goof.  I'm very surprised this has survived so
wrong for so long :-(

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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