| 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 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 DoubleRegister input_reg = ToDoubleRegister(instr->object()); | 2331 DoubleRegister input_reg = ToDoubleRegister(instr->object()); |
| 2332 EmitFalseBranchF(instr, eq, input_reg, input_reg); | 2332 EmitFalseBranchF(instr, eq, input_reg, input_reg); |
| 2333 | 2333 |
| 2334 Register scratch = scratch0(); | 2334 Register scratch = scratch0(); |
| 2335 __ FmoveHigh(scratch, input_reg); | 2335 __ FmoveHigh(scratch, input_reg); |
| 2336 EmitBranch(instr, eq, scratch, | 2336 EmitBranch(instr, eq, scratch, |
| 2337 Operand(static_cast<int32_t>(kHoleNanUpper32))); | 2337 Operand(static_cast<int32_t>(kHoleNanUpper32))); |
| 2338 } | 2338 } |
| 2339 | 2339 |
| 2340 | 2340 |
| 2341 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { | |
| 2342 Representation rep = instr->hydrogen()->value()->representation(); | |
| 2343 DCHECK(!rep.IsInteger32()); | |
| 2344 Register scratch = ToRegister(instr->temp()); | |
| 2345 | |
| 2346 if (rep.IsDouble()) { | |
| 2347 DoubleRegister value = ToDoubleRegister(instr->value()); | |
| 2348 EmitFalseBranchF(instr, ne, value, kDoubleRegZero); | |
| 2349 __ FmoveHigh(scratch, value); | |
| 2350 // Only use low 32-bits of value. | |
| 2351 __ dsll32(scratch, scratch, 0); | |
| 2352 __ dsrl32(scratch, scratch, 0); | |
| 2353 __ li(at, 0x80000000); | |
| 2354 } else { | |
| 2355 Register value = ToRegister(instr->value()); | |
| 2356 __ CheckMap(value, | |
| 2357 scratch, | |
| 2358 Heap::kHeapNumberMapRootIndex, | |
| 2359 instr->FalseLabel(chunk()), | |
| 2360 DO_SMI_CHECK); | |
| 2361 __ lwu(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset)); | |
| 2362 EmitFalseBranch(instr, ne, scratch, Operand(0x80000000)); | |
| 2363 __ lwu(scratch, FieldMemOperand(value, HeapNumber::kMantissaOffset)); | |
| 2364 __ mov(at, zero_reg); | |
| 2365 } | |
| 2366 EmitBranch(instr, eq, scratch, Operand(at)); | |
| 2367 } | |
| 2368 | |
| 2369 | |
| 2370 Condition LCodeGen::EmitIsString(Register input, | 2341 Condition LCodeGen::EmitIsString(Register input, |
| 2371 Register temp1, | 2342 Register temp1, |
| 2372 Label* is_not_string, | 2343 Label* is_not_string, |
| 2373 SmiCheck check_needed = INLINE_SMI_CHECK) { | 2344 SmiCheck check_needed = INLINE_SMI_CHECK) { |
| 2374 if (check_needed == INLINE_SMI_CHECK) { | 2345 if (check_needed == INLINE_SMI_CHECK) { |
| 2375 __ JumpIfSmi(input, is_not_string); | 2346 __ JumpIfSmi(input, is_not_string); |
| 2376 } | 2347 } |
| 2377 __ GetObjectType(input, temp1, temp1); | 2348 __ GetObjectType(input, temp1, temp1); |
| 2378 | 2349 |
| 2379 return lt; | 2350 return lt; |
| (...skipping 3425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5805 __ Push(at, ToRegister(instr->function())); | 5776 __ Push(at, ToRegister(instr->function())); |
| 5806 CallRuntime(Runtime::kPushBlockContext, instr); | 5777 CallRuntime(Runtime::kPushBlockContext, instr); |
| 5807 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5778 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5808 } | 5779 } |
| 5809 | 5780 |
| 5810 | 5781 |
| 5811 #undef __ | 5782 #undef __ |
| 5812 | 5783 |
| 5813 } // namespace internal | 5784 } // namespace internal |
| 5814 } // namespace v8 | 5785 } // namespace v8 |
| OLD | NEW |