ashtian01 / optiboot

Automatically exported from code.google.com/p/optiboot
0 stars 0 forks source link

Save a bit of space (about 38 bytes of flash) #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In general, the available registers are underutilized in binaries produced by 
the C compiler.  Especially the "not-quite-general-purpose" registers R2 to 
R15.  I was poking around to see if these could be used to save some space...

Apparently we could save over 30 bytes of flash space by moving the "address" 
and "length" variables into registers instead of memory.  This also requires 
manually inlining getlen(), or it gets bigger for unobvious reasons.

Obviously this is not a bug, and is not currently needed.  However, it might be 
useful to get back some space in the future.  Diffs attached.

Original issue reported on code.google.com by wes...@gmail.com on 22 Jan 2011 at 8:09

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by wes...@gmail.com on 29 Oct 2011 at 5:27

GoogleCodeExporter commented 8 years ago
Fixed as part of the great optiboot/Arduino sync-up
http://code.google.com/p/optiboot/source/detail?r=8559b64fd093d3976cae58778a1540
256cde5c8e

Original comment by wes...@gmail.com on 30 Oct 2011 at 8:19