[llvm-commits] [llvm] r155896 - /llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp
Craig Topper
craig.topper at gmail.com
Mon Apr 30 23:34:01 PDT 2012
Author: ctopper
Date: Tue May 1 01:34:01 2012
New Revision: 155896
URL: http://llvm.org/viewvc/llvm-project?rev=155896&view=rev
Log:
Attempt to handle MRMInitReg in emitVEXOpcodePrefix. Hopefully fixes PR12711.
Modified:
llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp
Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=155896&r1=155895&r2=155896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Tue May 1 01:34:01 2012
@@ -939,7 +939,18 @@
// Classify VEX_B, VEX_4V, VEX_R, VEX_X
unsigned CurOp = 0;
switch (TSFlags & X86II::FormMask) {
- case X86II::MRMInitReg: llvm_unreachable("FIXME: Remove this!");
+ case X86II::MRMInitReg:
+ // Duplicate register.
+ if (X86II::isX86_64ExtendedReg(MI.getOperand(CurOp).getReg()))
+ VEX_R = 0x0;
+
+ if (HasVEX_4V)
+ VEX_4V = getVEXRegisterEncoding(MI, CurOp);
+ if (X86II::isX86_64ExtendedReg(MI.getOperand(CurOp).getReg()))
+ VEX_B = 0x0;
+ if (HasVEX_4VOp3)
+ VEX_4V = getVEXRegisterEncoding(MI, CurOp);
+ break;
case X86II::MRMDestMem: {
// MRMDestMem instructions forms:
// MemAddr, src1(ModR/M)
More information about the llvm-commits
mailing list