<div dir="ltr">This should go to llvm-commits as a proper review. Do you want to do that David? Want someone on our end to pick it up?</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 7, 2018 at 3:27 PM David Woodhouse <<a href="mailto:dwmw2@infradead.org">dwmw2@infradead.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 2018-02-07 at 21:55 +0000, David Woodhouse via llvm-dev wrote:<br>
> Can you take care of filing the tickets for %V0 and "=q"<br>
> and attribute__((indirect_branch("keep"))) please? With those fixed, I<br>
> think we should be OK again.<br>
<br>
Here's %V0 support, which makes the hypervisor guest support build.<br>
<br>
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp<br>
index 4da7d59df46..f498c098288 100644<br>
--- a/lib/Target/X86/X86AsmPrinter.cpp<br>
+++ b/lib/Target/X86/X86AsmPrinter.cpp<br>
@@ -370,6 +370,8 @@ static void printIntelMemReference(X86AsmPrinter &P, const MachineInstr *MI,<br>
static bool printAsmMRegister(X86AsmPrinter &P, const MachineOperand &MO,<br>
char Mode, raw_ostream &O) {<br>
unsigned Reg = MO.getReg();<br>
+ bool emit_pct = true;<br>
+<br>
switch (Mode) {<br>
default: return true; // Unknown mode.<br>
case 'b': // Print QImode register<br>
@@ -384,6 +386,9 @@ static bool printAsmMRegister(X86AsmPrinter &P, const MachineOperand &MO,<br>
case 'k': // Print SImode register<br>
Reg = getX86SubSuperRegister(Reg, 32);<br>
break;<br>
+ case 'V':<br>
+ emit_pct = false;<br>
+ /* fall through */<br>
case 'q':<br>
// Print 64-bit register names if 64-bit integer registers are available.<br>
// Otherwise, print 32-bit register names.<br>
@@ -391,7 +396,10 @@ static bool printAsmMRegister(X86AsmPrinter &P, const MachineOperand &MO,<br>
break;<br>
}<br>
<br>
- O << '%' << X86ATTInstPrinter::getRegisterName(Reg);<br>
+ if (emit_pct)<br>
+ O << '%';<br>
+<br>
+ O << X86ATTInstPrinter::getRegisterName(Reg);<br>
return false;<br>
}<br>
<br>
@@ -464,6 +472,7 @@ bool X86AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,<br>
case 'w': // Print HImode register<br>
case 'k': // Print SImode register<br>
case 'q': // Print DImode register<br>
+ case 'V': // Print native register without '%'<br>
if (MO.isReg())<br>
return printAsmMRegister(*this, MO, ExtraCode[0], O);<br>
printOperand(*this, MI, OpNo, O);<br>
<br>
--<br>
dwmw2<br>
</blockquote></div>