Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1875 | 1875 |
| 1876 // Fall through. | 1876 // Fall through. |
| 1877 __ jmp(&store_pointer); | 1877 __ jmp(&store_pointer); |
| 1878 | 1878 |
| 1879 | 1879 |
| 1880 if (!compiler->is_optimizing()) { | 1880 if (!compiler->is_optimizing()) { |
| 1881 locs()->live_registers()->Add(locs()->in(0)); | 1881 locs()->live_registers()->Add(locs()->in(0)); |
| 1882 locs()->live_registers()->Add(locs()->in(1)); | 1882 locs()->live_registers()->Add(locs()->in(1)); |
| 1883 } | 1883 } |
| 1884 | 1884 |
| 1885 // Manually preserve temp which could be clobbered on the slow path. | |
| 1886 locs()->live_registers()->Add(locs()->temp(0)); | |
|
Vyacheslav Egorov (Google)
2014/12/09 17:49:46
Actually I have been looking at this code and it d
zerny-google
2014/12/10 09:49:15
Your right, the updated patch set won't clobber te
| |
| 1887 | |
| 1885 { | 1888 { |
| 1886 __ Bind(&store_double); | 1889 __ Bind(&store_double); |
| 1887 EnsureMutableBox(compiler, | 1890 EnsureMutableBox(compiler, |
| 1888 this, | 1891 this, |
| 1889 temp, | 1892 temp, |
| 1890 compiler->double_class(), | 1893 compiler->double_class(), |
| 1891 instance_reg, | 1894 instance_reg, |
| 1892 offset_in_bytes_, | 1895 offset_in_bytes_, |
| 1893 temp2); | 1896 temp2); |
| 1894 __ movsd(fpu_temp, FieldAddress(value_reg, Double::value_offset())); | 1897 __ movsd(fpu_temp, FieldAddress(value_reg, Double::value_offset())); |
| (...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3793 break; | 3796 break; |
| 3794 default: | 3797 default: |
| 3795 UNREACHABLE(); | 3798 UNREACHABLE(); |
| 3796 break; | 3799 break; |
| 3797 } | 3800 } |
| 3798 if (can_pack_into_smi()) { | 3801 if (can_pack_into_smi()) { |
| 3799 __ SmiTag(result); | 3802 __ SmiTag(result); |
| 3800 } else { | 3803 } else { |
| 3801 // If the value cannot fit in a smi then allocate a mint box for it. | 3804 // If the value cannot fit in a smi then allocate a mint box for it. |
| 3802 Register temp = locs()->temp(0).reg(); | 3805 Register temp = locs()->temp(0).reg(); |
| 3806 // Temp register needs to be manually preserved on allocation slow-path. | |
| 3807 locs()->live_registers()->Add(locs()->temp(0), kUnboxedInt32); | |
| 3808 | |
| 3803 ASSERT(temp != result); | 3809 ASSERT(temp != result); |
| 3804 __ MoveRegister(temp, result); | 3810 __ MoveRegister(temp, result); |
| 3805 __ SmiTag(result); | 3811 __ SmiTag(result); |
| 3806 | 3812 |
| 3807 Label done; | 3813 Label done; |
| 3808 __ testl(temp, Immediate(0xC0000000)); | 3814 __ testl(temp, Immediate(0xC0000000)); |
| 3809 __ j(ZERO, &done); | 3815 __ j(ZERO, &done); |
| 3810 BoxAllocationSlowPath::Allocate( | 3816 BoxAllocationSlowPath::Allocate( |
| 3811 compiler, this, compiler->mint_class(), result, kNoRegister); | 3817 compiler, this, compiler->mint_class(), result, kNoRegister); |
| 3812 __ movl(FieldAddress(result, Mint::value_offset()), temp); | 3818 __ movl(FieldAddress(result, Mint::value_offset()), temp); |
| (...skipping 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6812 #if defined(DEBUG) | 6818 #if defined(DEBUG) |
| 6813 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 6819 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
| 6814 #endif | 6820 #endif |
| 6815 } | 6821 } |
| 6816 | 6822 |
| 6817 } // namespace dart | 6823 } // namespace dart |
| 6818 | 6824 |
| 6819 #undef __ | 6825 #undef __ |
| 6820 | 6826 |
| 6821 #endif // defined TARGET_ARCH_IA32 | 6827 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |