Skip to content

Commit edd3ddd

Browse files
committed
Ensure TakesRexWPrefix works on x86
1 parent f6459ad commit edd3ddd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/coreclr/jit/emitxarch.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,13 @@ emitter::code_t emitter::AddVexPrefix(instruction ins, code_t code, emitAttr att
11781178
// Returns true if this instruction, for the given EA_SIZE(attr), will require a REX.W prefix
11791179
bool emitter::TakesRexWPrefix(const instrDesc* id) const
11801180
{
1181+
#if defined(TARGET_X86)
1182+
if (!UseVEXEncoding())
1183+
{
1184+
return false;
1185+
}
1186+
#endif // TARGET_X86
1187+
11811188
instruction ins = id->idIns();
11821189
emitAttr attr = id->idOpSize();
11831190

0 commit comments

Comments
 (0)