signed compares were just wrong, added a few patterns

This commit is contained in:
ceriel
1987-08-13 11:22:59 +00:00
parent e571911b1b
commit a0e4cd23cc
2 changed files with 77 additions and 12 deletions

View File

@@ -89,8 +89,8 @@ regscore(off, size, typ, score, totyp)
{
if (size != 2) return -1;
score -= 1;
if (typ == reg_pointer || typ == reg_loop) score *= 3;
else score *= 2;
score += score;
if (typ == reg_pointer || typ == reg_loop) score += (score >> 2);
score -= 2; /* cost of saving */
if (off >= 0) score -= 3;
return score;