| 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 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2666 __ add(esp, Immediate(kDoubleSize)); | 2666 __ add(esp, Immediate(kDoubleSize)); |
| 2667 int offset = sizeof(kHoleNanUpper32); | 2667 int offset = sizeof(kHoleNanUpper32); |
| 2668 __ cmp(MemOperand(esp, -offset), Immediate(kHoleNanUpper32)); | 2668 __ cmp(MemOperand(esp, -offset), Immediate(kHoleNanUpper32)); |
| 2669 EmitBranch(instr, equal); | 2669 EmitBranch(instr, equal); |
| 2670 } | 2670 } |
| 2671 | 2671 |
| 2672 | 2672 |
| 2673 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { | 2673 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { |
| 2674 Representation rep = instr->hydrogen()->value()->representation(); | 2674 Representation rep = instr->hydrogen()->value()->representation(); |
| 2675 ASSERT(!rep.IsInteger32()); | 2675 ASSERT(!rep.IsInteger32()); |
| 2676 Label if_false; | |
| 2677 Register scratch = ToRegister(instr->temp()); | 2676 Register scratch = ToRegister(instr->temp()); |
| 2678 | 2677 |
| 2679 if (rep.IsDouble()) { | 2678 if (rep.IsDouble()) { |
| 2680 CpuFeatureScope use_sse2(masm(), SSE2); | 2679 CpuFeatureScope use_sse2(masm(), SSE2); |
| 2681 XMMRegister value = ToDoubleRegister(instr->value()); | 2680 XMMRegister value = ToDoubleRegister(instr->value()); |
| 2682 XMMRegister xmm_scratch = double_scratch0(); | 2681 XMMRegister xmm_scratch = double_scratch0(); |
| 2683 __ xorps(xmm_scratch, xmm_scratch); | 2682 __ xorps(xmm_scratch, xmm_scratch); |
| 2684 __ ucomisd(xmm_scratch, value); | 2683 __ ucomisd(xmm_scratch, value); |
| 2685 __ j(not_equal, &if_false); | 2684 EmitFalseBranch(instr, not_equal); |
| 2686 __ movmskpd(scratch, value); | 2685 __ movmskpd(scratch, value); |
| 2687 __ test(scratch, Immediate(1)); | 2686 __ test(scratch, Immediate(1)); |
| 2688 EmitBranch(instr, not_zero); | 2687 EmitBranch(instr, not_zero); |
| 2689 } else { | 2688 } else { |
| 2690 Register value = ToRegister(instr->value()); | 2689 Register value = ToRegister(instr->value()); |
| 2691 Handle<Map> map = masm()->isolate()->factory()->heap_number_map(); | 2690 Handle<Map> map = masm()->isolate()->factory()->heap_number_map(); |
| 2692 __ CheckMap(value, map, &if_false, DO_SMI_CHECK); | 2691 __ CheckMap(value, map, instr->FalseLabel(chunk()), DO_SMI_CHECK); |
| 2693 __ cmp(FieldOperand(value, HeapNumber::kExponentOffset), | 2692 __ cmp(FieldOperand(value, HeapNumber::kExponentOffset), |
| 2694 Immediate(0x80000000)); | 2693 Immediate(0x80000000)); |
| 2695 __ j(not_equal, &if_false); | 2694 EmitFalseBranch(instr, not_equal); |
| 2696 __ cmp(FieldOperand(value, HeapNumber::kMantissaOffset), | 2695 __ cmp(FieldOperand(value, HeapNumber::kMantissaOffset), |
| 2697 Immediate(0x00000000)); | 2696 Immediate(0x00000000)); |
| 2698 EmitBranch(instr, equal); | 2697 EmitBranch(instr, equal); |
| 2699 } | 2698 } |
| 2700 | |
| 2701 __ bind(&if_false); | |
| 2702 EmitFalseBranch(instr, no_condition); | |
| 2703 } | 2699 } |
| 2704 | 2700 |
| 2705 | 2701 |
| 2706 Condition LCodeGen::EmitIsObject(Register input, | 2702 Condition LCodeGen::EmitIsObject(Register input, |
| 2707 Register temp1, | 2703 Register temp1, |
| 2708 Label* is_not_object, | 2704 Label* is_not_object, |
| 2709 Label* is_object) { | 2705 Label* is_object) { |
| 2710 __ JumpIfSmi(input, is_not_object); | 2706 __ JumpIfSmi(input, is_not_object); |
| 2711 | 2707 |
| 2712 __ cmp(input, isolate()->factory()->null_value()); | 2708 __ cmp(input, isolate()->factory()->null_value()); |
| (...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6481 FixedArray::kHeaderSize - kPointerSize)); | 6477 FixedArray::kHeaderSize - kPointerSize)); |
| 6482 __ bind(&done); | 6478 __ bind(&done); |
| 6483 } | 6479 } |
| 6484 | 6480 |
| 6485 | 6481 |
| 6486 #undef __ | 6482 #undef __ |
| 6487 | 6483 |
| 6488 } } // namespace v8::internal | 6484 } } // namespace v8::internal |
| 6489 | 6485 |
| 6490 #endif // V8_TARGET_ARCH_IA32 | 6486 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |