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

Unified Diff: src/IceTargetLoweringX86Base.h

Issue 1616483003: Merged addProlog and addEpilog on x86. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 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
Index: src/IceTargetLoweringX86Base.h
diff --git a/src/IceTargetLoweringX86Base.h b/src/IceTargetLoweringX86Base.h
index 72e4f20fb42f5d29ef340d8a039b4a835a09c1d1..7ee93b30fbdb8b3d695e0259e1d5e76aff5346e8 100644
--- a/src/IceTargetLoweringX86Base.h
+++ b/src/IceTargetLoweringX86Base.h
@@ -177,9 +177,11 @@ public:
"Hey, yo! This is x86-64. Watcha doin'? (hiOperand)");
}
+ void addProlog(CfgNode *Node) override;
void finishArgumentLowering(Variable *Arg, Variable *FramePtr,
size_t BasicFrameOffset, size_t StackAdjBytes,
size_t &InArgsSizeBytes);
+ void addEpilog(CfgNode *Node) override;
X86Address stackVarToAsmOperand(const Variable *Var) const;
InstructionSetEnum getInstructionSet() const { return InstructionSet; }
@@ -282,6 +284,13 @@ protected:
void scalarizeArithmetic(InstArithmetic::OpKind K, Variable *Dest,
Operand *Src0, Operand *Src1);
+ void emitGetIP(CfgNode *Node) {
+ dispatchToConcrete(&Traits::ConcreteTarget::emitGetIP, std::move(Node));
+ }
+ /// Emit a sandboxed return sequence rather than a return.
+ virtual void emitSandboxedReturn() {
John 2016/01/21 15:04:52 is virtual needed here?
sehr 2016/01/21 16:02:10 Removed.
+ dispatchToConcrete(&Traits::ConcreteTarget::emitSandboxedReturn);
+ }
/// Emit just the call instruction (without argument or return variable
/// processing), sandboxing if needed.
virtual Inst *emitCallToTarget(Operand *CallTarget, Variable *ReturnReg) = 0;
@@ -588,6 +597,10 @@ protected:
void _lea(Variable *Dest, Operand *Src0) {
Context.insert<typename Traits::Insts::Lea>(Dest, Src0);
}
+ void _link_bp() { dispatchToConcrete(&Traits::ConcreteTarget::_link_bp); }
+ void _push_reg(Variable *Reg) {
+ dispatchToConcrete(&Traits::ConcreteTarget::_push_reg, std::move(Reg));
+ }
void _mfence() { Context.insert<typename Traits::Insts::Mfence>(); }
/// Moves can be used to redefine registers, creating "partial kills" for
/// liveness. Mark where moves are used in this way.
@@ -836,6 +849,7 @@ protected:
Context.insert<typename Traits::Insts::Ucomiss>(Src0, Src1);
}
void _ud2() { Context.insert<typename Traits::Insts::UD2>(); }
+ void _unlink_bp() { dispatchToConcrete(&Traits::ConcreteTarget::_unlink_bp); }
void _xadd(Operand *Dest, Variable *Src, bool Locked) {
AutoMemorySandboxer<> _(this, &Dest, &Src);
Context.insert<typename Traits::Insts::Xadd>(Dest, Src, Locked);

Powered by Google App Engine
This is Rietveld 408576698