aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc/op_helper.c')
-rw-r--r--target-sparc/op_helper.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index fecb80dcdd..2529cca720 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -209,7 +209,8 @@ void helper_st_asi(int asi, int size, int sign)
void helper_rett()
{
- int cwp;
+ unsigned int cwp;
+
env->psret = 1;
cwp = (env->cwp + 1) & (NWINDOWS - 1);
if (env->wim & (1 << cwp)) {
@@ -255,3 +256,13 @@ void helper_debug()
env->exception_index = EXCP_DEBUG;
cpu_loop_exit();
}
+
+void do_wrpsr()
+{
+ PUT_PSR(env, T0);
+}
+
+void do_rdpsr()
+{
+ T0 = GET_PSR(env);
+}