mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Fixed issue with microMIPS long branch.
llvm-svn: 195975
This commit is contained in:
parent
65ab9582ba
commit
b3e74abf46
@ -437,8 +437,10 @@ bool MipsLongBranch::runOnMachineFunction(MachineFunction &F) {
|
||||
if (!I->Br || I->HasLongBranch)
|
||||
continue;
|
||||
|
||||
int ShVal = TM.getSubtarget<MipsSubtarget>().inMicroMipsMode() ? 2 : 4;
|
||||
|
||||
// Check if offset fits into 16-bit immediate field of branches.
|
||||
if (!ForceLongBranch && isInt<16>(computeOffset(I->Br) / 4))
|
||||
if (!ForceLongBranch && isInt<16>(computeOffset(I->Br) / ShVal))
|
||||
continue;
|
||||
|
||||
I->HasLongBranch = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user