ref: 4d96bacd35e6afcf86e1791b0747ef752951b014
parent: 07af9be3a94690b3f4141d6919224937b83c3f40
author: cinap_lenrek <[email protected]>
date: Thu Jun 20 09:17:36 EDT 2019
bcm, kw, omap, teg2: implement setregisters()
--- a/sys/src/9/bcm/arch.c
+++ b/sys/src/9/bcm/arch.c
@@ -74,7 +74,9 @@
void
setregisters(Ureg* ureg, char* pureg, char* uva, int n)
{
- USED(ureg, pureg, uva, n);
+ ulong v = ureg->psr;
+ memmove(pureg, uva, n);
+ ureg->psr = ureg->psr & ~(PsrMask|PsrDfiq|PsrDirq) | v & (PsrMask|PsrDfiq|PsrDirq);
}
/*
--- a/sys/src/9/kw/arch.c
+++ b/sys/src/9/kw/arch.c
@@ -74,7 +74,9 @@
void
setregisters(Ureg* ureg, char* pureg, char* uva, int n)
{
- USED(ureg, pureg, uva, n);
+ ulong v = ureg->psr;
+ memmove(pureg, uva, n);
+ ureg->psr = ureg->psr & ~(PsrMask|PsrDfiq|PsrDirq) | v & (PsrMask|PsrDfiq|PsrDirq);
}
/*
--- a/sys/src/9/omap/arch.c
+++ b/sys/src/9/omap/arch.c
@@ -74,7 +74,9 @@
void
setregisters(Ureg* ureg, char* pureg, char* uva, int n)
{
- USED(ureg, pureg, uva, n);
+ ulong v = ureg->psr;
+ memmove(pureg, uva, n);
+ ureg->psr = ureg->psr & ~(PsrMask|PsrDfiq|PsrDirq) | v & (PsrMask|PsrDfiq|PsrDirq);
}
/*
--- a/sys/src/9/teg2/arch.c
+++ b/sys/src/9/teg2/arch.c
@@ -74,7 +74,9 @@
void
setregisters(Ureg* ureg, char* pureg, char* uva, int n)
{
- USED(ureg, pureg, uva, n);
+ ulong v = ureg->psr;
+ memmove(pureg, uva, n);
+ ureg->psr = ureg->psr & ~(PsrMask|PsrDfiq|PsrDirq) | v & (PsrMask|PsrDfiq|PsrDirq);
}
/*