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

Unified Diff: src/full-codegen/mips64/full-codegen-mips64.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/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/mips64/full-codegen-mips64.cc
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc
index c61eb7eeca2664464ab766c4ba60690951809ec2..2e3974b62beff15583b9a96a547af7b0dbe88514 100644
--- a/src/full-codegen/mips64/full-codegen-mips64.cc
+++ b/src/full-codegen/mips64/full-codegen-mips64.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);
}
@@ -2069,7 +2069,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/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698