summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h
diff options
context:
space:
mode:
authorJack Carter <jcarter@mips.com>2012-10-02 23:09:40 +0000
committerJack Carter <jcarter@mips.com>2012-10-02 23:09:40 +0000
commit8e71e617c9b1e42737ffd00984a5025ec90c734c (patch)
tree09cfd105bdd0824cfbfac125790f81973bc153a4 /lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h
parent5c5b3cf5b8af06b8e9347f3f45e8c67438ffd446 (diff)
downloadllvm-8e71e617c9b1e42737ffd00984a5025ec90c734c.tar.gz
llvm-8e71e617c9b1e42737ffd00984a5025ec90c734c.tar.bz2
llvm-8e71e617c9b1e42737ffd00984a5025ec90c734c.tar.xz
The mips 64bit instructions DSLL, DSRA, DSRL, DEXT and DINS get transformed by the assembler or through codegen direct object output to other variants based on the value of the immediate values of the operands.
If the code is generated as assembler, this transformation does not occur assuming that it will occur later in the assembler. This code was originally called from MipsAsmPrinter.cpp and we needed to check for OutStreamer.hasRawTextSupport(). This was not a good place for it and has been moved to MCTargetDesc/MipsMCCodeEmitter.cpp where both direct object and the assembler use it it automagically. The test cases have been checked in for a number of weeks now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165067 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h')
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h b/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h
new file mode 100644
index 0000000000..8813cc9ac7
--- /dev/null
+++ b/lib/Target/Mips/MCTargetDesc/MipsDirectObjLower.h
@@ -0,0 +1,28 @@
+//===-- MipsDirectObjLower.h - Mips LLVM direct object lowering *- C++ -*--===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MIPSDIRECTOBJLOWER_H
+#define MIPSDIRECTOBJLOWER_H
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/Compiler.h"
+
+namespace llvm {
+ class MCInst;
+ class MCStreamer;
+
+ namespace Mips {
+ /// MipsDirectObjLower - This name space is used to lower MCInstr in cases
+ // where the assembler usually finishes the lowering
+ // such as large shifts.
+ void LowerLargeShift(MCInst &Inst);
+ void LowerDextDins(MCInst &Inst);
+ }
+}
+
+#endif