Move reg_mmx to state[65] to avoid overriding from merge

This commit is contained in:
Amaan Cheval 2017-05-10 16:35:30 +05:30 committed by Fabian
parent d846e84236
commit 3d179b01bb

View file

@ -297,36 +297,37 @@ CPU.prototype.get_state = function()
state[37] = this.instruction_pointer;
state[38] = this.previous_ip;
state[39] = this.reg32s;
state[40] = this.reg_mmxs;
state[41] = this.sreg;
state[42] = this.dreg;
state[43] = this.mem8;
state[44] = this.fpu;
state[40] = this.sreg;
state[41] = this.dreg;
state[42] = this.mem8;
state[43] = this.fpu;
state[46] = this.devices.virtio;
state[47] = this.devices.apic;
state[48] = this.devices.rtc;
state[49] = this.devices.pci;
state[50] = this.devices.dma;
state[51] = this.devices.acpi;
state[52] = this.devices.hpet;
state[53] = this.devices.vga;
state[54] = this.devices.ps2;
state[55] = this.devices.uart;
state[56] = this.devices.fdc;
state[57] = this.devices.cdrom;
state[58] = this.devices.hda;
state[59] = this.devices.pit;
state[60] = this.devices.net;
state[61] = this.devices.pic;
state[45] = this.devices.virtio;
state[46] = this.devices.apic;
state[47] = this.devices.rtc;
state[48] = this.devices.pci;
state[49] = this.devices.dma;
state[50] = this.devices.acpi;
state[51] = this.devices.hpet;
state[52] = this.devices.vga;
state[53] = this.devices.ps2;
state[54] = this.devices.uart;
state[55] = this.devices.fdc;
state[56] = this.devices.cdrom;
state[57] = this.devices.hda;
state[58] = this.devices.pit;
state[59] = this.devices.net;
state[60] = this.devices.pic;
state[62] = this.a20_enabled;
state[63] = this.fw_value;
state[61] = this.a20_enabled;
state[62] = this.fw_value;
state[64] = this.devices.ioapic;
state[63] = this.devices.ioapic;
state[64] = this.tss_size_32;
state[65] = this.reg_mmxs;
return state;
};
@ -371,36 +372,37 @@ CPU.prototype.set_state = function(state)
this.instruction_pointer = state[37];
this.previous_ip = state[38];
this.reg32s = state[39];
this.reg_mmxs = state[40];
this.sreg = state[41];
this.dreg = state[42];
this.mem8 = state[43];
this.fpu = state[44];
this.sreg = state[40];
this.dreg = state[41];
this.mem8 = state[42];
this.fpu = state[43];
this.devices.virtio = state[46];
this.devices.apic = state[47];
this.devices.rtc = state[48];
this.devices.pci = state[49];
this.devices.dma = state[50];
this.devices.acpi = state[51];
this.devices.hpet = state[52];
this.devices.vga = state[53];
this.devices.ps2 = state[54];
this.devices.uart = state[55];
this.devices.fdc = state[56];
this.devices.cdrom = state[57];
this.devices.hda = state[58];
this.devices.pit = state[59];
this.devices.net = state[60];
this.devices.pic = state[61];
this.devices.virtio = state[45];
this.devices.apic = state[46];
this.devices.rtc = state[47];
this.devices.pci = state[48];
this.devices.dma = state[49];
this.devices.acpi = state[50];
this.devices.hpet = state[51];
this.devices.vga = state[52];
this.devices.ps2 = state[53];
this.devices.uart = state[54];
this.devices.fdc = state[55];
this.devices.cdrom = state[56];
this.devices.hda = state[57];
this.devices.pit = state[58];
this.devices.net = state[59];
this.devices.pic = state[60];
this.a20_enabled = state[62];
this.fw_value = state[63];
this.a20_enabled = state[61];
this.fw_value = state[62];
this.devices.ioapic = state[64];
this.devices.ioapic = state[63];
this.tss_size_32 = state[64];
this.reg_mmxs = state[65];
this.mem16 = new Uint16Array(this.mem8.buffer, this.mem8.byteOffset, this.mem8.length >> 1);
this.mem32s = new Int32Array(this.mem8.buffer, this.mem8.byteOffset, this.mem8.length >> 2);