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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 __ movl(ECX, Immediate(3)); | 487 __ movl(ECX, Immediate(3)); |
488 __ shll(EAX, Immediate(31)); | 488 __ shll(EAX, Immediate(31)); |
489 __ sarl(EAX, ECX); | 489 __ sarl(EAX, ECX); |
490 __ cmpl(EAX, Immediate(0xf0000000)); | 490 __ cmpl(EAX, Immediate(0xf0000000)); |
491 __ j(EQUAL, &donetest13); | 491 __ j(EQUAL, &donetest13); |
492 // Be sure to skip this crashing code. | 492 // Be sure to skip this crashing code. |
493 __ movl(EAX, Immediate(0)); | 493 __ movl(EAX, Immediate(0)); |
494 __ movl(Address(EAX, 0), EAX); | 494 __ movl(Address(EAX, 0), EAX); |
495 __ Bind(&donetest13); | 495 __ Bind(&donetest13); |
496 | 496 |
| 497 Label donetest14; |
| 498 __ subl(ESP, Immediate(kWordSize)); |
| 499 __ movl(Address(ESP, 0), Immediate(0x80000000)); |
| 500 __ movl(EAX, Immediate(0)); |
| 501 __ movl(ECX, Immediate(3)); |
| 502 __ sarl(Address(ESP, 0), ECX); |
| 503 __ shrd(Address(ESP, 0), EAX); |
| 504 __ cmpl(Address(ESP, 0), Immediate(0x1e000000)); |
| 505 __ j(EQUAL, &donetest14); |
| 506 __ int3(); |
| 507 __ Bind(&donetest14); |
| 508 __ addl(ESP, Immediate(kWordSize)); |
| 509 |
497 __ movl(EAX, Immediate(0)); | 510 __ movl(EAX, Immediate(0)); |
498 __ ret(); | 511 __ ret(); |
499 } | 512 } |
500 | 513 |
501 | 514 |
502 ASSEMBLER_TEST_RUN(LogicalOps, entry) { | 515 ASSEMBLER_TEST_RUN(LogicalOps, entry) { |
503 typedef int (*LogicalOpsCode)(); | 516 typedef int (*LogicalOpsCode)(); |
504 EXPECT_EQ(0, reinterpret_cast<LogicalOpsCode>(entry)()); | 517 EXPECT_EQ(0, reinterpret_cast<LogicalOpsCode>(entry)()); |
505 } | 518 } |
506 | 519 |
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 EAX); | 2096 EAX); |
2084 __ popl(EAX); | 2097 __ popl(EAX); |
2085 __ popl(CTX); | 2098 __ popl(CTX); |
2086 __ ret(); | 2099 __ ret(); |
2087 } | 2100 } |
2088 | 2101 |
2089 | 2102 |
2090 } // namespace dart | 2103 } // namespace dart |
2091 | 2104 |
2092 #endif // defined TARGET_ARCH_IA32 | 2105 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |