| 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 | 665 |
| 666 | 666 |
| 667 ASSEMBLER_TEST_RUN(Exchange, test) { | 667 ASSEMBLER_TEST_RUN(Exchange, test) { |
| 668 typedef int (*Exchange)(); | 668 typedef int (*Exchange)(); |
| 669 EXPECT_EQ(987654321 - 123456789, reinterpret_cast<Exchange>(test->entry())()); | 669 EXPECT_EQ(987654321 - 123456789, reinterpret_cast<Exchange>(test->entry())()); |
| 670 } | 670 } |
| 671 | 671 |
| 672 | 672 |
| 673 static int ComputeStackSpaceReservation(int needed, int fixed) { | 673 static int ComputeStackSpaceReservation(int needed, int fixed) { |
| 674 static const int kFrameAlignment = OS::ActivationFrameAlignment(); | 674 static const int kFrameAlignment = OS::ActivationFrameAlignment(); |
| 675 return (kFrameAlignment > 0) | 675 return (kFrameAlignment > 1) |
| 676 ? Utils::RoundUp(needed + fixed, kFrameAlignment) - fixed | 676 ? Utils::RoundUp(needed + fixed, kFrameAlignment) - fixed |
| 677 : needed; | 677 : needed; |
| 678 } | 678 } |
| 679 | 679 |
| 680 | 680 |
| 681 static int LeafReturn42() { | 681 static int LeafReturn42() { |
| 682 return 42; | 682 return 42; |
| 683 } | 683 } |
| 684 | 684 |
| 685 | 685 |
| (...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2853 FieldAddress(ECX, GrowableObjectArray::data_offset()), | 2853 FieldAddress(ECX, GrowableObjectArray::data_offset()), |
| 2854 EAX); | 2854 EAX); |
| 2855 __ popl(EAX); | 2855 __ popl(EAX); |
| 2856 __ popl(CTX); | 2856 __ popl(CTX); |
| 2857 __ ret(); | 2857 __ ret(); |
| 2858 } | 2858 } |
| 2859 | 2859 |
| 2860 } // namespace dart | 2860 } // namespace dart |
| 2861 | 2861 |
| 2862 #endif // defined TARGET_ARCH_IA32 | 2862 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |