it would be nice if there was a pragma like
"dont_cross_a_2k_block" to allow use of the (2-byte)
acall, ajmp instructions instead of their 3-byte relatives.
Benefit would typically be a reduction of 0.5 to 2% of
Logged In: YES
For a device that only contains 2k of code memory (or a
program not larger than 2k) this is easy. Use a peephole
rule that unconditionally replaces all lcall and ljmp
instructions by acall and ajmp.
For larger programs a possible solution is to use peephole
rules with a new In2kRange condition. This limits ajmp and
acall to within every object. Then the linker should be
told to keep the object inside a 2k block.
Currently the linker cannot do that but it will generate
an error if the acall/ajmp is out of range.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.