Search
lxdream.org :: lxdream :: r872:a3041742bb7d
lxdream 0.9.1
released Jun 29
Download Now
changeset872:a3041742bb7d
parent871:c0b7e21cb62b
child873:cb3a8c502727
authornkeynes
dateTue Oct 14 06:52:06 2008 +0000 (11 years ago)
Fix CLRS/SETS - These kill the carry value, they don't set it.
src/sh4/sh4x86.in
test/sh4/bf.s
1.1 --- a/src/sh4/sh4x86.in Fri Oct 10 00:13:39 2008 +0000
1.2 +++ b/src/sh4/sh4x86.in Tue Oct 14 06:52:06 2008 +0000
1.3 @@ -1780,7 +1780,7 @@
1.4 COUNT_INST(I_CLRS);
1.5 CLC();
1.6 SETC_sh4r(R_S);
1.7 - sh4_x86.tstate = TSTATE_C;
1.8 + sh4_x86.tstate = TSTATE_NONE;
1.9 :}
1.10 CLRT {:
1.11 COUNT_INST(I_CLRT);
1.12 @@ -1792,7 +1792,7 @@
1.13 COUNT_INST(I_SETS);
1.14 STC();
1.15 SETC_sh4r(R_S);
1.16 - sh4_x86.tstate = TSTATE_C;
1.17 + sh4_x86.tstate = TSTATE_NONE;
1.18 :}
1.19 SETT {:
1.20 COUNT_INST(I_SETT);
2.1 --- a/test/sh4/bf.s Fri Oct 10 00:13:39 2008 +0000
2.2 +++ b/test/sh4/bf.s Tue Oct 14 06:52:06 2008 +0000
2.3 @@ -125,13 +125,30 @@
2.4 bf/s test_bf_8_b
2.5 nop
2.6 assert_exc_caught test_bf_str_k test_bf_8_exc
2.7 - bra test_bf_end
2.8 + bra test_bf_9
2.9 nop
2.10 test_bf_8_b:
2.11 test_bf_8_c:
2.12 fail test_bf_str_k
2.13
2.14 -
2.15 +test_bf_9: ! Regression test that sets does not affect branch
2.16 + add #1, r12
2.17 + clrt
2.18 + sets
2.19 + bf test_bf_10
2.20 + fail test_bf_str_k
2.21 +
2.22 +test_bf_10: ! Regression test that clrs does not affect branch
2.23 + add #1, r12
2.24 + sett
2.25 + clrs
2.26 + bf test_bf_10_a
2.27 + bra test_bf_end
2.28 + nop
2.29 +
2.30 +test_bf_10_a:
2.31 + fail test_bf_str_k
2.32 +
2.33 test_bf_end:
2.34 end_test test_bf_str_k
2.35
.