Commit bf443337130809afc7887dd59e0a29fe605155eb
1 parent
31328119
Correct P flag assertion in rfe.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4683 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
1 deletions
target-cris/op_helper.c
... | ... | @@ -202,6 +202,8 @@ static void cris_ccs_rshift(CPUState *env) |
202 | 202 | |
203 | 203 | void helper_rfe(void) |
204 | 204 | { |
205 | + int rflag = env->pregs[PR_CCS] & R_FLAG; | |
206 | + | |
205 | 207 | D(fprintf(logfile, "rfe: erp=%x pid=%x ccs=%x btarget=%x\n", |
206 | 208 | env->pregs[PR_ERP], env->pregs[PR_PID], |
207 | 209 | env->pregs[PR_CCS], |
... | ... | @@ -210,7 +212,7 @@ void helper_rfe(void) |
210 | 212 | cris_ccs_rshift(env); |
211 | 213 | |
212 | 214 | /* RFE sets the P_FLAG only if the R_FLAG is not set. */ |
213 | - if (!(env->pregs[PR_CCS] & R_FLAG)) | |
215 | + if (!rflag) | |
214 | 216 | env->pregs[PR_CCS] |= P_FLAG; |
215 | 217 | } |
216 | 218 | ... | ... |