1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Ensure no status updates fall through the cracks.

This commit is contained in:
Thomas Harte 2022-05-07 21:29:12 -04:00
parent 98cb9cc1eb
commit 0818fd7828

View File

@ -437,6 +437,7 @@ template <
case Operation::MOVEtoSR:
status.set_status(src.w);
flow_controller.did_update_status();
break;
case Operation::MOVEfromSR:
@ -467,10 +468,13 @@ template <
#define apply(op, func) { \
auto sr = status.status(); \
op(sr, src.w); \
status.func(sr); \
op(sr, src.w); \
func(sr); \
}
#define set_status(x) status.set_status(x); flow_controller.did_update_status()
#define set_ccr(x) status.set_ccr(x)
#define apply_op_sr(op) apply(op, set_status)
#define apply_op_ccr(op) apply(op, set_ccr)
@ -484,6 +488,8 @@ template <
#undef apply_op_ccr
#undef apply_op_sr
#undef set_ccr
#undef set_status
#undef apply
#undef eor_op
#undef or_op
@ -1240,6 +1246,7 @@ template <
case Operation::STOP:
status.set_status(src.w);
flow_controller.did_update_status();
flow_controller.stop();
break;