A right shift is only signed for an ARS.

The signed_flag should only be set when the expression is signed
and an ARS is used a normal RS should never be signed.
This commit is contained in:
Cary R 2009-03-31 12:36:05 -07:00 committed by Stephen Williams
parent 1dbc517164
commit caab6cab9d
1 changed files with 1 additions and 1 deletions

View File

@ -602,7 +602,7 @@ NetNet* NetEBShift::synthesize(Design*des, NetScope*scope, NetExpr*root)
}
const bool right_flag = op_ == 'r' || op_ == 'R';
const bool signed_flag = has_sign();
const bool signed_flag = has_sign() && op_ == 'R';
/* Detect the special case where the shift amount is
constant. Evaluate the shift amount, and simply reconnect