| 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 "src/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" | 
| 6 | 6 | 
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" | 
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" | 
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" | 
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1159 | 1159 | 
| 1160 | 1160 | 
| 1161 void LCodeGen::DoFlooringDivByPowerOf2I(LFlooringDivByPowerOf2I* instr) { | 1161 void LCodeGen::DoFlooringDivByPowerOf2I(LFlooringDivByPowerOf2I* instr) { | 
| 1162   Register dividend = ToRegister(instr->dividend()); | 1162   Register dividend = ToRegister(instr->dividend()); | 
| 1163   Register result = ToRegister(instr->result()); | 1163   Register result = ToRegister(instr->result()); | 
| 1164   int32_t divisor = instr->divisor(); | 1164   int32_t divisor = instr->divisor(); | 
| 1165   Register scratch = result.is(dividend) ? scratch0() : dividend; | 1165   Register scratch = result.is(dividend) ? scratch0() : dividend; | 
| 1166   DCHECK(!result.is(dividend) || !scratch.is(dividend)); | 1166   DCHECK(!result.is(dividend) || !scratch.is(dividend)); | 
| 1167 | 1167 | 
| 1168   // If the divisor is 1, return the dividend. | 1168   // If the divisor is 1, return the dividend. | 
| 1169   if (divisor == 1) { | 1169   if (divisor > 0) { | 
| 1170     __ Move(result, dividend); | 1170     __ Move(result, dividend); | 
| 1171     return; | 1171     return; | 
| 1172   } | 1172   } | 
| 1173 | 1173 | 
| 1174   // If the divisor is positive, things are easy: There can be no deopts and we | 1174   // If the divisor is positive, things are easy: There can be no deopts and we | 
| 1175   // can simply do an arithmetic right shift. | 1175   // can simply do an arithmetic right shift. | 
| 1176   uint16_t shift = WhichPowerOf2Abs(divisor); | 1176   uint16_t shift = WhichPowerOf2Abs(divisor); | 
| 1177   if (divisor > 1) { | 1177   if (divisor > 1) { | 
| 1178     __ dsra(result, dividend, shift); | 1178     __ dsra(result, dividend, shift); | 
| 1179     return; | 1179     return; | 
| (...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3872                                               override_mode); | 3872                                               override_mode); | 
| 3873       CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3873       CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 
| 3874       __ jmp(&done); | 3874       __ jmp(&done); | 
| 3875       __ bind(&packed_case); | 3875       __ bind(&packed_case); | 
| 3876     } | 3876     } | 
| 3877 | 3877 | 
| 3878     ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode); | 3878     ArraySingleArgumentConstructorStub stub(isolate(), kind, override_mode); | 
| 3879     CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3879     CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 
| 3880     __ bind(&done); | 3880     __ bind(&done); | 
| 3881   } else { | 3881   } else { | 
| 3882     ArrayNArgumentsConstructorStub stub(isolate(), kind, override_mode); | 3882     ArrayNArgumentsConstructorStub stub(isolate()); | 
| 3883     CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3883     CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 
| 3884   } | 3884   } | 
| 3885 } | 3885 } | 
| 3886 | 3886 | 
| 3887 | 3887 | 
| 3888 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 3888 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 
| 3889   CallRuntime(instr->function(), instr->arity(), instr); | 3889   CallRuntime(instr->function(), instr->arity(), instr); | 
| 3890 } | 3890 } | 
| 3891 | 3891 | 
| 3892 | 3892 | 
| (...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5760   __ ld(result, FieldMemOperand(scratch, | 5760   __ ld(result, FieldMemOperand(scratch, | 
| 5761                                 FixedArray::kHeaderSize - kPointerSize)); | 5761                                 FixedArray::kHeaderSize - kPointerSize)); | 
| 5762   __ bind(deferred->exit()); | 5762   __ bind(deferred->exit()); | 
| 5763   __ bind(&done); | 5763   __ bind(&done); | 
| 5764 } | 5764 } | 
| 5765 | 5765 | 
| 5766 #undef __ | 5766 #undef __ | 
| 5767 | 5767 | 
| 5768 }  // namespace internal | 5768 }  // namespace internal | 
| 5769 }  // namespace v8 | 5769 }  // namespace v8 | 
| OLD | NEW | 
|---|