[PATCH] D17767: [ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag with curly braces

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 04:05:22 PST 2016


delena added inline comments.

================
Comment at: lib/MC/MCParser/AsmParser.cpp:1826
@@ +1825,3 @@
+bool AsmParser::parseCurlyBlockScope(
+    SmallVectorImpl<AsmRewrite> &AsmStrRewrites) {
+  // Identify curly brace marking block start/end
----------------
line alignment

================
Comment at: lib/MC/MCParser/AsmParser.cpp:1838
@@ +1837,3 @@
+  AsmStrRewrites.emplace_back(AOK_Skip, StartLoc, Lexer.getLoc().getPointer() -
+                                                      StartLoc.getPointer());
+  return true;
----------------
line alignment

================
Comment at: lib/MC/MCParser/AsmParser.cpp:5006
@@ +5005,3 @@
+    // Parse curly braces marking block start/end
+    if (parseCurlyBlockScope(AsmStrRewrites)) {
+      continue;
----------------
remove {}

================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2307
@@ -2306,2 +2306,3 @@
 
+  bool CurlyAsEndOfStatement = false;
   // This does the actual operand parsing.  Don't parse any more if we have a
----------------
auto isCurlyBrace = []() {
  return getLexer().is(AsmToken::LCurly) || getLexer().is(AsmToken::RCurly);
}

================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2340
@@ -2335,1 +2339,3 @@
+        (getLexer().is(AsmToken::LCurly) || getLexer().is(AsmToken::RCurly));
+    if (getLexer().isNot(AsmToken::EndOfStatement) && !CurlyAsEndOfStatement)
       return ErrorAndEatStatement(getLexer().getLoc(),
----------------
if (getLexer().isNot(AsmToken::EndOfStatement) && !isCurlyBrace())

================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2349
@@ -2342,1 +2348,3 @@
     Parser.Lex();
+  else if (CurlyAsEndOfStatement)
+    // Add an actual EndOfStatement before the curly brac
----------------
else if (isCurlyBrace())

================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2350
@@ +2349,3 @@
+  else if (CurlyAsEndOfStatement)
+    // Add an actual EndOfStatement before the curly brac
+    Info.AsmRewrites->emplace_back(AOK_EndOfStatement,
----------------
brace


Repository:
  rL LLVM

http://reviews.llvm.org/D17767





More information about the llvm-commits mailing list