aboutsummaryrefslogtreecommitdiff
path: root/target-cris
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 /target-cris
parentfb9fb692312a84ebc6e9c10da6f374c5871ff7b0 (diff)
crisv10: Always clear the V and C flags on btst.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-cris')
-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 b44b9325ff..a60da94f30 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;