summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsInstrInfo.h
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-09-14 03:00:41 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2011-09-14 03:00:41 +0000
commitc4cc40c001e23dbeb6cb9953715177ccb314fbf1 (patch)
tree373c51220f6643e910fc44ddf0f236806f0dd86d /lib/Target/Mips/MipsInstrInfo.h
parent484ddf54c9f9765e65c46ae435e0143d68d259e2 (diff)
downloadllvm-c4cc40c001e23dbeb6cb9953715177ccb314fbf1.tar.gz
llvm-c4cc40c001e23dbeb6cb9953715177ccb314fbf1.tar.bz2
llvm-c4cc40c001e23dbeb6cb9953715177ccb314fbf1.tar.xz
One more patch towards JIT support for Mips.
- Add TSFlags for the instruction formats. The idea here is to use as much encoding as possible from getBinaryCodeForInstr, and having TSFLags formats for that would make it easier to encode most part of the instructions (since Mips encodings are pretty straightforward) - Improve the mips mechanism for compilation callback - Add Mips specific code for invalidating the instruction cache - Next patch will address wrong tablegen encoding Commit msg added by my own but the patch is from Sasa Stankovic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrInfo.h')
-rw-r--r--lib/Target/Mips/MipsInstrInfo.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsInstrInfo.h b/lib/Target/Mips/MipsInstrInfo.h
index 4421c4862f..274f30761a 100644
--- a/lib/Target/Mips/MipsInstrInfo.h
+++ b/lib/Target/Mips/MipsInstrInfo.h
@@ -74,6 +74,33 @@ namespace MipsII {
MO_TPREL_HI,
MO_TPREL_LO
};
+
+ enum {
+ //===------------------------------------------------------------------===//
+ // Instruction encodings. These are the standard/most common forms for
+ // Mips instructions.
+ //
+
+ // Pseudo - This represents an instruction that is a pseudo instruction
+ // or one that has not been implemented yet. It is illegal to code generate
+ // it, but tolerated for intermediate implementation stages.
+ Pseudo = 0,
+
+ /// FrmR - This form is for instructions of the format R.
+ FrmR = 1,
+ /// FrmI - This form is for instructions of the format I.
+ FrmI = 2,
+ /// FrmJ - This form is for instructions of the format J.
+ FrmJ = 3,
+ /// FrmFR - This form is for instructions of the format FR.
+ FrmFR = 4,
+ /// FrmFI - This form is for instructions of the format FI.
+ FrmFI = 5,
+ /// FrmOther - This form is for instructions that have no specific format.
+ FrmOther = 6,
+
+ FormMask = 15
+ };
}
class MipsInstrInfo : public MipsGenInstrInfo {