From: Konstantin Baladurin Date: Thu, 6 Jul 2017 11:21:42 +0000 (+0300) Subject: JIT: Fix calculation of opcodeOffsets in Compiler::impImportBlockCode X-Git-Tag: submit/tizen/20210909.063632~11030^2~6513^2~160^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba1c19654118a2a09f30bafcea67565317f315f8;p=platform%2Fupstream%2Fdotnet%2Fruntime.git JIT: Fix calculation of opcodeOffsets in Compiler::impImportBlockCode Commit migrated from https://github.com/dotnet/coreclr/commit/e6167a0742157f152c399fd390a0d41d62edff2a --- diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index e325d05..4774c24 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -9972,9 +9972,9 @@ void Compiler::impImportBlockCode(BasicBlock* block) } cval; case CEE_PREFIX1: - opcode = (OPCODE)(getU1LittleEndian(codeAddr) + 256); - codeAddr += sizeof(__int8); + opcode = (OPCODE)(getU1LittleEndian(codeAddr) + 256); opcodeOffs = (IL_OFFSET)(codeAddr - info.compCode); + codeAddr += sizeof(__int8); goto DECODE_OPCODE; SPILL_APPEND: @@ -12448,9 +12448,9 @@ void Compiler::impImportBlockCode(BasicBlock* block) impValidateMemoryAccessOpcode(codeAddr, codeEndp, false); PREFIX: - opcode = (OPCODE)getU1LittleEndian(codeAddr); - codeAddr += sizeof(__int8); + opcode = (OPCODE)getU1LittleEndian(codeAddr); opcodeOffs = (IL_OFFSET)(codeAddr - info.compCode); + codeAddr += sizeof(__int8); goto DECODE_OPCODE; case CEE_VOLATILE: