aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorazidar2016-01-15 16:11:42 -0800
committerazidar2016-01-16 11:45:00 -0800
commit1f4bbf566ac5b9b01b3fdb18e5a33103b3182d01 (patch)
tree9c1e34cc1f1700519ce61391806bd8344ed10950 /src
parentf3af49a75c2969484e07447223c7cde6852a0119 (diff)
shift right does not cast input as signed
Diffstat (limited to 'src')
-rw-r--r--src/main/stanza/verilog.stanza2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/stanza/verilog.stanza b/src/main/stanza/verilog.stanza
index 9bbb9aae..6b51f390 100644
--- a/src/main/stanza/verilog.stanza
+++ b/src/main/stanza/verilog.stanza
@@ -139,7 +139,7 @@ defn emit (e:Expression) -> String :
if type(e) typeof SIntType : [emit-as-type(args(e)[0],type(e)) " >>> " emit(args(e)[1])]
else : [emit-as-type(args(e)[0],type(e)) " >> " emit(args(e)[1])]
SHIFT-LEFT-OP : [emit-as-type(args(e)[0],type(e)) " << " consts(e)[0]]
- SHIFT-RIGHT-OP : [emit-as-type(args(e)[0],type(e)) "[" width!(type(args(e)[0])) - to-long(1) ":" consts(e)[0] "]"]
+ SHIFT-RIGHT-OP : [emit(args(e)[0]) "[" width!(type(args(e)[0])) - to-long(1) ":" consts(e)[0] "]"]
;if type(e) typeof SIntType : [emit-as-type(args(e)[0],type(e)) " >>> " consts(e)[0]]
;else : [emit-as-type(args(e)[0],type(e)) " >> " consts(e)[0]]
NEG-OP : ["-{" emit-as-type(args(e)[0],type(e)) "}"]