From 763f5975d1dbb120cab5c54b0169b0d4f3ba5d7c Mon Sep 17 00:00:00 2001 From: kobalicek Date: Wed, 14 Aug 2019 08:58:51 +0200 Subject: [PATCH] Fixed wrong VEX/EVEX broadcast calculation [Bug] --- src/asmjit/x86/x86assembler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asmjit/x86/x86assembler.cpp b/src/asmjit/x86/x86assembler.cpp index e502ac7..bf332e2 100644 --- a/src/asmjit/x86/x86assembler.cpp +++ b/src/asmjit/x86/x86assembler.cpp @@ -4271,7 +4271,7 @@ EmitVexEvexM: writer.emit32uLE(x); writer.emit8(opcode.v); - if (opcode & 0x10000000u) { + if (x & 0x10000000u) { // Broadcast, change the compressed displacement scale to either x4 (SHL 2) or x8 (SHL 3) // depending on instruction's W. If 'W' is 1 'SHL' must be 3, otherwise it must be 2. opcode &=~uint32_t(Opcode::kCDSHL_Mask);