From: Michael Meissner Date: Mon, 9 Sep 1996 18:24:18 +0000 (+0000) Subject: Make ex{f,t}* tests agree with book X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=293c76a376ee3ff1a6266daa3797a402f45e6e13;p=binutils-gdb.git Make ex{f,t}* tests agree with book --- diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 9703ca1166f..69d6bd209f5 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -3,6 +3,7 @@ Mon Sep 9 13:27:26 1996 Michael Meissner * simops.c (trace_output): Properly align accumulator output. (OP_3{0,2,4}00): Properly parenthesize test expression. Add error if shift count is too high. + (OP_4E{00,02,04,20,22,40,42}): Make tests agree with book. Fri Sep 6 17:56:17 1996 Martin M. Hunt diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c index 6b8329b38e3..bb8b913bcff 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -880,7 +880,7 @@ void OP_4E04 () { trace_input ("exef0f", OP_VOID, OP_VOID, OP_VOID); - State.exe = (State.F0) ? 0 : 1; + State.exe = (State.F0 == 0); trace_output (OP_FLAG); } @@ -889,7 +889,7 @@ void OP_4E24 () { trace_input ("exef0t", OP_VOID, OP_VOID, OP_VOID); - State.exe = State.F0; + State.exe = (State.F0 != 0); trace_output (OP_FLAG); } @@ -898,7 +898,7 @@ void OP_4E40 () { trace_input ("exef1f", OP_VOID, OP_VOID, OP_VOID); - State.exe = (State.F1) ? 0 : 1; + State.exe = (State.F1 == 0); trace_output (OP_FLAG); } @@ -907,7 +907,7 @@ void OP_4E42 () { trace_input ("exef1t", OP_VOID, OP_VOID, OP_VOID); - State.exe = State.F1; + State.exe = (State.F1 != 0); trace_output (OP_FLAG); } @@ -916,7 +916,7 @@ void OP_4E00 () { trace_input ("exefaf", OP_VOID, OP_VOID, OP_VOID); - State.exe = (State.F0 | State.F1) ? 0 : 1; + State.exe = (State.F0 == 0) & (State.F1 == 0); trace_output (OP_FLAG); } @@ -925,7 +925,7 @@ void OP_4E02 () { trace_input ("exefat", OP_VOID, OP_VOID, OP_VOID); - State.exe = (State.F0) ? 0 : (State.F1); + State.exe = (State.F0 == 0) & (State.F1 != 0); trace_output (OP_FLAG); } @@ -934,7 +934,7 @@ void OP_4E20 () { trace_input ("exetaf", OP_VOID, OP_VOID, OP_VOID); - State.exe = (State.F1) ? 0 : (State.F0); + State.exe = (State.F0 != 0) & (State.F1 == 0); trace_output (OP_FLAG); } @@ -943,7 +943,7 @@ void OP_4E22 () { trace_input ("exetat", OP_VOID, OP_VOID, OP_VOID); - State.exe = (State.F0) ? (State.F1) : 0; + State.exe = (State.F0 != 0) & (State.F1 != 0); trace_output (OP_FLAG); }