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

Unified Diff: src/assembler_ia32.h

Issue 673543002: First pass at emitIAS for branches and binding labels (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: dem tings Created 6 years, 2 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/assembler_ia32.h
diff --git a/src/assembler_ia32.h b/src/assembler_ia32.h
index bb3f0ab63b2e439eecf7411720f0bc9fa9c44deb..452e3e22275349045eedb1551146d3a12a042b65 100644
--- a/src/assembler_ia32.h
+++ b/src/assembler_ia32.h
@@ -284,7 +284,9 @@ public:
#endif // !NDEBUG
}
- ~Label() {
+ ~Label() {}
+
+ void FinalCheck() const {
// Assert if label is being destroyed with unresolved branches pending.
assert(!IsLinked());
assert(!HasNear());
@@ -363,11 +365,14 @@ public:
assert(!use_far_branches);
(void)use_far_branches;
}
- ~AssemblerX86() {}
+ ~AssemblerX86() override;
static const bool kNearJump = true;
static const bool kFarJump = false;
+ Label *GetOrCreateCfgNodeLabel(SizeT NodeNumber);
+ void BindCfgNodeLabel(SizeT NodeNumber) override;
+
// Operations to emit GPR instructions (and dispatch on operand type).
typedef void (AssemblerX86::*TypedEmitGPR)(Type, GPRRegister);
typedef void (AssemblerX86::*TypedEmitAddr)(Type, const Address &);
@@ -848,6 +853,9 @@ private:
void EmitGenericShift(int rm, Type Ty, const Operand &operand,
GPRRegister shifter);
+ // A vector of pool-allocated x86 labels.
+ std::vector<Label *> CfgNodeLabels;
+
AssemblerBuffer buffer_;
};

Powered by Google App Engine
This is Rietveld 408576698