Skip to content

Commit c216bab

Browse files
committed
Updated guesses at fp register / more architectures
1 parent c785bbc commit c216bab

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/coreclr/vm/gcinfodecoder.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,15 +2202,27 @@ template <> OBJECTREF* TGcInfoDecoder<InterpreterGcInfoEncoding>::GetStackSlot(
22022202
uint8_t* fp = (uint8_t *)
22032203
#if defined(TARGET_AMD64)
22042204
pRD->pCurrentContext->Rbp;
2205-
#elif defined(TARGET_ARM) || defined(TARGET_ARM64)
2206-
pRD->pCurrentContext->R7;
2205+
#elif defined(TARGET_ARM)
2206+
// FIXME: CONTEXTGetFp says R7 but cgencpu.h says R11
2207+
pRD->pCurrentContext->R11;
2208+
#elif defined(TARGET_ARM64)
2209+
// Speculative based on cgencpu.h
2210+
pRD->pCurrentContext->Fp;
2211+
#elif defined(TARGET_LOONGARCH)
2212+
// Speculative based on cgencpu.h
2213+
pRD->pCurrentContext->Fp;
2214+
#elif defined(TARGET_RISCV64)
2215+
// Speculative based on cgencpu.h
2216+
pRD->pCurrentContext->Fp;
22072217
#elif defined(TARGET_S390X)
2218+
// Speculative based on CONTEXTGetFp
22082219
pRD->pCurrentContext->R11;
22092220
#elif defined(TARGET_POWERPC64)
2221+
// Speculative based on CONTEXTGetFp
22102222
pRD->pCurrentContext->R31;
22112223
#else
22122224
NULL;
2213-
_ASSERTE(!"Unimplemented architecture for GetStackSlot");
2225+
_ASSERTE(!"Unimplemented architecture for TGcInfoDecoder<InterpreterGcInfoEncoding>::GetStackSlot");
22142226
return NULL;
22152227
#endif
22162228

0 commit comments

Comments
 (0)