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

Side by Side Diff: runtime/vm/simulator_arm.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/os_win.cc ('k') | runtime/vm/simulator_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) 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 <math.h> // for isnan. 5 #include <math.h> // for isnan.
6 #include <setjmp.h> 6 #include <setjmp.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #if defined(TARGET_ARCH_ARM) 10 #if defined(TARGET_ARCH_ARM)
(...skipping 3547 matching lines...) Expand 10 before | Expand all | Expand 10 after
3558 } else { 3558 } else {
3559 set_register(R0, parameter0); 3559 set_register(R0, parameter0);
3560 set_register(R1, parameter1); 3560 set_register(R1, parameter1);
3561 set_register(R2, parameter2); 3561 set_register(R2, parameter2);
3562 set_register(R3, parameter3); 3562 set_register(R3, parameter3);
3563 } 3563 }
3564 3564
3565 // Make sure the activation frames are properly aligned. 3565 // Make sure the activation frames are properly aligned.
3566 int32_t stack_pointer = sp_before_call; 3566 int32_t stack_pointer = sp_before_call;
3567 static const int kFrameAlignment = OS::ActivationFrameAlignment(); 3567 static const int kFrameAlignment = OS::ActivationFrameAlignment();
3568 if (kFrameAlignment > 0) { 3568 if (kFrameAlignment > 1) {
3569 stack_pointer = Utils::RoundDown(stack_pointer, kFrameAlignment); 3569 stack_pointer = Utils::RoundDown(stack_pointer, kFrameAlignment);
3570 } 3570 }
3571 set_register(SP, stack_pointer); 3571 set_register(SP, stack_pointer);
3572 3572
3573 // Prepare to execute the code at entry. 3573 // Prepare to execute the code at entry.
3574 set_register(PC, entry); 3574 set_register(PC, entry);
3575 // Put down marker for end of simulation. The simulator will stop simulation 3575 // Put down marker for end of simulation. The simulator will stop simulation
3576 // when the PC reaches this value. By saving the "end simulation" value into 3576 // when the PC reaches this value. By saving the "end simulation" value into
3577 // the LR the simulation stops when returning to this call point. 3577 // the LR the simulation stops when returning to this call point.
3578 set_register(LR, kEndSimulatingPC); 3578 set_register(LR, kEndSimulatingPC);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
3668 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 3668 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
3669 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 3669 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
3670 buf->Longjmp(); 3670 buf->Longjmp();
3671 } 3671 }
3672 3672
3673 } // namespace dart 3673 } // namespace dart
3674 3674
3675 #endif // !defined(HOST_ARCH_ARM) 3675 #endif // !defined(HOST_ARCH_ARM)
3676 3676
3677 #endif // defined TARGET_ARCH_ARM 3677 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/os_win.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698