aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorazidar2015-08-18 16:32:26 -0700
committerazidar2015-08-18 16:32:26 -0700
commita27cc1bd15fe8b821ce8d9246d86e30a3ed57793 (patch)
tree23baab238eabb8b47ec16cdf3c422a657f30d171 /src
parent6253cb0880a39a046417490ae42da3789a2b5a27 (diff)
Fixed bug in MinusWidth where it was adding instead of subtracting widths
Diffstat (limited to 'src')
-rw-r--r--src/main/stanza/passes.stanza2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza
index 9d2b1281..e9e9c8f0 100644
--- a/src/main/stanza/passes.stanza
+++ b/src/main/stanza/passes.stanza
@@ -1826,7 +1826,7 @@ defn solve-constraints (l:List<WGeq>) -> HashTable<Symbol,Width> :
(w1,w2) : w
(w:MinusWidth) :
match(arg1(w),arg2(w)) :
- (w1:IntWidth,w2:IntWidth) : IntWidth(width(w1) + width(w2))
+ (w1:IntWidth,w2:IntWidth) : IntWidth(width(w1) - width(w2))
(w1:LongWidth,w2:IntWidth) : LongWidth(minus(width(w1),to-long $ width(w2)))
(w1:IntWidth,w2:LongWidth) : LongWidth(minus(to-long $ width(w1), width(w2)))
(w1:LongWidth,w2:LongWidth) : LongWidth(minus(width(w1),width(w2)))