Skip to content

Commit 9953843

Browse files
Boris UlasevichPaul Hohensee
authored andcommitted
8365166: ARM32: missing os::fetch_bcp_from_context implementation
Reviewed-by: shade Backport-of: 001aaa1e49f2692061cad44d68c9e81a27ea3b98
1 parent 2ca492d commit 9953843

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,16 @@ frame os::fetch_compiled_frame_from_context(const void* ucVoid) {
209209
}
210210

211211
intptr_t* os::fetch_bcp_from_context(const void* ucVoid) {
212-
Unimplemented();
213-
return nullptr;
212+
assert(ucVoid != nullptr, "invariant");
213+
const ucontext_t* uc = (const ucontext_t*)ucVoid;
214+
assert(os::Posix::ucontext_is_interpreter(uc), "invariant");
215+
#if (FP_REG_NUM == 11)
216+
assert(Rbcp == R7, "expected FP=R11, Rbcp=R7");
217+
return (intptr_t*)uc->uc_mcontext.arm_r7;
218+
#else
219+
assert(Rbcp == R11, "expected FP=R7, Rbcp=R11");
220+
return (intptr_t*)uc->uc_mcontext.arm_fp; // r11
221+
#endif
214222
}
215223

216224
frame os::get_sender_for_C_frame(frame* fr) {

0 commit comments

Comments
 (0)