summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16.h
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-01-13 19:18:47 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-01-13 19:18:47 +0000
commit45da8b779cf942f5d9b9797e15c010c867559723 (patch)
treec8e17c5bddb3020fd72bb5d1ffea9b487e97ca0d /llvm/lib/Target/PIC16/PIC16.h
parent13141d553895502d07882bfe7e27296d8c0f9f3b (diff)
downloadbcm5719-llvm-45da8b779cf942f5d9b9797e15c010c867559723.tar.gz
bcm5719-llvm-45da8b779cf942f5d9b9797e15c010c867559723.zip
Checking in conditionals, function call, arrays and libcalls implementation.
llvm-svn: 62174
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16.h')
-rw-r--r--llvm/lib/Target/PIC16/PIC16.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16.h b/llvm/lib/Target/PIC16/PIC16.h
index 6850bd664bc..f9f51ab9cce 100644
--- a/llvm/lib/Target/PIC16/PIC16.h
+++ b/llvm/lib/Target/PIC16/PIC16.h
@@ -15,12 +15,39 @@
#ifndef LLVM_TARGET_PIC16_H
#define LLVM_TARGET_PIC16_H
+#include <iosfwd>
+#include <cassert>
+
namespace llvm {
class PIC16TargetMachine;
class FunctionPass;
class MachineCodeEmitter;
class raw_ostream;
+namespace PIC16CC {
+ enum CondCodes {
+ EQ,
+ NE,
+ LT,
+ LE,
+ GT,
+ GE
+ };
+}
+
+ inline static const char *PIC16CondCodeToString(PIC16CC::CondCodes CC) {
+ switch (CC) {
+ default: assert(0 && "Unknown condition code");
+ case PIC16CC::NE: return "ne";
+ case PIC16CC::EQ: return "eq";
+ case PIC16CC::LT: return "lt";
+ case PIC16CC::LE: return "le";
+ case PIC16CC::GT: return "gt";
+ case PIC16CC::GE: return "ge";
+ }
+ }
+
+
FunctionPass *createPIC16ISelDag(PIC16TargetMachine &TM);
FunctionPass *createPIC16CodePrinterPass(raw_ostream &OS,
PIC16TargetMachine &TM);
OpenPOWER on IntegriCloud