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/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2306 __ VFPCompareAndSetFlags(input_reg, input_reg); | 2306 __ VFPCompareAndSetFlags(input_reg, input_reg); |
2307 EmitFalseBranch(instr, vc); | 2307 EmitFalseBranch(instr, vc); |
2308 | 2308 |
2309 Register scratch = scratch0(); | 2309 Register scratch = scratch0(); |
2310 __ VmovHigh(scratch, input_reg); | 2310 __ VmovHigh(scratch, input_reg); |
2311 __ cmp(scratch, Operand(kHoleNanUpper32)); | 2311 __ cmp(scratch, Operand(kHoleNanUpper32)); |
2312 EmitBranch(instr, eq); | 2312 EmitBranch(instr, eq); |
2313 } | 2313 } |
2314 | 2314 |
2315 | 2315 |
2316 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { | |
2317 Representation rep = instr->hydrogen()->value()->representation(); | |
2318 DCHECK(!rep.IsInteger32()); | |
2319 Register scratch = ToRegister(instr->temp()); | |
2320 | |
2321 if (rep.IsDouble()) { | |
2322 DwVfpRegister value = ToDoubleRegister(instr->value()); | |
2323 __ VFPCompareAndSetFlags(value, 0.0); | |
2324 EmitFalseBranch(instr, ne); | |
2325 __ VmovHigh(scratch, value); | |
2326 __ cmp(scratch, Operand(0x80000000)); | |
2327 } else { | |
2328 Register value = ToRegister(instr->value()); | |
2329 __ CheckMap(value, | |
2330 scratch, | |
2331 Heap::kHeapNumberMapRootIndex, | |
2332 instr->FalseLabel(chunk()), | |
2333 DO_SMI_CHECK); | |
2334 __ ldr(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset)); | |
2335 __ ldr(ip, FieldMemOperand(value, HeapNumber::kMantissaOffset)); | |
2336 __ cmp(scratch, Operand(0x80000000)); | |
2337 __ cmp(ip, Operand(0x00000000), eq); | |
2338 } | |
2339 EmitBranch(instr, eq); | |
2340 } | |
2341 | |
2342 | |
2343 Condition LCodeGen::EmitIsString(Register input, | 2316 Condition LCodeGen::EmitIsString(Register input, |
2344 Register temp1, | 2317 Register temp1, |
2345 Label* is_not_string, | 2318 Label* is_not_string, |
2346 SmiCheck check_needed = INLINE_SMI_CHECK) { | 2319 SmiCheck check_needed = INLINE_SMI_CHECK) { |
2347 if (check_needed == INLINE_SMI_CHECK) { | 2320 if (check_needed == INLINE_SMI_CHECK) { |
2348 __ JumpIfSmi(input, is_not_string); | 2321 __ JumpIfSmi(input, is_not_string); |
2349 } | 2322 } |
2350 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); | 2323 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); |
2351 | 2324 |
2352 return lt; | 2325 return lt; |
(...skipping 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5581 __ push(ToRegister(instr->function())); | 5554 __ push(ToRegister(instr->function())); |
5582 CallRuntime(Runtime::kPushBlockContext, instr); | 5555 CallRuntime(Runtime::kPushBlockContext, instr); |
5583 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5556 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5584 } | 5557 } |
5585 | 5558 |
5586 | 5559 |
5587 #undef __ | 5560 #undef __ |
5588 | 5561 |
5589 } // namespace internal | 5562 } // namespace internal |
5590 } // namespace v8 | 5563 } // namespace v8 |
OLD | NEW |