# HG changeset patch # User kono # Date 1086264646 -32400 # Node ID 4598e751af555cd20c0485bf101e7eb1b4d9d031 # Parent 55e611476cba2a858e78e29f7a811414c69d1ca7 MIPS code_bool diff -r 55e611476cba -r 4598e751af55 mc-code-mips.c --- a/mc-code-mips.c Thu Jun 03 20:41:36 2004 +0900 +++ b/mc-code-mips.c Thu Jun 03 21:10:46 2004 +0900 @@ -2738,9 +2738,9 @@ char *eq = "eq"; char *ne = "ne"; int t; - char *rn2 = register_name(r2); - char *rn1 = register_name(r1); - char *rn0 = register_name(r0); + char *rn2; + char *rn1; + char *rn0; // printf("# pcond %d cond %d\n",op,cond); switch(op+(!cond)*BNOT) { @@ -2769,6 +2769,10 @@ break; default: error(-1); } + rn2 = register_name(r2); + rn1 = register_name(r1); + rn0 = register_name(r0); + if (mode==COND_BRANCH) { if (op==EQ||op==NEQ) { @@ -2786,9 +2790,9 @@ printf("\tsltu\t%s,$0,%s\n",rn2,rn2); } else { printf("\t%s\t%s,%s,%s\n",slt,rn2,rn1,rn0); - } - if (eq==ne) { - printf("\txor\t%s,%s,1\n",rn2,rn2); + if (eq==ne) { + printf("\txor\t%s,%s,1\n",rn2,rn2); + } } } else error(-1); }