Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c9ddfbf

Browse files
authored
Merge pull request #17180 from fiigii/fixavxtests
Fix the code-size estimation for AVX/AVX2 ExtractVector128
2 parents 3602c17 + ea59eab commit c9ddfbf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/jit/emitxarch.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5076,8 +5076,7 @@ void emitter::emitIns_AR_R_I(instruction ins, emitAttr attr, regNumber base, int
50765076
assert(ins == INS_vextracti128 || ins == INS_vextractf128);
50775077
assert(base != REG_NA);
50785078
assert(ireg != REG_NA);
5079-
UNATIVE_OFFSET sz;
5080-
instrDesc* id = emitNewInstrAmdCns(attr, disp, ival);
5079+
instrDesc* id = emitNewInstrAmdCns(attr, disp, ival);
50815080

50825081
id->idIns(ins);
50835082
id->idInsFmt(IF_AWR_RRD_CNS);
@@ -5087,8 +5086,8 @@ void emitter::emitIns_AR_R_I(instruction ins, emitAttr attr, regNumber base, int
50875086

50885087
assert(emitGetInsAmdAny(id) == disp); // make sure "disp" is stored properly
50895088

5090-
// the code size of "vextracti/f128 [mem], ymm, imm8" is 6 byte
5091-
sz = 6;
5089+
// Plus one for the 1-byte immediate (ival)
5090+
UNATIVE_OFFSET sz = emitInsSizeAM(id, insCodeMR(ins)) + emitGetVexPrefixAdjustedSize(ins, attr, insCodeMR(ins)) + 1;
50925091
id->idCodeSize(sz);
50935092

50945093
dispIns(id);

0 commit comments

Comments
 (0)