Commit b11d1790 by Richard Kenner

(modregno_adjust): Fixed case when reg_renumber invalid.

From-SVN: r13577
parent 2c5447d9
...@@ -204,12 +204,15 @@ mod_regno_adjust (instr, op) ...@@ -204,12 +204,15 @@ mod_regno_adjust (instr, op)
char *r = (!strncmp (instr, "dvr", 3) ? "r" : ""); char *r = (!strncmp (instr, "dvr", 3) ? "r" : "");
int modregno_gcc = REGNO (op[3]), modregno_1750 = REGNO (op[0]) + 1; int modregno_gcc = REGNO (op[3]), modregno_1750 = REGNO (op[0]) + 1;
if (modregno_gcc == modregno_1750 || (reg_renumber != NULL if (modregno_gcc == modregno_1750
&& reg_renumber[modregno_gcc] == reg_renumber[modregno_1750])) || (reg_renumber != NULL
&& reg_renumber[modregno_gcc] >= 0
&& reg_renumber[modregno_gcc] == reg_renumber[modregno_1750]))
sprintf (outstr, "%s r%%0,%s%%2", instr, r); sprintf (outstr, "%s r%%0,%s%%2", instr, r);
else else
sprintf (outstr, "lr r%d,r%d\n\t%s r%%0,%s%%2\n\txwr r%d,r%d", sprintf (outstr, "lr r%d,r%d\n\t%s r%%0,%s%%2\n\txwr r%d,r%d",
modregno_gcc, modregno_1750, instr, r, modregno_1750, modregno_gcc); modregno_gcc, modregno_1750, instr, r, modregno_1750,
modregno_gcc);
return outstr; return outstr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment