From d04841afba988028a42897cfd9333b2e046a9d11 Mon Sep 17 00:00:00 2001 From: megacz Date: Sun, 18 Jan 2009 18:29:39 -0800 Subject: [PATCH] add test tests/flags/c-flag-determined-by-dc.test --- tests/flags/c-flag-determined-by-dc.test | 63 ++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tests/flags/c-flag-determined-by-dc.test diff --git a/tests/flags/c-flag-determined-by-dc.test b/tests/flags/c-flag-determined-by-dc.test new file mode 100644 index 0000000..2dd6621 --- /dev/null +++ b/tests/flags/c-flag-determined-by-dc.test @@ -0,0 +1,63 @@ +// expected output +#expect 1 +#expect 0 +#expect 0 +#expect 0 +#expect 1 +#expect 1 +#expect 0 +#expect 1 + +#ship debug : Debug +#ship alu : Alu +#ship fifo : Fifo + +alu.in1: + set word=1; + set ilc=*; + deliver; + +alu.inOp: + set word=Alu.inOp[CMP]; + set ilc=*; + deliver; + +alu.out: + set flags a=0, b=0; + set olc=8; + + head; + [!b] recv token, collect nothing; + [b] recv token, collect word; + set flags a=c, b=b; + [!a] set word=0; + [a] set word=1; + send to debug.in; + set olc--; + [d] abort; + set flags a=a, b=!b; + tail; + +debug.in: + set ilc=*; + recv, deliver; + +alu.in2: + set word=0; + set ilc=4; + deliver; + set word=1; + set ilc=4; + deliver; + +fifo.out: + send token to alu.out:1; + send token to alu.out:1; + send token to alu.out:0; + send token to alu.out:0; + send token to alu.out:1; + send token to alu.out:1; + send token to alu.out:0; + send token to alu.out:0; + + -- 1.7.10.4