V0.8: A $signed can make a concat signed.

This patch mirrors what was done in development to fix the
signed concat problem.
This commit is contained in:
Cary R 2008-11-26 16:40:33 -08:00 committed by Stephen Williams
parent 15702f1b87
commit 12d5aa08e2
1 changed files with 6 additions and 0 deletions

View File

@ -1075,6 +1075,12 @@ NetEConst* NetEConcat::eval_tree()
val = verinum(val.as_string());
}
// Normally, concatenations are unsigned. However, the
// $signed() function works by marking the expression as
// signed, so we really have to check.
val.has_sign( this->has_sign() );
NetEConst*res = new NetEConst(val);
res->set_width(val.len());
return res;