Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: lib/Target/Mips/MipsAsmPrinter.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Target/Mips/MipsAsmPrinter.h ('k') | lib/Target/Mips/MipsISelLowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/Mips/MipsAsmPrinter.cpp
diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp
index 832fa05be0d7cb1a8399104e9f7c23637a7e6ad7..0e35858ab4d3618a7830d144713224578606e555 100644
--- a/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -39,6 +39,7 @@
#include "llvm/MC/MCELFStreamer.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
+#include "llvm/MC/MCNaCl.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSymbol.h"
@@ -741,7 +742,33 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {
Subtarget->isABI_FPXX()))
getTargetStreamer().emitDirectiveModuleOddSPReg(Subtarget->useOddSPReg(),
Subtarget->isABI_O32());
+
+ // @LOCALMOD-START
+ if (Subtarget->isTargetNaCl()) {
+ initializeNaClMCStreamer(OutStreamer, OutContext,
+ Triple(Subtarget->getTargetTriple()));
+ }
+ // @LOCALMOD-END
+}
+
+// @LOCALMOD-START
+unsigned MipsAsmPrinter::GetTargetLabelAlign(const MachineInstr *MI) const {
+ if (Subtarget->isTargetNaCl()) {
+ switch (MI->getOpcode()) {
+ default: return 0;
+ // These labels may indicate an indirect entry point that is
+ // externally reachable and hence must be bundle aligned.
+ // Note: these labels appear to be always at basic block beginnings
+ // so it may be possible to simply set the MBB alignment.
+ // However, it is unclear whether this always holds.
+ case TargetOpcode::EH_LABEL:
+ case TargetOpcode::GC_LABEL:
+ return 4;
+ }
+ }
+ return 0;
}
+// @LOCALMOD-END
void MipsAsmPrinter::EmitJal(MCSymbol *Symbol) {
MCInst I;
« no previous file with comments | « lib/Target/Mips/MipsAsmPrinter.h ('k') | lib/Target/Mips/MipsISelLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698