This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA/PATCH]: sh64: Unnecessary use of datalabel operator
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Clarke, Stephen" <stephen dot clarke at superh dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, "Joern Rennecke" <amylaar at onetel dot net dot uk>
- Date: 09 Aug 2002 06:59:03 -0300
- Subject: Re: [RFA/PATCH]: sh64: Unnecessary use of datalabel operator
- Organization: GCC Team, Red Hat
- References: <287E4644B5249D449C56FA5409A874AE03C6DA@sh-us-ex01.us.w2k.superh.com>
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