Implement stage_EX, stage_MEM, and stage_WB.