[BusyBox] Ash digest for 08/09

Aaron Lehmann aaronl at vitelus.com
Thu Aug 9 16:35:53 MDT 2001


On Thu, Aug 09, 2001 at 01:26:00PM -0600, Manuel Novoa III wrote:
> Your addcmd() is only called a few times from 1 function.  I'd try setjmp
> vs. "return code and test" and see which was smaller.

"return code and test" added 64 bytes. "setjmp and longjmp" added 128.
I've attached a version of the megapatch that checks the realloc
results and has the caller always check the return value of addcmd.

I noticed that the mask param of addcmd could easilly be made into a
global, and I tried it, but gcc actually produced worse code! Why, I'm
not sure, but it replaced the push's with decrements of the stack
pointer by 4. Maybe it wants the stack alligned on 16 byte boundaries
for some reason, so adding a fourth arg to the function is actually
_beneficial_?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ash-return.diff.gz
Type: application/octet-stream
Size: 13308 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20010809/cea85218/ash-return.diff.obj


More information about the busybox mailing list