kern: implement SvcCreateThread, SvcStartThread

This commit is contained in:
Michael Scire committed 2020-07-10 11:55:33 -07:00
1 parent 9503aae522
commit 7f4c6ae9e7
5 files changed
+95 -6

No files matched your search

@@ -173,4 +173,19 @@ namespace ams::kern::arch::arm64 {
}
}
void KThreadContext::CloneFpuStatus() {
u64 pcr, psr;
cpu::InstructionMemoryBarrier();
if (IsFpuEnabled()) {
__asm__ __volatile__("mrs %[pcr], fpcr" : [pcr]"=r"(pcr) :: "memory");
__asm__ __volatile__("mrs %[psr], fpsr" : [psr]"=r"(psr) :: "memory");
} else {
pcr = GetCurrentThread().GetContext().GetFpcr();
psr = GetCurrentThread().GetContext().GetFpsr();
}
this->SetFpcr(pcr);
this->SetFpsr(psr);
}
}