[vm] Fix Fuchsia RISC-V build.

TEST=local build
Change-Id: If21f38e98d76c962519434504dfc5003332831ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/464783
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak
2025-12-01 12:47:18 -08:00
committed by Commit Queue
parent 43f234799e
commit e1ea898cbf
4 changed files with 12 additions and 12 deletions
+5 -1
View File
@@ -1703,7 +1703,11 @@ void NativeEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ PushNativeCalleeSavedRegisters();
#if defined(USING_SHADOW_CALL_STACK)
#if defined(DART_TARGET_OS_FUCHSIA) || defined(DART_TARGET_OS_ANDROID)
__ sx(GP,
compiler::Address(
THR, compiler::target::Thread::saved_shadow_call_stack_offset()));
#elif defined(USING_SHADOW_CALL_STACK)
#error Unimplemented
#endif
@@ -486,7 +486,7 @@ void StubCodeCompiler::GenerateFfiCallbackTrampolineStub() {
#if defined(DART_TARGET_OS_FUCHSIA)
// TODO(https://dartbug.com/52579): Remove.
if (FLAG_precompiled_mode) {
GenerateLoadBSSEntry(BSS::Relocation::DRT_ExitIsolateGroupBoundIsolate,
GenerateLoadBSSEntry(BSS::Relocation::DLRT_ExitIsolateGroupBoundIsolate,
T1, T2);
} else {
const intptr_t kPCRelativeLoadOffset = 12;
+2 -6
View File
@@ -464,14 +464,10 @@ int64_t OS::GetCurrentMonotonicMicrosForTimeline() {
#endif
}
// TODO(5411554): May need to hoist these architecture dependent code
// into a architecture specific file e.g: os_ia32_fuchsia.cc
intptr_t OS::ActivationFrameAlignment() {
#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) || \
defined(TARGET_ARCH_ARM64)
#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64) || \
defined(TARGET_ARCH_RISCV64)
const int kMinimumAlignment = 16;
#elif defined(TARGET_ARCH_ARM)
const int kMinimumAlignment = 8;
#else
#error Unsupported architecture.
#endif
+4 -4
View File
@@ -92,10 +92,10 @@ class ThreadInterrupterFuchsia : public AllStatic {
state->lr = static_cast<uintptr_t>(regs.lr);
#elif defined(TARGET_ARCH_RISCV64)
state->pc = static_cast<uintptr_t>(regs.pc);
state->fp = static_cast<uintptr_t>(regs.r[FPREG]);
state->csp = static_cast<uintptr_t>(regs.r[SPREG]);
state->dsp = static_cast<uintptr_t>(regs.r[SPREG]);
state->lr = static_cast<uintptr_t>(regs.r[LINK_REGISTER]);
state->fp = static_cast<uintptr_t>(regs.s0);
state->csp = static_cast<uintptr_t>(regs.sp);
state->dsp = static_cast<uintptr_t>(regs.sp);
state->lr = static_cast<uintptr_t>(regs.ra);
#else
#error "Unsupported architecture"
#endif