diff options
author | Fei Peng <fei.peng@intel.com> | 2018-03-23 16:15:47 -0700 |
---|---|---|
committer | Fei Peng <fei.peng@intel.com> | 2018-03-27 11:44:23 -0700 |
commit | ea59eab2637581c8388f66e1cbbd00d1e924a3be (patch) | |
tree | 4c5d2e4c1d1ce83ff5a913f871fc3ecb193e0a0e /src/jit | |
parent | 4b95b41d93e7b267c972fe60e0fe9f2068cbeb1c (diff) | |
download | coreclr-ea59eab2637581c8388f66e1cbbd00d1e924a3be.tar.gz coreclr-ea59eab2637581c8388f66e1cbbd00d1e924a3be.tar.bz2 coreclr-ea59eab2637581c8388f66e1cbbd00d1e924a3be.zip |
fix vextracti128 code-size
Diffstat (limited to 'src/jit')
-rw-r--r-- | src/jit/emitxarch.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp index 094776b17d..cb79bf3b41 100644 --- a/src/jit/emitxarch.cpp +++ b/src/jit/emitxarch.cpp @@ -5076,8 +5076,7 @@ void emitter::emitIns_AR_R_I(instruction ins, emitAttr attr, regNumber base, int assert(ins == INS_vextracti128 || ins == INS_vextractf128); assert(base != REG_NA); assert(ireg != REG_NA); - UNATIVE_OFFSET sz; - instrDesc* id = emitNewInstrAmdCns(attr, disp, ival); + instrDesc* id = emitNewInstrAmdCns(attr, disp, ival); id->idIns(ins); id->idInsFmt(IF_AWR_RRD_CNS); @@ -5087,8 +5086,8 @@ void emitter::emitIns_AR_R_I(instruction ins, emitAttr attr, regNumber base, int assert(emitGetInsAmdAny(id) == disp); // make sure "disp" is stored properly - // the code size of "vextracti/f128 [mem], ymm, imm8" is 6 byte - sz = 6; + // Plus one for the 1-byte immediate (ival) + UNATIVE_OFFSET sz = emitInsSizeAM(id, insCodeMR(ins)) + emitGetVexPrefixAdjustedSize(ins, attr, insCodeMR(ins)) + 1; id->idCodeSize(sz); dispIns(id); |