This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Simplification for pic code output
- To: egcs at egcs dot cygnus dot com
- Subject: Simplification for pic code output
- From: Marc Espie <Marc dot Espie at liafa dot jussieu dot fr>
- Date: Fri, 26 Feb 1999 18:00:17 +0100
The basic svr4 macros hold an interesting ASM_DECLARE_FUNCTION_SIZE
Basically, it declares a local label, and outputs a size directive computing
the difference between that label and the function beginning, e.g.,
_function:
...
Lfe#:
.size _function,Lfe#-_function
provided the assembler deals with the current address correctly (dot), this
can be trimmed down to:
_function
...
.size _function , .- _function
(which is what I've done for the OpenBSD configuration)
This is just a small detail, but this can be tried on a machine-by-machine
basis, and possibly used. I believe this second form to be slightly less
obfuscated (and it is slightly faster to boot, though this is largely
irrelevant).
--
Marc Espie
|anime, sf, juggling, unicycle, acrobatics, comics...
|AmigaOS, OpenBSD, C++, perl, Icon, PostScript...
| `real programmers don't die, they just get out of beta'