summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
diff options
context:
space:
mode:
authorVladimir Medic <Vladimir.Medic@imgtec.com>2014-03-04 09:54:09 +0000
committerVladimir Medic <Vladimir.Medic@imgtec.com>2014-03-04 09:54:09 +0000
commit7650bc0fd23f482d20b1e39f3c84289e9d605940 (patch)
treef7e4d9e85c5457b0d69cd827785091c9cc8ed4fd /lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
parentb62b44ccc5a6b147a41766bb39bc662fb0c589bd (diff)
downloadllvm-7650bc0fd23f482d20b1e39f3c84289e9d605940.tar.gz
llvm-7650bc0fd23f482d20b1e39f3c84289e9d605940.tar.bz2
llvm-7650bc0fd23f482d20b1e39f3c84289e9d605940.tar.xz
This patch implements .set mips32r2 directive and sets appropriate feature bits. It also introduces helper functions that are used to set and clear feature bits as necessary. This directive is a counterpart of -mips32r2 command line options with the exception that it does not influence elf header flags. The usage example is gives in test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp')
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
index 825c164472..a46191f12c 100644
--- a/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
+++ b/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
@@ -97,6 +97,10 @@ void MipsTargetAsmStreamer::emitFrame(unsigned StackReg, unsigned StackSize,
<< StringRef(MipsInstPrinter::getRegisterName(ReturnReg)).lower() << '\n';
}
+void MipsTargetAsmStreamer::emitDirectiveSetMips32R2() {
+ OS << "\t.set\tmips32r2\n";
+}
+
// Print a 32 bit hex number with all numbers.
static void printHex32(unsigned Value, raw_ostream &OS) {
OS << "0x";
@@ -302,3 +306,7 @@ void MipsTargetELFStreamer::emitFMask(unsigned FPUBitmask,
int FPUTopSavedRegOff) {
// FIXME: implement.
}
+
+void MipsTargetELFStreamer::emitDirectiveSetMips32R2() {
+ // No action required for ELF output.
+}