Commit 3bae8d6c authored by Sampson Gao's avatar Sampson Gao Committed by Commit Bot

S390: Fix missing unordered check for float

R=bjaideep@ca.ibm.com, jyan@ca.ibm.com, joransiu@ca.ibm.com

Bug: 
Change-Id: I80bbb38800c9c43e95045f5db5b63894a5a0711a
Reviewed-on: https://chromium-review.googlesource.com/614113Reviewed-by: 's avatarJaideep Bajwa <bjaideep@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47348}
parent cddbe282
......@@ -2406,7 +2406,7 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
FlagsCondition condition = branch->condition;
Condition cond = FlagsConditionToCondition(condition, op);
if (op == kS390_CmpDouble) {
if (op == kS390_CmpFloat || op == kS390_CmpDouble) {
// check for unordered if necessary
// Branching to flabel/tlabel according to what's expected by tests
if (cond == le || cond == eq || cond == lt) {
......@@ -2487,14 +2487,12 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
ArchOpcode op = instr->arch_opcode();
Condition cond = FlagsConditionToCondition(condition, op);
if (op == kS390_CmpDouble) {
if (op == kS390_CmpFloat || op == kS390_CmpDouble) {
// check for unordered if necessary
if (cond == le) {
if (cond == le || cond == eq || cond == lt) {
__ bunordered(&end);
// Unnecessary for eq/lt since only FU bit will be set.
} else if (cond == gt) {
} else if (cond == gt || cond == ne || cond == ge) {
__ bunordered(tlabel);
// Unnecessary for ne/ge since only FU bit will be set.
}
}
__ b(cond, tlabel);
......
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