OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/os.h" | 9 #include "vm/os.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 EXPECT_EQ(16, res); // 16 bytes emitted. | 1849 EXPECT_EQ(16, res); // 16 bytes emitted. |
1850 } | 1850 } |
1851 | 1851 |
1852 | 1852 |
1853 // Called from assembler_test.cc. | 1853 // Called from assembler_test.cc. |
1854 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { | 1854 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
1855 __ pushl(CTX); | 1855 __ pushl(CTX); |
1856 __ movl(CTX, Address(ESP, 2 * kWordSize)); | 1856 __ movl(CTX, Address(ESP, 2 * kWordSize)); |
1857 __ movl(EAX, Address(ESP, 3 * kWordSize)); | 1857 __ movl(EAX, Address(ESP, 3 * kWordSize)); |
1858 __ movl(ECX, Address(ESP, 4 * kWordSize)); | 1858 __ movl(ECX, Address(ESP, 4 * kWordSize)); |
| 1859 __ pushl(EAX); |
1859 __ StoreIntoObject(ECX, | 1860 __ StoreIntoObject(ECX, |
1860 FieldAddress(ECX, GrowableObjectArray::data_offset()), | 1861 FieldAddress(ECX, GrowableObjectArray::data_offset()), |
1861 EAX); | 1862 EAX); |
| 1863 __ popl(EAX); |
1862 __ popl(CTX); | 1864 __ popl(CTX); |
1863 __ ret(); | 1865 __ ret(); |
1864 } | 1866 } |
1865 | 1867 |
1866 | 1868 |
1867 } // namespace dart | 1869 } // namespace dart |
1868 | 1870 |
1869 #endif // defined TARGET_ARCH_IA32 | 1871 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |