thermosphere: sysreg traps

This commit is contained in:
TuxSH
2020-02-25 00:28:14 +00:00
parent 797cea0ac8
commit 0437867449
7 changed files with 272 additions and 251 deletions

View File

@@ -101,12 +101,12 @@ namespace ams::hvisor {
}
template<typename T = u64>
constexpr T ReadFrameRegister(u32 id) const
constexpr T ReadRegister(u32 id) const
{
static_assert(std::is_integral_v<T> && std::is_unsigned_v<T>);
return id == 31 ? static_cast<T>(0u) /* xzr */ : static_cast<T>(x[id]);
}
constexpr void WriteFrameRegister(u32 id, u64 val)
constexpr void WriteRegister(u32 id, u64 val)
{
if (id != 31) {
// If not xzr