diff --git a/src/cpu.js b/src/cpu.js index 186e571a..021164e7 100644 --- a/src/cpu.js +++ b/src/cpu.js @@ -573,6 +573,12 @@ CPU.prototype.get_state = function() state[83] = this.devices.virtio_net; state[84] = this.devices.virtio_balloon; + // state[85] new ide set above + + state[86] = this.last_result; + state[87] = this.fpu_status_word; + state[88] = this.mxcsr; + return state; }; @@ -759,6 +765,10 @@ CPU.prototype.set_state = function(state) this.fpu_dp_selector[0] = state[74]; this.fpu_opcode[0] = state[75]; + if(state[86] !== undefined) this.last_result = state[86]; + if(state[87] !== undefined) this.fpu_status_word = state[87]; + if(state[88] !== undefined) this.mxcsr = state[88]; + const bitmap = new Bitmap(state[78].buffer); const packed_memory = state[77]; this.unpack_memory(bitmap, packed_memory);