Skip to content
Commit 80fd9f3e authored by Zi Xuan Wu (Zeson)'s avatar Zi Xuan Wu (Zeson) Committed by Zi Xuan Wu
Browse files

[CSKY] Fix error of underestimated function size by save/restore R15(LR) when we use BSR far jump.

In CSKYConstantIslands, when fix up an unconditional branch(CSKY::BR32) whose destination is
too far away to fit in its displacement field, and if the R15(LR) register has been
spilled in the prologue, then we can use BSR to implement a far jump. So we need estimate function
size, and spill R15(LR) when the function size >= unconditional branch(CSKY::BR32) can reach.

EstimateFunctionSizeInBytes function adds up all instructions and constant pool entries(each entry is 4 bytes).
parent 94411035
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment