Commit 185f07621fc42c1da194ada0fe98439f07f78aa0

Authored by ths
1 parent e7c24003

Optimize the conventional move operation.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3720 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 0 deletions
target-mips/translate.c
... ... @@ -1240,6 +1240,12 @@ static void gen_arith (CPUState *env, DisasContext *ctx, uint32_t opc,
1240 1240 return;
1241 1241 }
1242 1242 GEN_LOAD_REG_TN(T0, rs);
  1243 + /* Specialcase the conventional move operation. */
  1244 + if (rt == 0 && (opc == OPC_ADDU || opc == OPC_DADDU
  1245 + || opc == OPC_SUBU || opc == OPC_DSUBU)) {
  1246 + GEN_STORE_TN_REG(rd, T0);
  1247 + return;
  1248 + }
1243 1249 GEN_LOAD_REG_TN(T1, rt);
1244 1250 switch (opc) {
1245 1251 case OPC_ADD:
... ...