OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2465 __ VFPCompareAndSetFlags(input_reg, input_reg); | 2465 __ VFPCompareAndSetFlags(input_reg, input_reg); |
2466 EmitFalseBranch(instr, vc); | 2466 EmitFalseBranch(instr, vc); |
2467 | 2467 |
2468 Register scratch = scratch0(); | 2468 Register scratch = scratch0(); |
2469 __ VmovHigh(scratch, input_reg); | 2469 __ VmovHigh(scratch, input_reg); |
2470 __ cmp(scratch, Operand(kHoleNanUpper32)); | 2470 __ cmp(scratch, Operand(kHoleNanUpper32)); |
2471 EmitBranch(instr, eq); | 2471 EmitBranch(instr, eq); |
2472 } | 2472 } |
2473 | 2473 |
2474 | 2474 |
| 2475 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { |
| 2476 Representation rep = instr->hydrogen()->value()->representation(); |
| 2477 ASSERT(!rep.IsInteger32()); |
| 2478 Label if_false; |
| 2479 Register scratch = ToRegister(instr->temp()); |
| 2480 |
| 2481 if (rep.IsDouble()) { |
| 2482 DwVfpRegister value = ToDoubleRegister(instr->value()); |
| 2483 __ VFPCompareAndSetFlags(value, 0.0); |
| 2484 __ b(ne, &if_false); |
| 2485 __ VmovHigh(scratch, value); |
| 2486 __ cmp(scratch, Operand(0x80000000)); |
| 2487 } else { |
| 2488 Register value = ToRegister(instr->value()); |
| 2489 __ CheckMap( |
| 2490 value, scratch, Heap::kHeapNumberMapRootIndex, &if_false, DO_SMI_CHECK); |
| 2491 __ ldr(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset)); |
| 2492 __ ldr(ip, FieldMemOperand(value, HeapNumber::kMantissaOffset)); |
| 2493 __ cmp(scratch, Operand(0x80000000)); |
| 2494 __ cmp(ip, Operand(0x00000000), eq); |
| 2495 } |
| 2496 EmitBranch(instr, eq); |
| 2497 |
| 2498 __ bind(&if_false); |
| 2499 EmitFalseBranch(instr, al); |
| 2500 } |
| 2501 |
| 2502 |
2475 Condition LCodeGen::EmitIsObject(Register input, | 2503 Condition LCodeGen::EmitIsObject(Register input, |
2476 Register temp1, | 2504 Register temp1, |
2477 Label* is_not_object, | 2505 Label* is_not_object, |
2478 Label* is_object) { | 2506 Label* is_object) { |
2479 Register temp2 = scratch0(); | 2507 Register temp2 = scratch0(); |
2480 __ JumpIfSmi(input, is_not_object); | 2508 __ JumpIfSmi(input, is_not_object); |
2481 | 2509 |
2482 __ LoadRoot(temp2, Heap::kNullValueRootIndex); | 2510 __ LoadRoot(temp2, Heap::kNullValueRootIndex); |
2483 __ cmp(input, temp2); | 2511 __ cmp(input, temp2); |
2484 __ b(eq, is_object); | 2512 __ b(eq, is_object); |
(...skipping 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5875 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5903 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5876 __ ldr(result, FieldMemOperand(scratch, | 5904 __ ldr(result, FieldMemOperand(scratch, |
5877 FixedArray::kHeaderSize - kPointerSize)); | 5905 FixedArray::kHeaderSize - kPointerSize)); |
5878 __ bind(&done); | 5906 __ bind(&done); |
5879 } | 5907 } |
5880 | 5908 |
5881 | 5909 |
5882 #undef __ | 5910 #undef __ |
5883 | 5911 |
5884 } } // namespace v8::internal | 5912 } } // namespace v8::internal |
OLD | NEW |