[vm] Fix building simriscv64 on Mac.
TEST=local Change-Id: I1a385ffb3fa26ee9a11af6a3088864c49aa8f03a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247900 Reviewed-by: Daco Harkes <dacoharkes@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
@@ -92,19 +92,23 @@ static_assert(offsetof(AbiAlignmentUint64, i) == 8,
|
||||
#error Unknown arch
|
||||
#endif
|
||||
|
||||
#if defined(USING_SIMULATOR)
|
||||
#define ABI_ENUM_VALUE3 kNone
|
||||
const char* target_abi_name = "none";
|
||||
#else
|
||||
#define ABI_ENUM_VALUE1(os, arch) k##os##arch
|
||||
#define ABI_ENUM_VALUE2(os, arch) ABI_ENUM_VALUE1(os, arch)
|
||||
#define ABI_ENUM_VALUE3 ABI_ENUM_VALUE2(DART_TARGET_OS_NAME, TARGET_ARCH_NAME)
|
||||
#define STRINGIFY2(s) STRINGIFY(s)
|
||||
#define STRINGIFY(s) #s
|
||||
const char* target_abi_name =
|
||||
STRINGIFY2(DART_TARGET_OS_NAME_LC) "_" STRINGIFY2(TARGET_ARCH_NAME_LC);
|
||||
#endif
|
||||
|
||||
Abi TargetAbi() {
|
||||
return Abi::ABI_ENUM_VALUE3;
|
||||
}
|
||||
|
||||
#define STRINGIFY2(s) STRINGIFY(s)
|
||||
#define STRINGIFY(s) #s
|
||||
|
||||
const char* target_abi_name =
|
||||
STRINGIFY2(DART_TARGET_OS_NAME_LC) "_" STRINGIFY2(TARGET_ARCH_NAME_LC);
|
||||
|
||||
} // namespace ffi
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ enum class Abi {
|
||||
kWindowsArm64,
|
||||
kWindowsIA32,
|
||||
kWindowsX64,
|
||||
|
||||
kNone, // E.g., simulators.
|
||||
};
|
||||
|
||||
const int64_t num_abis = static_cast<int64_t>(Abi::kWindowsX64) + 1;
|
||||
|
||||
@@ -1601,9 +1601,10 @@ void Simulator::InterpretECALL(Instr instr) {
|
||||
// Fake instruction generated by Assembler::SimulatorPrintObject.
|
||||
if (true || IsTracingExecution()) {
|
||||
uintx_t raw = get_xreg(instr.rs1());
|
||||
Object& obj = Object::Handle(static_cast<ObjectPtr>(raw));
|
||||
THR_Print("%" Px ": %s = %s\n", pc_, cpu_reg_names[instr.rs1()],
|
||||
obj.ToCString());
|
||||
Object& obj =
|
||||
Object::Handle(static_cast<ObjectPtr>(static_cast<uword>(raw)));
|
||||
THR_Print("%" Px ": %s = %s\n", static_cast<uword>(pc_),
|
||||
cpu_reg_names[instr.rs1()], obj.ToCString());
|
||||
FLAG_trace_sim_after = 1;
|
||||
}
|
||||
pc_ += instr.length();
|
||||
|
||||
Reference in New Issue
Block a user