mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-25 18:15:34 +00:00
Merge pull request #2005 from YosysHQ/claire/fix1990
Add "nowrshmsk" attribute, fix shift-and-mask bit slice write for signed offset
This commit is contained in:
commit
0610424940
9 changed files with 142 additions and 19 deletions
|
@ -645,13 +645,13 @@ non_opt_range:
|
|||
} |
|
||||
'[' expr TOK_POS_INDEXED expr ']' {
|
||||
$$ = new AstNode(AST_RANGE);
|
||||
AstNode *expr = new AstNode(AST_CONCAT, $2);
|
||||
AstNode *expr = new AstNode(AST_SELFSZ, $2);
|
||||
$$->children.push_back(new AstNode(AST_SUB, new AstNode(AST_ADD, expr->clone(), $4), AstNode::mkconst_int(1, true)));
|
||||
$$->children.push_back(new AstNode(AST_ADD, expr, AstNode::mkconst_int(0, true)));
|
||||
} |
|
||||
'[' expr TOK_NEG_INDEXED expr ']' {
|
||||
$$ = new AstNode(AST_RANGE);
|
||||
AstNode *expr = new AstNode(AST_CONCAT, $2);
|
||||
AstNode *expr = new AstNode(AST_SELFSZ, $2);
|
||||
$$->children.push_back(new AstNode(AST_ADD, expr, AstNode::mkconst_int(0, true)));
|
||||
$$->children.push_back(new AstNode(AST_SUB, new AstNode(AST_ADD, expr->clone(), AstNode::mkconst_int(1, true)), $4));
|
||||
} |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue