mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 19:54:22 -04:00
kern: implement SvcUnmapMemory, more of SvcGetInfo
This commit is contained in:
parent
faad5609b9
commit
1a0696f8a3
14 changed files with 231 additions and 37 deletions
|
@ -514,7 +514,8 @@ namespace ams::svc::codegen::impl {
|
|||
private:
|
||||
using Traits = FunctionTraits<Function>;
|
||||
public:
|
||||
using Impl = KernelSvcWrapperHelperImpl<_SvcAbiType, _UserAbiType, _KernelAbiType, typename Traits::ReturnType, typename Traits::ArgsType>;
|
||||
using Impl = KernelSvcWrapperHelperImpl<_SvcAbiType, _UserAbiType, _KernelAbiType, typename Traits::ReturnType, typename Traits::ArgsType>;
|
||||
using ReturnType = typename Traits::ReturnType;
|
||||
|
||||
static constexpr bool IsAarch64Kernel = std::is_same<_KernelAbiType, Aarch64Lp64Abi>::value;
|
||||
static constexpr bool IsAarch32Kernel = std::is_same<_KernelAbiType, Aarch32Ilp32Abi>::value;
|
||||
|
@ -525,17 +526,16 @@ namespace ams::svc::codegen::impl {
|
|||
static constexpr auto BeforeMetaCode = Impl::OptimizedBeforeMetaCode;
|
||||
static constexpr auto AfterMetaCode = Impl::OptimizedAfterMetaCode;
|
||||
|
||||
|
||||
/* Set omit-frame-pointer to prevent GCC from emitting MOV X29, SP instructions. */
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize ("omit-frame-pointer")
|
||||
|
||||
static ALWAYS_INLINE void WrapSvcFunction() {
|
||||
static ALWAYS_INLINE ReturnType WrapSvcFunction() {
|
||||
/* Generate appropriate assembly. */
|
||||
GenerateCodeForMetaCode<CodeGenerator, BeforeMetaCode>();
|
||||
ON_SCOPE_EXIT { GenerateCodeForMetaCode<CodeGenerator, AfterMetaCode>(); };
|
||||
|
||||
return reinterpret_cast<void (*)()>(Function)();
|
||||
return reinterpret_cast<ReturnType (*)()>(Function)();
|
||||
}
|
||||
|
||||
#pragma GCC pop_options
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue