mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 16:55:08 +00:00
Fixes DBC build for Mac
Also, adds an option to the GN build for DBC R=johnmccutchan@google.com Review URL: https://codereview.chromium.org/1910453003 .
This commit is contained in:
parent
f9d033b82f
commit
a7295bbb2a
|
@ -42,6 +42,8 @@ config("dart_config") {
|
|||
defines += [ "TARGET_ARCH_X64" ]
|
||||
} else if (dart_target_arch == "ia32") {
|
||||
defines += [ "TARGET_ARCH_IA32" ]
|
||||
} else if (dart_target_arch == "dbc") {
|
||||
defines += [ "TARGET_ARCH_DBC" ]
|
||||
} else {
|
||||
print("Invalid |dart_target_arch|")
|
||||
assert(false)
|
||||
|
@ -112,6 +114,8 @@ config("dart_config_no_precompiler") {
|
|||
defines += [ "TARGET_ARCH_X64" ]
|
||||
} else if (dart_target_arch == "ia32") {
|
||||
defines += [ "TARGET_ARCH_IA32" ]
|
||||
} else if (dart_target_arch == "dbc") {
|
||||
defines += [ "TARGET_ARCH_DBC" ]
|
||||
} else {
|
||||
print("Invalid |dart_target_arch|")
|
||||
assert(false)
|
||||
|
|
|
@ -479,7 +479,11 @@ const intptr_t kExceptionObjectReg = 0;
|
|||
const intptr_t kStackTraceObjectReg = 0;
|
||||
const intptr_t CTX = 0;
|
||||
|
||||
enum FpuRegister { kNoFpuRegister = -1, kFakeFpuRegister };
|
||||
enum FpuRegister {
|
||||
kNoFpuRegister = -1,
|
||||
kFakeFpuRegister,
|
||||
kNumberOfDummyFpuRegisters,
|
||||
};
|
||||
const FpuRegister FpuTMP = kFakeFpuRegister;
|
||||
const intptr_t kNumberOfFpuRegisters = 1;
|
||||
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
#include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
|
||||
#if defined(TARGET_ARCH_DBC)
|
||||
|
||||
#include "vm/instructions.h"
|
||||
#include "vm/instructions_dbc.h"
|
||||
|
||||
#include "vm/assembler.h"
|
||||
#include "vm/constants_dbc.h"
|
||||
#include "vm/cpu.h"
|
||||
#include "vm/instructions.h"
|
||||
#include "vm/object.h"
|
||||
|
||||
namespace dart {
|
||||
|
@ -164,6 +166,7 @@ void SwitchableCallPattern::SetLookupStub(const Code& lookup_stub) const {
|
|||
|
||||
|
||||
ReturnPattern::ReturnPattern(uword pc) : pc_(pc) {
|
||||
USE(pc_);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -169,6 +169,8 @@ intptr_t OS::ActivationFrameAlignment() {
|
|||
return 16; // iOS simulator
|
||||
#elif TARGET_ARCH_X64
|
||||
return 16; // iOS simulator
|
||||
#elif TARGET_ARCH_DBC
|
||||
return 16;
|
||||
#else
|
||||
#error Unimplemented
|
||||
#endif
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue