This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Simplification for pic code output



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'