Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 39a826c4091609127f4aaf874f297fed488a241f..4908e8d641c97fdf2483419d28136f264b0c02d7 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -636,9 +636,8 @@ void FullCodeGenerator::DoTest(Expression* condition, |
Label* fall_through) { |
Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate()); |
CallIC(ic, condition->test_id()); |
- __ testp(result_register(), result_register()); |
- // The stub returns nonzero for true. |
- Split(not_zero, if_true, if_false, fall_through); |
+ __ CompareRoot(result_register(), Heap::kTrueValueRootIndex); |
+ Split(equal, if_true, if_false, fall_through); |
} |
@@ -2007,8 +2006,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
CallLoadIC(NOT_INSIDE_TYPEOF); // rax=result.done |
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
CallIC(bool_ic); |
- __ testp(result_register(), result_register()); |
- __ j(zero, &l_try); |
+ __ CompareRoot(result_register(), Heap::kTrueValueRootIndex); |
+ __ j(not_equal, &l_try); |
// result.value |
__ Pop(load_receiver); // result |