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 | |
4614 void MacroAssembler::SetCounter(StatsCounter* counter, int value, | 4605 void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
4615 Register scratch1, Register scratch2) { | 4606 Register scratch1, Register scratch2) { |
4616 if (FLAG_native_code_counters && counter->Enabled()) { | 4607 if (FLAG_native_code_counters && counter->Enabled()) { |
4617 li(scratch1, Operand(value)); | 4608 li(scratch1, Operand(value)); |
4618 li(scratch2, Operand(ExternalReference(counter))); | 4609 li(scratch2, Operand(ExternalReference(counter))); |
4619 sw(scratch1, MemOperand(scratch2)); | 4610 sw(scratch1, MemOperand(scratch2)); |
4620 } | 4611 } |
4621 } | 4612 } |
4622 | 4613 |
4623 | 4614 |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6054 } | 6045 } |
6055 if (mag.shift > 0) sra(result, result, mag.shift); | 6046 if (mag.shift > 0) sra(result, result, mag.shift); |
6056 srl(at, dividend, 31); | 6047 srl(at, dividend, 31); |
6057 Addu(result, result, Operand(at)); | 6048 Addu(result, result, Operand(at)); |
6058 } | 6049 } |
6059 | 6050 |
6060 | 6051 |
6061 } } // namespace v8::internal | 6052 } } // namespace v8::internal |
6062 | 6053 |
6063 #endif // V8_TARGET_ARCH_MIPS | 6054 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |