tgt-vlog95: Don't strip null-bytes from string literals in structural elements
The vlog95 backend currently strips null-bytes from strings in structural elements. E.g. `assign y = "a\000b"` gets translated to `assign y = "ab"`. This changes the behavior of the generated output compared to the input. Don't ignore the null-bytes to make sure the behavior stays the same. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
2e12e47a2b
commit
56efec8ed1
|
|
@ -512,8 +512,6 @@ static void emit_number_as_string(ivl_net_const_t net_const)
|
|||
val |= (bits[idx-bit] == '1') ? 1 << (7-bit) : 0x00;
|
||||
}
|
||||
|
||||
/* Skip any NULL bytes. */
|
||||
if (val == 0) continue;
|
||||
/* Print some values that can be escaped. */
|
||||
if (val == '"') fprintf(vlog_out, "\\\"");
|
||||
else if (val == '\\') fprintf(vlog_out, "\\\\");
|
||||
|
|
|
|||
Loading…
Reference in New Issue