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).
21 KiB
21 KiB