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

Side by Side Diff: runtime/vm/simulator_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/simulator_arm.cc ('k') | runtime/vm/stub_code_ia32.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_MIPS) 10 #if defined(TARGET_ARCH_MIPS)
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 } else { 2107 } else {
2108 set_register(A0, parameter0); 2108 set_register(A0, parameter0);
2109 set_register(A1, parameter1); 2109 set_register(A1, parameter1);
2110 set_register(A2, parameter2); 2110 set_register(A2, parameter2);
2111 set_register(A3, parameter3); 2111 set_register(A3, parameter3);
2112 } 2112 }
2113 2113
2114 // Make sure the activation frames are properly aligned. 2114 // Make sure the activation frames are properly aligned.
2115 int32_t stack_pointer = sp_before_call; 2115 int32_t stack_pointer = sp_before_call;
2116 static const int kFrameAlignment = OS::ActivationFrameAlignment(); 2116 static const int kFrameAlignment = OS::ActivationFrameAlignment();
2117 if (kFrameAlignment > 0) { 2117 if (kFrameAlignment > 1) {
2118 stack_pointer = Utils::RoundDown(stack_pointer, kFrameAlignment); 2118 stack_pointer = Utils::RoundDown(stack_pointer, kFrameAlignment);
2119 } 2119 }
2120 set_register(SP, stack_pointer); 2120 set_register(SP, stack_pointer);
2121 2121
2122 // Prepare to execute the code at entry. 2122 // Prepare to execute the code at entry.
2123 set_pc(entry); 2123 set_pc(entry);
2124 // Put down marker for end of simulation. The simulator will stop simulation 2124 // Put down marker for end of simulation. The simulator will stop simulation
2125 // when the PC reaches this value. By saving the "end simulation" value into 2125 // when the PC reaches this value. By saving the "end simulation" value into
2126 // RA the simulation stops when returning to this call point. 2126 // RA the simulation stops when returning to this call point.
2127 set_register(RA, kEndSimulatingPC); 2127 set_register(RA, kEndSimulatingPC);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 2245 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
2246 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 2246 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
2247 buf->Longjmp(); 2247 buf->Longjmp();
2248 } 2248 }
2249 2249
2250 } // namespace dart 2250 } // namespace dart
2251 2251
2252 #endif // !defined(HOST_ARCH_MIPS) 2252 #endif // !defined(HOST_ARCH_MIPS)
2253 2253
2254 #endif // defined TARGET_ARCH_MIPS 2254 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698