[llvm] r320898 - [X86] Add back the assert from r320830 that was reverted in r320850
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 15 16:33:16 PST 2017
Author: ctopper
Date: Fri Dec 15 16:33:16 2017
New Revision: 320898
URL: http://llvm.org/viewvc/llvm-project?rev=320898&view=rev
Log:
[X86] Add back the assert from r320830 that was reverted in r320850
Hopefully r320864 has fixed the offending case that failed the assert.
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp?rev=320898&r1=320897&r2=320898&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp Fri Dec 15 16:33:16 2017
@@ -1130,6 +1130,8 @@ bool X86MCCodeEmitter::emitOpcodePrefix(
EmitByte(0x40 | REX, CurByte, OS);
Ret = true;
}
+ } else {
+ assert(!(TSFlags & X86II::REX_W) && "REX.W requires 64bit mode.");
}
// 0x0F escape code must be emitted just before the opcode.
More information about the llvm-commits
mailing list