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

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

Issue 1574393002: Fix simarm and simmips builds on Mac. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | 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 <setjmp.h> // NOLINT 5 #include <setjmp.h> // NOLINT
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_ARM) 9 #if defined(TARGET_ARCH_ARM)
10 10
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 // Same effect on exclusive access state as an LDREX. 1167 // Same effect on exclusive access state as an LDREX.
1168 SetExclusiveAccess(reinterpret_cast<uword>(address)); 1168 SetExclusiveAccess(reinterpret_cast<uword>(address));
1169 } 1169 }
1170 return value; 1170 return value;
1171 } 1171 }
1172 1172
1173 1173
1174 uint32_t Simulator::CompareExchangeUint32(uint32_t* address, 1174 uint32_t Simulator::CompareExchangeUint32(uint32_t* address,
1175 uint32_t compare_value, 1175 uint32_t compare_value,
1176 uint32_t new_value) { 1176 uint32_t new_value) {
1177 ASSERT(sizeof(uword) == sizeof(uint32_t)); 1177 COMPILE_ASSERT(sizeof(uword) == sizeof(uint32_t));
1178 return CompareExchange(address, compare_value, new_value); 1178 return CompareExchange(reinterpret_cast<uword*>(address),
1179 static_cast<uword>(compare_value),
1180 static_cast<uword>(new_value));
1179 } 1181 }
1180 1182
1181 1183
1182 // Returns the top of the stack area to enable checking for stack pointer 1184 // Returns the top of the stack area to enable checking for stack pointer
1183 // validity. 1185 // validity.
1184 uword Simulator::StackTop() const { 1186 uword Simulator::StackTop() const {
1185 // To be safe in potential stack underflows we leave some buffer above and 1187 // To be safe in potential stack underflows we leave some buffer above and
1186 // set the stack top. 1188 // set the stack top.
1187 return StackBase() + 1189 return StackBase() +
1188 (OSThread::GetSpecifiedStackSize() + OSThread::kStackSizeBuffer); 1190 (OSThread::GetSpecifiedStackSize() + OSThread::kStackSizeBuffer);
(...skipping 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after
3894 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 3896 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
3895 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 3897 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
3896 buf->Longjmp(); 3898 buf->Longjmp();
3897 } 3899 }
3898 3900
3899 } // namespace dart 3901 } // namespace dart
3900 3902
3901 #endif // defined(USING_SIMULATOR) 3903 #endif // defined(USING_SIMULATOR)
3902 3904
3903 #endif // defined TARGET_ARCH_ARM 3905 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698