| 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 5986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5997 zero_reg, | 5997 zero_reg, |
| 5998 Operand(zero_reg), | 5998 Operand(zero_reg), |
| 5999 bd); | 5999 bd); |
| 6000 } | 6000 } |
| 6001 | 6001 |
| 6002 void MacroAssembler::SetCounter(StatsCounter* counter, int value, | 6002 void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
| 6003 Register scratch1, Register scratch2) { | 6003 Register scratch1, Register scratch2) { |
| 6004 if (FLAG_native_code_counters && counter->Enabled()) { | 6004 if (FLAG_native_code_counters && counter->Enabled()) { |
| 6005 li(scratch1, Operand(value)); | 6005 li(scratch1, Operand(value)); |
| 6006 li(scratch2, Operand(ExternalReference(counter))); | 6006 li(scratch2, Operand(ExternalReference(counter))); |
| 6007 sd(scratch1, MemOperand(scratch2)); | 6007 sw(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 lw(scratch1, MemOperand(scratch2)); |
| 6030 Dsubu(scratch1, scratch1, Operand(value)); | 6030 Subu(scratch1, scratch1, Operand(value)); |
| 6031 sd(scratch1, MemOperand(scratch2)); | 6031 sw(scratch1, MemOperand(scratch2)); |
| 6032 } | 6032 } |
| 6033 } | 6033 } |
| 6034 | 6034 |
| 6035 | 6035 |
| 6036 // ----------------------------------------------------------------------------- | 6036 // ----------------------------------------------------------------------------- |
| 6037 // Debugging. | 6037 // Debugging. |
| 6038 | 6038 |
| 6039 void MacroAssembler::Assert(Condition cc, BailoutReason reason, | 6039 void MacroAssembler::Assert(Condition cc, BailoutReason reason, |
| 6040 Register rs, Operand rt) { | 6040 Register rs, Operand rt) { |
| 6041 if (emit_debug_code()) | 6041 if (emit_debug_code()) |
| (...skipping 1295 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 |