1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-30 04:50:08 +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: case Operation::MOVEtoSR:
status.set_status(src.w); status.set_status(src.w);
flow_controller.did_update_status();
break; break;
case Operation::MOVEfromSR: case Operation::MOVEfromSR:
@ -467,10 +468,13 @@ template <
#define apply(op, func) { \ #define apply(op, func) { \
auto sr = status.status(); \ auto sr = status.status(); \
op(sr, src.w); \ op(sr, src.w); \
status.func(sr); \ 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_sr(op) apply(op, set_status)
#define apply_op_ccr(op) apply(op, set_ccr) #define apply_op_ccr(op) apply(op, set_ccr)
@ -484,6 +488,8 @@ template <
#undef apply_op_ccr #undef apply_op_ccr
#undef apply_op_sr #undef apply_op_sr
#undef set_ccr
#undef set_status
#undef apply #undef apply
#undef eor_op #undef eor_op
#undef or_op #undef or_op
@ -1240,6 +1246,7 @@ template <
case Operation::STOP: case Operation::STOP:
status.set_status(src.w); status.set_status(src.w);
flow_controller.did_update_status();
flow_controller.stop(); flow_controller.stop();
break; break;