From 95475216f23216683b85c420132849553319eae2 Mon Sep 17 00:00:00 2001 From: "Edgar E. Iglesias" Date: Mon, 15 Feb 2010 11:20:30 +0100 Subject: [PATCH] crisv10: Always clear the V and C flags on btst. Signed-off-by: Edgar E. Iglesias --- target-cris/op_helper.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- GitLab