[PATCH] D20046: [AVR] Add assembly parser

Simon Cook via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 00:51:18 PDT 2016


simoncook added a subscriber: simoncook.

================
Comment at: lib/Target/AVR/AsmParser/AVRAsmParser.cpp:10
@@ +9,3 @@
+
+#include <sstream>
+
----------------
It's not clear why this line is here, I couldn't see any use of std::stringstream, std::stringbuf, etc.?

================
Comment at: lib/Target/AVR/AsmParser/AVRAsmParser.cpp:45
@@ +44,3 @@
+#define GET_ASSEMBLER_HEADER
+#include "AVRGenAsmMatcher.inc"
+
----------------
I don't see this being generated. I think you're missing the -gen-asm-matcher line from your CMakeLists.txt.

Likewise, I think you're missing the has_asmparser = 1 part of LLVMBuild.txt

================
Comment at: lib/Target/AVR/AsmParser/AVRAsmParser.cpp:251
@@ +250,3 @@
+/// Maps from the set of all alternative registernames to a register number.
+/// \note Generated by TableGen.
+static unsigned MatchRegisterAltName(StringRef Name);
----------------
You might want to make these two generated by TableGen comments consistent.

================
Comment at: lib/Target/AVR/AsmParser/AVRAsmParser.cpp:403
@@ +402,3 @@
+  // Check for sign
+  {
+    AsmToken tokens[2];
----------------
It's not clear why you're starting a block here?


https://reviews.llvm.org/D20046





More information about the llvm-commits mailing list