vlog95: for a 32-bit width we can generate a signed undefined value

This commit is contained in:
Cary R 2014-12-08 21:08:46 -08:00
parent edf112b900
commit 2d6622e543
1 changed files with 4 additions and 1 deletions

View File

@ -161,7 +161,10 @@ void emit_number(const char *bits, unsigned nbits, unsigned is_signed,
} else if (rtype == -2) {
fprintf(vlog_out, "%u'bz", nbits);
} else if (rtype == -3) {
fprintf(vlog_out, "%u'bx", nbits);
/* If this is a 32-bit wide constant then generate the
* undefined with integers to get a signed value. */
if (nbits == 32) fprintf(vlog_out, "1/0");
else fprintf(vlog_out, "%u'bx", nbits);
} else {
fprintf(vlog_out, "%"PRId32, value);
}