Fix for leak in thread vector allocation.

In the vvp code generator, when zero/sign extending a sub-expression,
the sub-expression is first evaluated and stored in one location in
the thread vector store, then is copied and extended into a second
location. The storage used for the initial sub-expression evaluation
is never deallocated.
This commit is contained in:
Martin Whitaker 2008-11-12 22:42:13 +00:00 committed by Stephen Williams
parent 87654f8661
commit 416bd35f2e
1 changed files with 2 additions and 0 deletions

View File

@ -1823,6 +1823,8 @@ static struct vector_info draw_pad_expr(ivl_expr_t exp, unsigned wid)
fprintf(vvp_out, " %%mov %u, 0, %u;\n",
res.base+subv.wid, res.wid - subv.wid);
}
if (subv.base >= 8)
clr_vector(subv);
save_expression_lookaside(res.base, exp, wid);
return res;