Skip to content
  • justinbeech's avatar
    Found free extra 256 bytes of RAM eliminate _clz use from libgcc · 5255512b
    justinbeech authored
    Believe it or not, changing / 2^31 to >>31 saved 256 bytes in the "d" segment.
    
    The reason is that GCC version prior to 4.3.5 does not have a count_leading_zeros (clz) assembler macro, so it uses a 256 byte lookup table called _clz
    The _clz table gets pulled in if you do 64 bit division.
    This tiny change is the only place that we do long long division.
    Changing to a shift saves 256 bytes of ram.
    5255512b
Loading