From: George Koehler Date: Fri, 17 Feb 2017 01:30:17 +0000 (-0500) Subject: For PowerPC, never put a reg_float value in a reg_any. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e6df553ebf6280e0821c32077bf02c6651c4ab46;p=ack.git For PowerPC, never put a reg_float value in a reg_any. With this type check, I can change the size checks into assertions. --- diff --git a/mach/powerpc/ncg/mach.c b/mach/powerpc/ncg/mach.c index c63cc20be..10a1cf18c 100644 --- a/mach/powerpc/ncg/mach.c +++ b/mach/powerpc/ncg/mach.c @@ -115,16 +115,13 @@ regscore(long offset, int size, int type, int frequency, int totype) switch (type) { case reg_float: - if (size != 8) { - fprintf(codefile, "! local %ld float size %d reject\n", offset, size); + /* Don't put reg_float in reg_any. */ + if (totype != reg_float) return -1; - } + assert(size == 8); break; default: - if (size != 4) { - fprintf(codefile, "! local %ld int size %d reject\n", offset, size); - return -1; - } + assert(size == 4); break; } @@ -139,7 +136,9 @@ regscore(long offset, int size, int type, int frequency, int totype) * 4 bytes if the local is a parameter. */ score = 4 * frequency - 8 - ((offset >= 0) ? 4 : 0); +#if 0 fprintf(codefile, "! local %ld score %d\n", offset, score); +#endif return score; }