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

Side by Side Diff: runtime/vm/assembler_mips.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_test.cc ('k') | runtime/vm/assembler_x64.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 // Adjust SP for PC, RA, FP, PP pushed in EnterDartFrame, and return. 823 // Adjust SP for PC, RA, FP, PP pushed in EnterDartFrame, and return.
824 Ret(); 824 Ret();
825 delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize)); 825 delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize));
826 } 826 }
827 827
828 828
829 void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) { 829 void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) {
830 // Reserve space for arguments and align frame before entering 830 // Reserve space for arguments and align frame before entering
831 // the C++ world. 831 // the C++ world.
832 AddImmediate(SP, -frame_space); 832 AddImmediate(SP, -frame_space);
833 if (OS::ActivationFrameAlignment() > 0) { 833 if (OS::ActivationFrameAlignment() > 1) {
834 LoadImmediate(TMP1, ~(OS::ActivationFrameAlignment() - 1)); 834 LoadImmediate(TMP1, ~(OS::ActivationFrameAlignment() - 1));
835 and_(SP, SP, TMP1); 835 and_(SP, SP, TMP1);
836 } 836 }
837 } 837 }
838 838
839 839
840 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) { 840 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
841 const intptr_t kPushedRegistersSize = 841 const intptr_t kPushedRegistersSize =
842 kDartVolatileCpuRegCount * kWordSize + 842 kDartVolatileCpuRegCount * kWordSize +
843 2 * kWordSize + // FP and RA. 843 2 * kWordSize + // FP and RA.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 Bind(&msg); 978 Bind(&msg);
979 break_(Instr::kMsgMessageCode); 979 break_(Instr::kMsgMessageCode);
980 } 980 }
981 #endif 981 #endif
982 } 982 }
983 983
984 } // namespace dart 984 } // namespace dart
985 985
986 #endif // defined TARGET_ARCH_MIPS 986 #endif // defined TARGET_ARCH_MIPS
987 987
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32_test.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698