Hi, everybody. I am new to this news group but I have been using lcc
for a while.
I am currently in the process of implementing optimizations. This
specific optimization I want to perform has to estimating the size of
an address jump. My architecture sup****ts a couple of branching and
function calling instruction that can jump to different offsets. The
shorter instructions can sup****t shorter jumps and longer instructions
sup****t longer jumps.
My first approach to determine how far an instruction needs jump is to
count the number of instructions generated in between by lcc. That way
I can produce an lower bound of the address space size that the jump
is covering by multiplying instructions in between by the maximum
instruction length.
In order to determine how many instructions get emitted I need to
perform a code generation pass before the actual code generation. My
question is:
1. What is the recommended way of doing mult-p***** with lcc.
2. What is the recommended method to estimate the address space size
covered by jump instructions (branches or function calls)
Thank you very much.