| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 ASSEMBLER_TEST_GENERATE(Bitwise, assembler) { | 338 ASSEMBLER_TEST_GENERATE(Bitwise, assembler) { |
| 339 __ movl(ECX, Immediate(42)); | 339 __ movl(ECX, Immediate(42)); |
| 340 __ xorl(ECX, ECX); | 340 __ xorl(ECX, ECX); |
| 341 __ orl(ECX, Immediate(256)); | 341 __ orl(ECX, Immediate(256)); |
| 342 __ movl(EAX, Immediate(4)); | 342 __ movl(EAX, Immediate(4)); |
| 343 __ orl(ECX, EAX); | 343 __ orl(ECX, EAX); |
| 344 __ movl(EAX, Immediate(0xfff0)); | 344 __ movl(EAX, Immediate(0xfff0)); |
| 345 __ andl(ECX, EAX); | 345 __ andl(ECX, EAX); |
| 346 __ movl(EAX, Immediate(1)); | 346 __ movl(EAX, Immediate(1)); |
| 347 __ orl(ECX, EAX); | 347 __ orl(ECX, EAX); |
| 348 __ xorl(ECX, Immediate(0)); |
| 348 __ movl(EAX, ECX); | 349 __ movl(EAX, ECX); |
| 349 __ ret(); | 350 __ ret(); |
| 350 } | 351 } |
| 351 | 352 |
| 352 | 353 |
| 353 ASSEMBLER_TEST_RUN(Bitwise, entry) { | 354 ASSEMBLER_TEST_RUN(Bitwise, entry) { |
| 354 typedef int (*Bitwise)(); | 355 typedef int (*Bitwise)(); |
| 355 EXPECT_EQ(256 + 1, reinterpret_cast<Bitwise>(entry)()); | 356 EXPECT_EQ(256 + 1, reinterpret_cast<Bitwise>(entry)()); |
| 356 } | 357 } |
| 357 | 358 |
| (...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 FieldAddress(ECX, GrowableObjectArray::data_offset()), | 1860 FieldAddress(ECX, GrowableObjectArray::data_offset()), |
| 1860 EAX); | 1861 EAX); |
| 1861 __ popl(CTX); | 1862 __ popl(CTX); |
| 1862 __ ret(); | 1863 __ ret(); |
| 1863 } | 1864 } |
| 1864 | 1865 |
| 1865 | 1866 |
| 1866 } // namespace dart | 1867 } // namespace dart |
| 1867 | 1868 |
| 1868 #endif // defined TARGET_ARCH_IA32 | 1869 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |