mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
fix: some properties missing from state images
This commit is contained in:
parent
f053c4af7b
commit
fea69e0a42
1 changed files with 10 additions and 0 deletions
10
src/cpu.js
10
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue