summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2016-09-28 14:34:42 +0000
committerDylan McKay <dylanmckay34@gmail.com>2016-09-28 14:34:42 +0000
commitf010a2b41a1674d39ed29d4eafd61e9f160321a3 (patch)
tree88269a1e9506a9f8ff8b6acd8976df788050f6e8 /llvm/lib
parent220a8730fb0532eb0ec0739d2185b565b9470ddd (diff)
downloadbcm5719-llvm-f010a2b41a1674d39ed29d4eafd61e9f160321a3.tar.gz
bcm5719-llvm-f010a2b41a1674d39ed29d4eafd61e9f160321a3.zip
[AVR] Enable the assembly parser
We very recently landed the code. This commit enables the parser. It also adds a missing include to AVRAsmParser.cpp llvm-svn: 282593
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AVR/AVR.td31
-rw-r--r--llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp2
2 files changed, 18 insertions, 15 deletions
diff --git a/llvm/lib/Target/AVR/AVR.td b/llvm/lib/Target/AVR/AVR.td
index 27cf212704f..949b30d5197 100644
--- a/llvm/lib/Target/AVR/AVR.td
+++ b/llvm/lib/Target/AVR/AVR.td
@@ -537,27 +537,28 @@ include "AVRCallingConv.td"
// Assembly Parsers
//===---------------------------------------------------------------------===//
-// def AVRAsmParser : AsmParser {
-// let ShouldEmitMatchRegisterName = 1;
-// let ShouldEmitMatchRegisterAltName = 1;
-// }
+def AVRAsmParser : AsmParser {
+ let ShouldEmitMatchRegisterName = 1;
+ let ShouldEmitMatchRegisterAltName = 1;
+}
-// def AVRAsmParserVariant : AsmParserVariant {
-// int Variant = 0;
-//
-// // Recognize hard coded registers.
-// string RegisterPrefix = "$";
-// }
+def AVRAsmParserVariant : AsmParserVariant {
+ int Variant = 0;
+
+ // Recognize hard coded registers.
+ string RegisterPrefix = "$";
+ string TokenizingCharacters = "+";
+}
//===---------------------------------------------------------------------===//
// Target Declaration
//===---------------------------------------------------------------------===//
def AVR : Target {
- let InstructionSet = AVRInstrInfo;
-// let AssemblyWriters = [AVRAsmWriter];
-//
-// let AssemblyParsers = [AVRAsmParser];
-// let AssemblyParserVariants = [AVRAsmParserVariant];
+ let InstructionSet = AVRInstrInfo;
+ /* let AssemblyWriters = [AVRAsmWriter]; */
+
+ let AssemblyParsers = [AVRAsmParser];
+ let AssemblyParserVariants = [AVRAsmParserVariant];
}
diff --git a/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp b/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
index 94229442d3f..4aeac446db2 100644
--- a/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
+++ b/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
@@ -29,6 +29,8 @@
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/TargetRegistry.h"
+#include <sstream>
+
#define DEBUG_TYPE "avr-asm-parser"
namespace llvm {
OpenPOWER on IntegriCloud