[RFA/PATCH]: sh64: Unnecessary use of datalabel operator

Clarke, Stephen stephen.clarke@superh.com
Wed Aug 7 11:47:00 GMT 2002


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

This is unnecessary: the datalabel operator is only required in
the rare circumstance that you require the true address of a code
symbol, rather than the address plus the ISA encoded in the lowest
bit.  In particular, it should never be necessary to apply
datalabel to a data symbol.

The only places in gcc output I can think of where datalabel
is truly necessary is in the code sequence generated for a case
jump table, and for the address of a trampoline template.  Please
tell me if there are others.

The many unnecessary uses of datalabel make the .s file larger
and less readable.  They also require extra processing in the
assembler and linker, and make symbol tables bigger in objects
and dynamic objects.

The attached file contains a patch to remove the generation of
datalabel, except in the places it is needed.  It has been
regression tested on sh64-elf/sh64-sim and sh-elf/sh-hms-sim.

Steve.
--
Stephen Clarke, Principal Engineer, SuperH Inc.
Phone:1-408-273-3146, Fax:1-408-273-3199, mailto:Stephen.Clarke@superh.com
Mail:  SuperH Inc., 405 River Oaks Pkwy, San Jose, CA 95134, USA.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: datalabel.patch
Type: application/octet-stream
Size: 4280 bytes
Desc: datalabel.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020807/18f8c361/attachment.obj>


More information about the Gcc-patches mailing list