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

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 1910453003: Fixes DBC build for Mac (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/os_macos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 780e44f4842099043972d641ddb1a0594c3872cf..8623a643e1db258ea960f2d3abdb5679f76cd1d7 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -356,7 +356,8 @@ DART_FORCE_INLINE static bool SignedAddWithOverflow(int32_t lhs,
intptr_t* out) {
int32_t res = 1;
#if defined(HAS_ADD_OVERFLOW)
- res = static_cast<int32_t>(__builtin_sadd_overflow(lhs, rhs, out));
+ res = static_cast<int32_t>(__builtin_sadd_overflow(
+ lhs, rhs, reinterpret_cast<int32_t*>(out)));
#elif defined(__i386__)
asm volatile(
"add %2, %1\n"
@@ -389,7 +390,8 @@ DART_FORCE_INLINE static bool SignedSubWithOverflow(int32_t lhs,
intptr_t* out) {
int32_t res = 1;
#if defined(HAS_SUB_OVERFLOW)
- res = static_cast<int32_t>(__builtin_ssub_overflow(lhs, rhs, out));
+ res = static_cast<int32_t>(__builtin_ssub_overflow(
+ lhs, rhs, reinterpret_cast<int32_t*>(out)));
#elif defined(__i386__)
asm volatile(
"sub %2, %1\n"
@@ -422,7 +424,8 @@ DART_FORCE_INLINE static bool SignedMulWithOverflow(int32_t lhs,
intptr_t* out) {
int32_t res = 1;
#if defined(HAS_MUL_OVERFLOW)
- res = static_cast<int32_t>(__builtin_smul_overflow(lhs, rhs, out));
+ res = static_cast<int32_t>(__builtin_smul_overflow(
+ lhs, rhs, reinterpret_cast<int32_t*>(out)));
#elif defined(__i386__)
asm volatile(
"imul %2, %1\n"
@@ -466,7 +469,7 @@ DART_FORCE_INLINE static bool AreBothSmis(intptr_t a, intptr_t b) {
#define SMI_LT(lhs, rhs, pres) SMI_COND(<, lhs, rhs, pres)
#define SMI_GT(lhs, rhs, pres) SMI_COND(>, lhs, rhs, pres)
#define SMI_BITOR(lhs, rhs, pres) ((*(pres) = (lhs | rhs)), false)
-#define SMI_BITAND(lhs, rhs, pres) ((*(pres) = (lhs & rhs)), false)
+#define SMI_BITAND(lhs, rhs, pres) ((*(pres) = ((lhs) & (rhs))), false)
void Simulator::CallRuntime(Thread* thread,
« no previous file with comments | « runtime/vm/os_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698