diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2018-02-06 12:55:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 12:55:13 -0800 |
commit | 495ea5b26e7a84601ac425c60afee42446f8bfed (patch) | |
tree | 27a974f1e2c510cc5ff4b79b298c0ffe5d907f3e /src | |
parent | 3c5be9625d04d89279a5f7c02eaa04752eff5e03 (diff) | |
parent | 82bee49159bdfe0705dd741001ab656553de7e88 (diff) | |
download | coreclr-495ea5b26e7a84601ac425c60afee42446f8bfed.tar.gz coreclr-495ea5b26e7a84601ac425c60afee42446f8bfed.tar.bz2 coreclr-495ea5b26e7a84601ac425c60afee42446f8bfed.zip |
Merge pull request #16235 from CarolEidt/FixPrefetchBuildBreak
Disable prefetch instructions for LEGACY_BACKEND
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/emitxarch.cpp | 6 | ||||
-rw-r--r-- | src/jit/emitxarch.h | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp index 2ae99e8edf..55c50360e3 100644 --- a/src/jit/emitxarch.cpp +++ b/src/jit/emitxarch.cpp @@ -2029,9 +2029,9 @@ UNATIVE_OFFSET emitter::emitInsSizeAM(instrDesc* id, code_t code) assert((attrSize == EA_4BYTE) || (attrSize == EA_PTRSIZE) // Only for x64 || (attrSize == EA_16BYTE) || (attrSize == EA_32BYTE) // only for x64 - || (ins == INS_movzx) || (ins == INS_movsx) || (ins == INS_prefetcht0) || - (ins == INS_prefetcht1) // the prefetch instructions are always 3 bytes - || (ins == INS_prefetcht2) || (ins == INS_prefetchnta)); // and have part of their modr/m byte hardcoded + || (ins == INS_movzx) || (ins == INS_movsx) + // The prefetch instructions are always 3 bytes and have part of their modr/m byte hardcoded + || isPrefetch(ins)); size = 3; } else diff --git a/src/jit/emitxarch.h b/src/jit/emitxarch.h index 395934ed5f..2fb1dd1bc2 100644 --- a/src/jit/emitxarch.h +++ b/src/jit/emitxarch.h @@ -192,6 +192,10 @@ bool isSse41Blendv(instruction ins) { return ins == INS_blendvps || ins == INS_blendvpd || ins == INS_pblendvb; } +bool isPrefetch(instruction ins) +{ + return (ins == INS_prefetcht0) || (ins == INS_prefetcht1) || (ins == INS_prefetcht2) || (ins == INS_prefetchnta); +} #else // LEGACY_BACKEND bool UseVEXEncoding() { @@ -246,6 +250,11 @@ bool TakesVexPrefix(instruction ins) { return false; } +bool isPrefetch(instruction ins) +{ + return false; +} + code_t AddVexPrefixIfNeeded(instruction ins, code_t code, emitAttr attr) { return code; |