Commit 4be27dbbde2aed1da305b83043caa6f0f0ca4309

Authored by pbrook
1 parent 3a742b76

Optimize redundant cp15 coprocessor access control register writes.

Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5512 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 3 deletions
target-arm/helper.c
... ... @@ -1334,9 +1334,11 @@ void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
1334 1334 case 2:
1335 1335 if (arm_feature(env, ARM_FEATURE_XSCALE))
1336 1336 goto bad_reg;
1337   - env->cp15.c1_coproc = val;
1338   - /* ??? Is this safe when called from within a TB? */
1339   - tb_flush(env);
  1337 + if (env->cp15.c1_coproc != val) {
  1338 + env->cp15.c1_coproc = val;
  1339 + /* ??? Is this safe when called from within a TB? */
  1340 + tb_flush(env);
  1341 + }
1340 1342 break;
1341 1343 default:
1342 1344 goto bad_reg;
... ...