Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Unified Diff: src/full-codegen/mips/full-codegen-mips.cc

Issue 1491223002: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in arm64. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/mips/full-codegen-mips.cc
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
index 6ce506d4f141de1b11cda2323c5e48f4c305ff86..b732ad1d4bd29dbb6d36196c941052719931bdcb 100644
--- a/src/full-codegen/mips/full-codegen-mips.cc
+++ b/src/full-codegen/mips/full-codegen-mips.cc
@@ -673,8 +673,8 @@ void FullCodeGenerator::DoTest(Expression* condition,
__ mov(a0, result_register());
Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate());
CallIC(ic, condition->test_id());
- __ mov(at, zero_reg);
- Split(ne, v0, Operand(at), if_true, if_false, fall_through);
+ __ LoadRoot(at, Heap::kTrueValueRootIndex);
+ Split(eq, result_register(), Operand(at), if_true, if_false, fall_through);
}
@@ -2071,7 +2071,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ mov(a0, v0);
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
CallIC(bool_ic);
- __ Branch(&l_try, eq, v0, Operand(zero_reg));
+ __ LoadRoot(at, Heap::kTrueValueRootIndex);
+ __ Branch(&l_try, ne, result_register(), Operand(at));
// result.value
__ pop(load_receiver); // result
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698