summaryrefslogtreecommitdiffstats
path: root/tester/covoar/Target_lm32.cc
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-05-09 21:50:37 +1000
committerChris Johns <chrisj@rtems.org>2014-06-18 16:48:08 +1200
commit100f517ab37265acdf067e36b6860020ec8b2184 (patch)
tree2316c8b888e11dcbcfbfc66a0c1e31991ea20656 /tester/covoar/Target_lm32.cc
parent4.11: Add ntp patch. (diff)
downloadrtems-tools-100f517ab37265acdf067e36b6860020ec8b2184.tar.bz2
covoar: Merger the covoar source from rtems-testing.git.
Use waf to build covoar.
Diffstat (limited to 'tester/covoar/Target_lm32.cc')
-rw-r--r--tester/covoar/Target_lm32.cc52
1 files changed, 52 insertions, 0 deletions
diff --git a/tester/covoar/Target_lm32.cc b/tester/covoar/Target_lm32.cc
new file mode 100644
index 0000000..988c735
--- /dev/null
+++ b/tester/covoar/Target_lm32.cc
@@ -0,0 +1,52 @@
+/*! @file Target_lm32.cc
+ * @brief Target_lm32 Implementation
+ *
+ * This file contains the implementation of the base class for
+ * functions supporting target unique functionallity.
+ */
+#include "Target_lm32.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <algorithm>
+
+namespace Target {
+
+ // http://www.latticesemi.com/documents/doc20890x45.pdf
+ Target_lm32::Target_lm32( std::string targetName ):
+ TargetBase( targetName )
+ {
+ branchInstructions.push_back("be");
+ branchInstructions.push_back("bge");
+ branchInstructions.push_back("bgeu");
+ branchInstructions.push_back("bg");
+ branchInstructions.push_back("bgu");
+ branchInstructions.push_back("bne");
+ }
+
+ Target_lm32::~Target_lm32()
+ {
+ }
+
+ bool Target_lm32::isNopLine(
+ const char* const line,
+ int& size
+ )
+ {
+ if (!strcmp( &line[strlen(line)-3], "nop")) {
+ size = 4;
+ return true;
+ }
+
+ return false;
+ }
+
+ TargetBase *Target_lm32_Constructor(
+ std::string targetName
+ )
+ {
+ return new Target_lm32( targetName );
+ }
+
+}