aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-02-15 11:20:30 +0100
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-02-15 11:20:30 +0100
commit95475216f23216683b85c420132849553319eae2 (patch)
treebf58b20e7e316ca091a0a8594824d6b819a72220
parentfb9fb692312a84ebc6e9c10da6f374c5871ff7b0 (diff)
downloadqemu-95475216f23216683b85c420132849553319eae2.zip
qemu-95475216f23216683b85c420132849553319eae2.tar.gz
qemu-95475216f23216683b85c420132849553319eae2.tar.bz2
crisv10: Always clear the V and C flags on btst.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
-rw-r--r--target-cris/op_helper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c
index b44b932..a60da94 100644
--- a/target-cris/op_helper.c
+++ b/target-cris/op_helper.c
@@ -276,6 +276,8 @@ uint32_t helper_btst(uint32_t t0, uint32_t t1, uint32_t ccs)
/* Clear the X, N and Z flags. */
ccs = ccs & ~(X_FLAG | N_FLAG | Z_FLAG);
+ if (env->pregs[PR_VR] < 32)
+ ccs &= ~(V_FLAG | C_FLAG);
/* Set the N and Z flags accordingly. */
ccs |= (bset << 3) | (fz << 2);
return ccs;