MIPS: Fix long branches being emitted mistakenly in floating-point branches

Due to a typo, long branches were emitted instead of short branches, and the
code would stop working at all in the situation when long branches must be
emitted. This patche fixes this issue.

TEST=mjsunit/wasm/embenchen/lua_binarytrees
BUG=

Review-Url: https://codereview.chromium.org/2351143002
Cr-Commit-Position: refs/heads/master@{#39552}
This commit is contained in:
ivica.bogosavljevic 2016-09-20 06:00:52 -07:00 committed by Commit bot
parent 4dab7b5a1d
commit 10b023c1ba
2 changed files with 5 additions and 4 deletions

View File

@ -2159,7 +2159,7 @@ void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
// Check for unordered (NaN) cases.
if (nan) {
bool long_branch =
nan->is_bound() ? is_near(nan) : is_trampoline_emitted();
nan->is_bound() ? !is_near(nan) : is_trampoline_emitted();
if (!IsMipsArchVariant(kMips32r6)) {
if (long_branch) {
Label skip;
@ -2198,7 +2198,7 @@ void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
if (target) {
bool long_branch =
target->is_bound() ? is_near(target) : is_trampoline_emitted();
target->is_bound() ? !is_near(target) : is_trampoline_emitted();
if (long_branch) {
Label skip;
Condition neg_cond = NegateFpuCondition(cond);

View File

@ -2379,7 +2379,8 @@ void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
DCHECK(nan || target);
// Check for unordered (NaN) cases.
if (nan) {
bool long_branch = nan->is_bound() ? is_near(nan) : is_trampoline_emitted();
bool long_branch =
nan->is_bound() ? !is_near(nan) : is_trampoline_emitted();
if (kArchVariant != kMips64r6) {
if (long_branch) {
Label skip;
@ -2419,7 +2420,7 @@ void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
if (target) {
bool long_branch =
target->is_bound() ? is_near(target) : is_trampoline_emitted();
target->is_bound() ? !is_near(target) : is_trampoline_emitted();
if (long_branch) {
Label skip;
Condition neg_cond = NegateFpuCondition(cond);