| 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 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 return; | 1844 return; |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 if (IsPotentialUnboxedStore()) { | 1847 if (IsPotentialUnboxedStore()) { |
| 1848 __ Comment("PotentialUnboxedStore"); | 1848 __ Comment("PotentialUnboxedStore"); |
| 1849 Register value_reg = locs()->in(1).reg(); | 1849 Register value_reg = locs()->in(1).reg(); |
| 1850 Register temp = locs()->temp(0).reg(); | 1850 Register temp = locs()->temp(0).reg(); |
| 1851 Register temp2 = locs()->temp(1).reg(); | 1851 Register temp2 = locs()->temp(1).reg(); |
| 1852 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); | 1852 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); |
| 1853 | 1853 |
| 1854 if (ShouldEmitStoreBarrier()) { |
| 1855 // Value input is a writable register and should be manually preserved |
| 1856 // across allocation slow-path. |
| 1857 locs()->live_registers()->Add(locs()->in(1), kTagged); |
| 1858 } |
| 1859 |
| 1854 Label store_pointer; | 1860 Label store_pointer; |
| 1855 Label store_double; | 1861 Label store_double; |
| 1856 Label store_float32x4; | 1862 Label store_float32x4; |
| 1857 Label store_float64x2; | 1863 Label store_float64x2; |
| 1858 | 1864 |
| 1859 __ LoadObject(temp, Field::ZoneHandle(field().raw())); | 1865 __ LoadObject(temp, Field::ZoneHandle(field().raw())); |
| 1860 | 1866 |
| 1861 __ cmpl(FieldAddress(temp, Field::is_nullable_offset()), | 1867 __ cmpl(FieldAddress(temp, Field::is_nullable_offset()), |
| 1862 Immediate(kNullCid)); | 1868 Immediate(kNullCid)); |
| 1863 __ j(EQUAL, &store_pointer); | 1869 __ j(EQUAL, &store_pointer); |
| (...skipping 4592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6456 Register out = locs()->out(0).reg(); | 6462 Register out = locs()->out(0).reg(); |
| 6457 | 6463 |
| 6458 if (out != value) { | 6464 if (out != value) { |
| 6459 __ movl(out, value); | 6465 __ movl(out, value); |
| 6460 } | 6466 } |
| 6461 __ shll(out, Immediate(1)); | 6467 __ shll(out, Immediate(1)); |
| 6462 if (!ValueFitsSmi()) { | 6468 if (!ValueFitsSmi()) { |
| 6463 Label done; | 6469 Label done; |
| 6464 __ j(NO_OVERFLOW, &done); | 6470 __ j(NO_OVERFLOW, &done); |
| 6465 // Allocate a mint. | 6471 // Allocate a mint. |
| 6472 // Value input is writable register and has to be manually preserved |
| 6473 // on the slow path. |
| 6474 locs()->live_registers()->Add(locs()->in(0), kUnboxedInt32); |
| 6466 BoxAllocationSlowPath::Allocate( | 6475 BoxAllocationSlowPath::Allocate( |
| 6467 compiler, this, compiler->mint_class(), out, kNoRegister); | 6476 compiler, this, compiler->mint_class(), out, kNoRegister); |
| 6468 __ movl(FieldAddress(out, Mint::value_offset()), value); | 6477 __ movl(FieldAddress(out, Mint::value_offset()), value); |
| 6469 __ sarl(value, Immediate(31)); // Sign extend. | 6478 __ sarl(value, Immediate(31)); // Sign extend. |
| 6470 __ movl(FieldAddress(out, Mint::value_offset() + kWordSize), value); | 6479 __ movl(FieldAddress(out, Mint::value_offset() + kWordSize), value); |
| 6471 __ Bind(&done); | 6480 __ Bind(&done); |
| 6472 } | 6481 } |
| 6473 } | 6482 } |
| 6474 | 6483 |
| 6475 | 6484 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7028 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 7037 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
| 7029 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 7038 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
| 7030 #endif | 7039 #endif |
| 7031 } | 7040 } |
| 7032 | 7041 |
| 7033 } // namespace dart | 7042 } // namespace dart |
| 7034 | 7043 |
| 7035 #undef __ | 7044 #undef __ |
| 7036 | 7045 |
| 7037 #endif // defined TARGET_ARCH_IA32 | 7046 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |