diff options
author | Wesley Peck <peckw@wesleypeck.com> | 2010-10-21 19:48:38 +0000 |
---|---|---|
committer | Wesley Peck <peckw@wesleypeck.com> | 2010-10-21 19:48:38 +0000 |
commit | 4da992aebada7445ef68a7b6b94676dd26e9d537 (patch) | |
tree | 535f86b7d5284f8c0be9ee7364e1acfd0ac9a971 /lib/Target/MBlaze/MBlazeISelLowering.h | |
parent | bc078c81e66cbd0263fb75f533a63ac7dd1f137d (diff) | |
download | llvm-4da992aebada7445ef68a7b6b94676dd26e9d537.tar.gz llvm-4da992aebada7445ef68a7b6b94676dd26e9d537.tar.bz2 llvm-4da992aebada7445ef68a7b6b94676dd26e9d537.tar.xz |
Adding initial AsmParser implementation for the MBlaze backend. It is
mostly based on the ARM AsmParser at this time and is not particularly
functional.
Changed the MBlaze data layout from:
"E-p:32:32-i8:8:8-i16:16:16-i64:32:32-f64:32:32-v64:32:32-v128:32:32-n32"
to:
"E-p:32:32:32-i8:8:8-i16:16:16"
because the MicroBlaze doesn't have i64, f64, v64, or v128 data types.
Cleaned up the MBlaze source code:
1. The floating point register class has been removed. The
MicroBlaze does not have floating point registers. Floating
point values are simply stored in integer registers.
2. Renaming the CPURegs register class to GPR to reflect the
standard naming.
3. Removing a lot of stale code from AsmPrinter after
the conversion to InstPrinter.
4. Simplified sign extended loads by marking them as
expanded in ISelLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MBlaze/MBlazeISelLowering.h')
-rw-r--r-- | lib/Target/MBlaze/MBlazeISelLowering.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Target/MBlaze/MBlazeISelLowering.h b/lib/Target/MBlaze/MBlazeISelLowering.h index 5ec2563c55..b900341b67 100644 --- a/lib/Target/MBlaze/MBlazeISelLowering.h +++ b/lib/Target/MBlaze/MBlazeISelLowering.h @@ -15,6 +15,7 @@ #ifndef MBlazeISELLOWERING_H #define MBlazeISELLOWERING_H +#include "llvm/Support/ErrorHandling.h" #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/Target/TargetLowering.h" #include "MBlaze.h" @@ -31,6 +32,30 @@ namespace llvm { GE, LE }; + + inline static CC getOppositeCondition(CC cc) { + switch (cc) { + default: llvm_unreachable("Unknown condition code"); + case EQ: return NE; + case NE: return EQ; + case GT: return LE; + case LT: return GE; + case GE: return LT; + case LE: return GE; + } + } + + inline static const char *MBlazeCCToString(CC cc) { + switch (cc) { + default: llvm_unreachable("Unknown condition code"); + case EQ: return "eq"; + case NE: return "ne"; + case GT: return "gt"; + case LT: return "lt"; + case GE: return "ge"; + case LE: return "le"; + } + } } namespace MBlazeISD { |