sim._pyrtl: fix miscompilation of -(Const(0b11, 2).as_signed()).
Fixes #473.
This commit is contained in:
parent
0802f943ba
commit
cb81618c28
2 changed files with 9 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ class _RHSValueCompiler(_ValueCompiler):
|
|||
if value.operator == "~":
|
||||
return f"(~{self(arg)})"
|
||||
if value.operator == "-":
|
||||
return f"(-{self(arg)})"
|
||||
return f"(-{sign(arg)})"
|
||||
if value.operator == "b":
|
||||
return f"bool({mask(arg)})"
|
||||
if value.operator == "r|":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue