For PowerPC, never put a reg_float value in a reg_any.
With this type check, I can change the size checks into assertions.
This commit is contained in:
parent
aa47f52166
commit
e6df553ebf
|
@ -115,16 +115,13 @@ regscore(long offset, int size, int type, int frequency, int totype)
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case reg_float:
|
case reg_float:
|
||||||
if (size != 8) {
|
/* Don't put reg_float in reg_any. */
|
||||||
fprintf(codefile, "! local %ld float size %d reject\n", offset, size);
|
if (totype != reg_float)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
assert(size == 8);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (size != 4) {
|
assert(size == 4);
|
||||||
fprintf(codefile, "! local %ld int size %d reject\n", offset, size);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +136,9 @@ regscore(long offset, int size, int type, int frequency, int totype)
|
||||||
* 4 bytes if the local is a parameter.
|
* 4 bytes if the local is a parameter.
|
||||||
*/
|
*/
|
||||||
score = 4 * frequency - 8 - ((offset >= 0) ? 4 : 0);
|
score = 4 * frequency - 8 - ((offset >= 0) ? 4 : 0);
|
||||||
|
#if 0
|
||||||
fprintf(codefile, "! local %ld score %d\n", offset, score);
|
fprintf(codefile, "! local %ld score %d\n", offset, score);
|
||||||
|
#endif
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue