Keil Logo

8051-Specific Optimizations

  • AJMP/ACALL Maximizing (Linker Optimization) (Level 0-7)
    The linker rearranges code segments to maximize AJMP and ACALL instructions which are shorter than LJMP and LCALL instructions.
  • Case/Switch Optimizing (Level 4)
    Code involving switch and case statements is optimized using jump tables or jump strings.
  • Data Overlaying (Level 2)
    Data and bit segments suitable for static overlay are identified and internally marked. The linker has the capability, through global data flow analysis, of selecting segments which can then be overlaid.
  • Extended Access Optimizing (Level 4)
    Variables from the IDATA, XDATA, PDATA and CODE areas are directly included in operations. Intermediate registers are frequently unnecessary.
  • Peephole Optimizing (Level 3)
    Redundant MOV instructions are removed. This includes unnecessary loading of objects from the memory as well as load operations with constants. Complex operations are replaced by simple operations when memory space or execution time can be saved.


  • Linker optimizations are performed by the LX51 Linker only. The BL51 Linker does not perform any optimizations.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.