Currently functions in alu.rs and barrel_shifter.rs require a mutable reference to the CPU struct. This complicates cpu state management. Ideally, state manipulation should only occur explicitly in the arm and thumb module. Yes the barrel shifter may set the carry bit, but returning a tuple of (value, carry) seems a better idea.
Currently functions in alu.rs and barrel_shifter.rs require a mutable reference to the
CPU
struct. This complicates cpu state management. Ideally, state manipulation should only occur explicitly in the arm and thumb module. Yes the barrel shifter may set the carry bit, but returning a tuple of (value, carry) seems a better idea.