dfsm: Redefine arithmetic to saturate rather than overflow
authorPhilip Withnall <philip@tecnocode.co.uk>
Sun, 26 Feb 2012 10:58:34 +0000 (10:58 +0000)
committerPhilip Withnall <philip@tecnocode.co.uk>
Sun, 26 Feb 2012 17:38:22 +0000 (17:38 +0000)
commit17111d72a69d0eb3a47694a5006f09a643ee1c72
tree12deb4abd0d0690ea5c291055012bce68d937f7a
parent469ccf31639f64dc9938b35a750ad3972424833c
dfsm: Redefine arithmetic to saturate rather than overflow

This also redefines the behaviour of the modulus operator, and tidies up some
implementations which relied on undefined behaviour in C.
dfsm/dfsm-ast-expression-binary.c
dfsm/tests/ast.c
dfsm/tests/simulation.c
dfsm/tests/test-utils.c
dfsm/tests/test-utils.h