From bd04128b033c8a623cceca31de072053837ad888 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Fri, 8 Nov 2013 22:43:54 +0100 Subject: More optimizations. --- tests/nadder.mj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/nadder.mj') diff --git a/tests/nadder.mj b/tests/nadder.mj index c8b0fbe..91caa6d 100644 --- a/tests/nadder.mj +++ b/tests/nadder.mj @@ -1,3 +1,5 @@ +const word_size = 8 + fulladder(a,b,c) = (s, r) where s = (a ^ b) ^ c; r = (a & b) + ((a ^ b) & c); @@ -14,6 +16,6 @@ adder(a:[n], b:[n], c_in) = (o:[n], c_out) where end if end where -main(a:[8], b:[8]) = (o:[8], c) where - (o, c) = adder<8>(a,b,0) +main(a:[word_size], b:[word_size]) = (o:[word_size], c) where + (o, c) = adder(a,b,0) end where -- cgit v1.2.3