| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 } | 928 } |
| 929 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { | 929 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { |
| 930 Register reg = saved_regs[i]; | 930 Register reg = saved_regs[i]; |
| 931 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { | 931 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { |
| 932 pop(reg); | 932 pop(reg); |
| 933 } | 933 } |
| 934 } | 934 } |
| 935 } | 935 } |
| 936 | 936 |
| 937 | 937 |
| 938 void MacroAssembler::Cvtlsi2sd(XMMRegister dst, Register src) { |
| 939 xorps(dst, dst); |
| 940 cvtlsi2sd(dst, src); |
| 941 } |
| 942 |
| 943 |
| 944 void MacroAssembler::Cvtlsi2sd(XMMRegister dst, const Operand& src) { |
| 945 xorps(dst, dst); |
| 946 cvtlsi2sd(dst, src); |
| 947 } |
| 948 |
| 949 |
| 938 void MacroAssembler::Set(Register dst, int64_t x) { | 950 void MacroAssembler::Set(Register dst, int64_t x) { |
| 939 if (x == 0) { | 951 if (x == 0) { |
| 940 xorl(dst, dst); | 952 xorl(dst, dst); |
| 941 } else if (is_uint32(x)) { | 953 } else if (is_uint32(x)) { |
| 942 movl(dst, Immediate(static_cast<uint32_t>(x))); | 954 movl(dst, Immediate(static_cast<uint32_t>(x))); |
| 943 } else if (is_int32(x)) { | 955 } else if (is_int32(x)) { |
| 944 movq(dst, Immediate(static_cast<int32_t>(x))); | 956 movq(dst, Immediate(static_cast<int32_t>(x))); |
| 945 } else { | 957 } else { |
| 946 movq(dst, x, RelocInfo::NONE64); | 958 movq(dst, x, RelocInfo::NONE64); |
| 947 } | 959 } |
| (...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2909 // the double array. | 2921 // the double array. |
| 2910 Set(kScratchRegister, BitCast<uint64_t>( | 2922 Set(kScratchRegister, BitCast<uint64_t>( |
| 2911 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); | 2923 FixedDoubleArray::canonical_not_the_hole_nan_as_double())); |
| 2912 movq(xmm_scratch, kScratchRegister); | 2924 movq(xmm_scratch, kScratchRegister); |
| 2913 jmp(&have_double_value, Label::kNear); | 2925 jmp(&have_double_value, Label::kNear); |
| 2914 | 2926 |
| 2915 bind(&smi_value); | 2927 bind(&smi_value); |
| 2916 // Value is a smi. convert to a double and store. | 2928 // Value is a smi. convert to a double and store. |
| 2917 // Preserve original value. | 2929 // Preserve original value. |
| 2918 SmiToInteger32(kScratchRegister, maybe_number); | 2930 SmiToInteger32(kScratchRegister, maybe_number); |
| 2919 cvtlsi2sd(xmm_scratch, kScratchRegister); | 2931 Cvtlsi2sd(xmm_scratch, kScratchRegister); |
| 2920 movsd(FieldOperand(elements, index, times_8, | 2932 movsd(FieldOperand(elements, index, times_8, |
| 2921 FixedDoubleArray::kHeaderSize - elements_offset), | 2933 FixedDoubleArray::kHeaderSize - elements_offset), |
| 2922 xmm_scratch); | 2934 xmm_scratch); |
| 2923 bind(&done); | 2935 bind(&done); |
| 2924 } | 2936 } |
| 2925 | 2937 |
| 2926 | 2938 |
| 2927 void MacroAssembler::CompareMap(Register obj, | 2939 void MacroAssembler::CompareMap(Register obj, |
| 2928 Handle<Map> map, | 2940 Handle<Map> map, |
| 2929 Label* early_success) { | 2941 Label* early_success) { |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4695 j(greater, &no_memento_available); | 4707 j(greater, &no_memento_available); |
| 4696 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), | 4708 CompareRoot(MemOperand(scratch_reg, -AllocationMemento::kSize), |
| 4697 Heap::kAllocationMementoMapRootIndex); | 4709 Heap::kAllocationMementoMapRootIndex); |
| 4698 bind(&no_memento_available); | 4710 bind(&no_memento_available); |
| 4699 } | 4711 } |
| 4700 | 4712 |
| 4701 | 4713 |
| 4702 } } // namespace v8::internal | 4714 } } // namespace v8::internal |
| 4703 | 4715 |
| 4704 #endif // V8_TARGET_ARCH_X64 | 4716 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |