Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Side by Side Diff: runtime/vm/assembler_ia32_test.cc

Issue 23745008: Follow-up fix to my change to IsPowerOfTwo: Alignment of one means no alignment, not zero. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698