Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index 486ddd93e45ea5d631f2272a23f6b7026502213b..bafd91908d77e06a0dabead94ba42d8cd23e6370 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -621,9 +621,8 @@ void FullCodeGenerator::DoTest(Expression* condition, |
Label* fall_through) { |
Handle<Code> ic = ToBooleanStub::GetUninitialized(isolate()); |
CallIC(ic, condition->test_id()); |
- __ test(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); |
} |
@@ -1977,8 +1976,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
CallLoadIC(NOT_INSIDE_TYPEOF); // result.done in eax |
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
CallIC(bool_ic); |
- __ test(eax, eax); |
- __ j(zero, &l_try); |
+ __ CompareRoot(result_register(), Heap::kTrueValueRootIndex); |
+ __ j(not_equal, &l_try); |
// result.value |
__ pop(load_receiver); // result |