aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/cpu.h
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-07-08 19:51:24 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-07-08 19:51:24 +0000
commit8f1f22f6abc7af1e5ecc8d83698514999e0284e4 (patch)
tree21f9f28e8559f283bd6b2a2a92b680282dfc0dce /target-sparc/cpu.h
parent1ad21e69696d585f0cf70e3207f74757fe296b92 (diff)
Fix retry and done ops, trap handling
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3055 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r--target-sparc/cpu.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 06b5865e22..600b37ba5e 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -294,10 +294,8 @@ void cpu_set_cwp(CPUSPARCState *env1, int new_cwp);
env->psr = (_tmp & 0xf) << 20; \
} while (0)
#define GET_CWP64(env) (NWINDOWS - 1 - (env)->cwp)
-#define PUT_CWP64(env, val) do { \
- env->cwp = NWINDOWS - 1 - ((val) & 0xff); \
- cpu_set_cwp(env, env->cwp); \
- } while(0)
+#define PUT_CWP64(env, val) \
+ cpu_set_cwp(env, NWINDOWS - 1 - ((val) & (NWINDOWS - 1)))
#endif