From 541c5507538137b9cc5fd0579221aaecf59a89b1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 29 Sep 2018 19:58:21 -0400 Subject: kernel/svc: Implement svcGetThreadContext() Now that we have all of the rearranging and proper structure sizes in place, it's fairly trivial to implement svcGetThreadContext(). In the 64-bit case we can more or less just write out the context as is, minus some minor value sanitizing. In the 32-bit case we'll need to clear out the registers that wouldn't normally be accessible from a 32-bit AArch32 exectuable (or process). --- src/core/hle/kernel/svc_wrap.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/hle/kernel/svc_wrap.h') diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h index fea9ba5ea..22712e64f 100644 --- a/src/core/hle/kernel/svc_wrap.h +++ b/src/core/hle/kernel/svc_wrap.h @@ -64,6 +64,11 @@ void SvcWrap() { FuncReturn(func(Param(0), (s32)Param(1)).raw); } +template +void SvcWrap() { + FuncReturn(func(Param(0), static_cast(Param(1))).raw); +} + template void SvcWrap() { u64 param_1 = 0; -- cgit v1.2.3