From 20469fe4effedd65f73d45faab613dd9e310ffc2 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Fri, 29 May 2020 13:20:22 -0700 Subject: [PATCH] An attempt to make v86 ignore endbr32/endbr64 instructions (#344) An attempt to make v86 ignore endbr32/endbr64 instructions --- src/instructions.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/instructions.js b/src/instructions.js index 17cbf618..1f7d1a6d 100644 --- a/src/instructions.js +++ b/src/instructions.js @@ -1930,7 +1930,12 @@ t[0x1A] = cpu => { cpu.unimplemented_sse(); }; t[0x1B] = cpu => { cpu.unimplemented_sse(); }; t[0x1C] = cpu => { cpu.unimplemented_sse(); }; t[0x1D] = cpu => { cpu.unimplemented_sse(); }; -t[0x1E] = cpu => { cpu.unimplemented_sse(); }; +// endbr32/endbr64 +t[0x1E] = cpu => { cpu.read_modrm_byte() + // multi-byte nop + if(cpu.modrm_byte < 0xC0) + cpu.modrm_resolve(cpu.modrm_byte); +}; t[0x1F] = cpu => { cpu.read_modrm_byte() // multi-byte nop if(cpu.modrm_byte < 0xC0)