[BusyBox] further ash size reduction

Aaron Lehmann aaronl at vitelus.com
Fri Aug 10 12:22:06 UTC 2001


On Fri, Aug 10, 2001 at 05:48:41AM -0600, Manuel Novoa III wrote:
> I modified vodz's tokendlist patch and cut out another 64 bytes by combining
> the parsekwd array with the tokname_array.

I wonder how it compares to my method of making tokendlist a bitmask:

/* Bitmask indicating which tokens mark the end of a list */
/* Equivilent to binary 100000001110000011111100010001 */
static const unsigned int tokendmask = 0x20383F11;
#define tokendlist(i) (tokendmask & (0x20000000 >> (i)))


> I also did a little more cleanup
> for the SIT function approach.  It can now be turned on or off independently
> from ASH_OPTIMIZE_FOR_SIZE.  Attached is a patch to be applied _after_
> applying my previous patch to the current version of ash.c in CVS.

Please use unified diffs.

> For what it is worth, with egcs-2.91.66 and the SIT function, I'm getting
> 
> size ash*.o
>    text	   data	    bss	    dec	    hex	filename
>   52976	     80	  10176	  63232	   f700	ashorig.o  - stock CVS version
>   48304	     56	  10208	  58568	   e4c8	ash.o      - with this patch applied
>   48496	     56	  10208	  58760	   e588	ashtbl.o   -   but no SIT function
>   
> I can trim another 64 bytes off the ashtbl version if I pack nibbles in
> the syntax_index_table (unless something has changed).

Try it!





More information about the busybox mailing list