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 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 4584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4595 | 4595 |
4596 | 4596 |
4597 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { | 4597 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { |
4598 DCHECK(!target.is(a1)); | 4598 DCHECK(!target.is(a1)); |
4599 GetBuiltinFunction(a1, id); | 4599 GetBuiltinFunction(a1, id); |
4600 // Load the code entry point from the builtins object. | 4600 // Load the code entry point from the builtins object. |
4601 lw(target, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); | 4601 lw(target, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); |
4602 } | 4602 } |
4603 | 4603 |
4604 | 4604 |
| 4605 void MacroAssembler::BranchIfNotBuiltin(Register function, Register temp, |
| 4606 BuiltinFunctionId id, Label* miss) { |
| 4607 DCHECK(!temp.is(at)); |
| 4608 lw(temp, FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
| 4609 lw(temp, FieldMemOperand(temp, SharedFunctionInfo::kFunctionDataOffset)); |
| 4610 Branch(miss, ne, temp, Operand(Smi::FromInt(id))); |
| 4611 } |
| 4612 |
| 4613 |
4605 void MacroAssembler::SetCounter(StatsCounter* counter, int value, | 4614 void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
4606 Register scratch1, Register scratch2) { | 4615 Register scratch1, Register scratch2) { |
4607 if (FLAG_native_code_counters && counter->Enabled()) { | 4616 if (FLAG_native_code_counters && counter->Enabled()) { |
4608 li(scratch1, Operand(value)); | 4617 li(scratch1, Operand(value)); |
4609 li(scratch2, Operand(ExternalReference(counter))); | 4618 li(scratch2, Operand(ExternalReference(counter))); |
4610 sw(scratch1, MemOperand(scratch2)); | 4619 sw(scratch1, MemOperand(scratch2)); |
4611 } | 4620 } |
4612 } | 4621 } |
4613 | 4622 |
4614 | 4623 |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6045 } | 6054 } |
6046 if (mag.shift > 0) sra(result, result, mag.shift); | 6055 if (mag.shift > 0) sra(result, result, mag.shift); |
6047 srl(at, dividend, 31); | 6056 srl(at, dividend, 31); |
6048 Addu(result, result, Operand(at)); | 6057 Addu(result, result, Operand(at)); |
6049 } | 6058 } |
6050 | 6059 |
6051 | 6060 |
6052 } } // namespace v8::internal | 6061 } } // namespace v8::internal |
6053 | 6062 |
6054 #endif // V8_TARGET_ARCH_MIPS | 6063 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |