| 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 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 5996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6007 sd(scratch1, MemOperand(scratch2)); | 6007 sd(scratch1, MemOperand(scratch2)); |
| 6008 } | 6008 } |
| 6009 } | 6009 } |
| 6010 | 6010 |
| 6011 | 6011 |
| 6012 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value, | 6012 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value, |
| 6013 Register scratch1, Register scratch2) { | 6013 Register scratch1, Register scratch2) { |
| 6014 DCHECK(value > 0); | 6014 DCHECK(value > 0); |
| 6015 if (FLAG_native_code_counters && counter->Enabled()) { | 6015 if (FLAG_native_code_counters && counter->Enabled()) { |
| 6016 li(scratch2, Operand(ExternalReference(counter))); | 6016 li(scratch2, Operand(ExternalReference(counter))); |
| 6017 ld(scratch1, MemOperand(scratch2)); | 6017 lw(scratch1, MemOperand(scratch2)); |
| 6018 Daddu(scratch1, scratch1, Operand(value)); | 6018 Addu(scratch1, scratch1, Operand(value)); |
| 6019 sd(scratch1, MemOperand(scratch2)); | 6019 sw(scratch1, MemOperand(scratch2)); |
| 6020 } | 6020 } |
| 6021 } | 6021 } |
| 6022 | 6022 |
| 6023 | 6023 |
| 6024 void MacroAssembler::DecrementCounter(StatsCounter* counter, int value, | 6024 void MacroAssembler::DecrementCounter(StatsCounter* counter, int value, |
| 6025 Register scratch1, Register scratch2) { | 6025 Register scratch1, Register scratch2) { |
| 6026 DCHECK(value > 0); | 6026 DCHECK(value > 0); |
| 6027 if (FLAG_native_code_counters && counter->Enabled()) { | 6027 if (FLAG_native_code_counters && counter->Enabled()) { |
| 6028 li(scratch2, Operand(ExternalReference(counter))); | 6028 li(scratch2, Operand(ExternalReference(counter))); |
| 6029 ld(scratch1, MemOperand(scratch2)); | 6029 ld(scratch1, MemOperand(scratch2)); |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7337 if (mag.shift > 0) sra(result, result, mag.shift); | 7337 if (mag.shift > 0) sra(result, result, mag.shift); |
| 7338 srl(at, dividend, 31); | 7338 srl(at, dividend, 31); |
| 7339 Addu(result, result, Operand(at)); | 7339 Addu(result, result, Operand(at)); |
| 7340 } | 7340 } |
| 7341 | 7341 |
| 7342 | 7342 |
| 7343 } // namespace internal | 7343 } // namespace internal |
| 7344 } // namespace v8 | 7344 } // namespace v8 |
| 7345 | 7345 |
| 7346 #endif // V8_TARGET_ARCH_MIPS64 | 7346 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |