Commit ea472336 authored by Ivica Bogosavljevic's avatar Ivica Bogosavljevic Committed by Commit Bot

MIPS[64]: Add branch poisoning for FP compare operations

Change-Id: Ie52c6793736f38d1ab1f323b856f36587c46e7f9
Reviewed-on: https://chromium-review.googlesource.com/1059773Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#53255}
parent 71c05457
......@@ -2909,7 +2909,19 @@ void CodeGenerator::AssembleBranchPoisoning(FlagsCondition condition,
}
}
return;
case kMipsCmpS:
case kMipsCmpD: {
bool predicate;
FlagsConditionToConditionCmpFPU(predicate, condition);
if (predicate) {
__ LoadZeroIfFPUCondition(kSpeculationPoisonRegister);
} else {
__ LoadZeroIfNotFPUCondition(kSpeculationPoisonRegister);
}
}
return;
default:
UNREACHABLE();
break;
}
}
......
......@@ -3149,7 +3149,19 @@ void CodeGenerator::AssembleBranchPoisoning(FlagsCondition condition,
}
}
return;
case kMips64CmpS:
case kMips64CmpD: {
bool predicate;
FlagsConditionToConditionCmpFPU(predicate, condition);
if (predicate) {
__ LoadZeroIfFPUCondition(kSpeculationPoisonRegister);
} else {
__ LoadZeroIfNotFPUCondition(kSpeculationPoisonRegister);
}
}
return;
default:
UNREACHABLE();
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment