This commit is contained in:
Werner
2023-06-21 10:44:04 -03:00
parent 427b33f477
commit ddbc0255fe

View File

@ -410,7 +410,7 @@ export default function Home() {
novaInstrucao.issue = clock; novaInstrucao.issue = clock;
if ((UFParaUsar.tipoUnidade !== 'Store') && (UFParaUsar.operacao !== 'BEQ')) { if ((UFParaUsar.tipoUnidade !== 'Store') && (UFParaUsar.operacao !== 'BEQ') && (UFParaUsar.operacao !== 'BNEZ')) {
writeRegister(novaInstrucao.instrucao, novaInstrucao.posicao); writeRegister(novaInstrucao.instrucao, novaInstrucao.posicao);
} }
} }
@ -443,6 +443,15 @@ export default function Home() {
} }
} }
if (uf.instrucao?.operacao === "BNEZ") {
if (uf.instrucao?.registradorR != uf.instrucao?.registradorS) {
let entry = uf.estadoInstrucao.posicao;
instructionStatus[entry].discart = true;
instructionStatus[entry + 1].discart = true;
setInstructionStatus(instructionStatus);
}
}
if ((uf.ocupado) && (uf.vj !== null) && (uf.vk !== null)) { if ((uf.ocupado) && (uf.vj !== null) && (uf.vk !== null)) {
uf.tempo = uf.tempo - 1; uf.tempo = uf.tempo - 1;
uf.estadoInstrucao.busy = true; uf.estadoInstrucao.busy = true;