OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 5100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5111 switch (op) { | 5111 switch (op) { |
5112 case Token::IN: | 5112 case Token::IN: |
5113 VisitForStackValue(expr->right()); | 5113 VisitForStackValue(expr->right()); |
5114 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); | 5114 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); |
5115 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 5115 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
5116 __ LoadRoot(t0, Heap::kTrueValueRootIndex); | 5116 __ LoadRoot(t0, Heap::kTrueValueRootIndex); |
5117 Split(eq, v0, Operand(t0), if_true, if_false, fall_through); | 5117 Split(eq, v0, Operand(t0), if_true, if_false, fall_through); |
5118 break; | 5118 break; |
5119 | 5119 |
5120 case Token::INSTANCEOF: { | 5120 case Token::INSTANCEOF: { |
5121 VisitForStackValue(expr->right()); | 5121 VisitForAccumulatorValue(expr->right()); |
5122 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); | 5122 __ mov(a0, result_register()); |
| 5123 __ pop(a1); |
| 5124 InstanceOfStub stub(isolate()); |
5123 __ CallStub(&stub); | 5125 __ CallStub(&stub); |
5124 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5126 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
5125 // The stub returns 0 for true. | 5127 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
5126 Split(eq, v0, Operand(zero_reg), if_true, if_false, fall_through); | 5128 Split(eq, v0, Operand(at), if_true, if_false, fall_through); |
5127 break; | 5129 break; |
5128 } | 5130 } |
5129 | 5131 |
5130 default: { | 5132 default: { |
5131 VisitForAccumulatorValue(expr->right()); | 5133 VisitForAccumulatorValue(expr->right()); |
5132 Condition cc = CompareIC::ComputeCondition(op); | 5134 Condition cc = CompareIC::ComputeCondition(op); |
5133 __ mov(a0, result_register()); | 5135 __ mov(a0, result_register()); |
5134 __ pop(a1); | 5136 __ pop(a1); |
5135 | 5137 |
5136 bool inline_smi_code = ShouldInlineSmiCase(op); | 5138 bool inline_smi_code = ShouldInlineSmiCase(op); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5376 reinterpret_cast<uint32_t>( | 5378 reinterpret_cast<uint32_t>( |
5377 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5379 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5378 return OSR_AFTER_STACK_CHECK; | 5380 return OSR_AFTER_STACK_CHECK; |
5379 } | 5381 } |
5380 | 5382 |
5381 | 5383 |
5382 } // namespace internal | 5384 } // namespace internal |
5383 } // namespace v8 | 5385 } // namespace v8 |
5384 | 5386 |
5385 #endif // V8_TARGET_ARCH_MIPS | 5387 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |