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

Unified Diff: lib/Target/X86/MCTargetDesc/X86MCNaCl.cpp

Issue 1181263004: subclassed MCAsmStreamer (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 6 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/X86/MCTargetDesc/CMakeLists.txt ('k') | lib/Target/X86/MCTargetDesc/X86MCNaClAsmStreamer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/X86/MCTargetDesc/X86MCNaCl.cpp
diff --git a/lib/Target/X86/MCTargetDesc/X86MCNaCl.cpp b/lib/Target/X86/MCTargetDesc/X86MCNaCl.cpp
index 724d75bbd78e0471411a12636007c1314993d766..0bacda8d7c59104a25c46ea9c96c788771913002 100644
--- a/lib/Target/X86/MCTargetDesc/X86MCNaCl.cpp
+++ b/lib/Target/X86/MCTargetDesc/X86MCNaCl.cpp
@@ -481,11 +481,14 @@ bool CustomExpandInstNaClX86(const llvm::MCSubtargetInfo &STI,
const MCInst &Inst, MCStreamer &Out,
X86MCNaClSFIState &State) {
// If we are emitting to .s, only sandbox pseudos not supported by gas.
+
if (Out.hasRawTextSupport()) {
if (!(Inst.getOpcode() == X86::NACL_ANDSPi8 ||
- Inst.getOpcode() == X86::NACL_ANDSPi32))
+ Inst.getOpcode() == X86::NACL_ANDSPi32 ||
+ Inst.getOpcode() == X86::RETL))
return false;
}
+
// If we make a call to EmitInstruction, we will be called recursively. In
// this case we just want the raw instruction to be emitted instead of
// handling the insruction here.
@@ -536,6 +539,7 @@ bool CustomExpandInstNaClX86(const llvm::MCSubtargetInfo &STI,
assert(State.PrefixSaved == 0);
EmitIndirectBranch(STI, Inst.getOperand(0), true, false, Out);
return true;
+ case X86::RETL:
case X86::NACL_RET32:
assert(State.PrefixSaved == 0);
EmitRet(STI, NULL, false, Out);
« no previous file with comments | « lib/Target/X86/MCTargetDesc/CMakeLists.txt ('k') | lib/Target/X86/MCTargetDesc/X86MCNaClAsmStreamer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698