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

Unified Diff: src/IceInstX8632.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: check the local labels too 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
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index 8235d1fe264e284f355e8adbb6d1bc19d1ec573c..81d3fd8c973dea7344b4f020d41de20cf96d708b 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -274,13 +274,14 @@ protected:
}
};
-// InstX8632Label represents an intra-block label that is the
-// target of an intra-block branch. These are used for lowering i1
-// calculations, Select instructions, and 64-bit compares on a 32-bit
-// architecture, without basic block splitting. Basic block splitting
-// is not so desirable for several reasons, one of which is the impact
-// on decisions based on whether a variable's live range spans
-// multiple basic blocks.
+// InstX8632Label represents an intra-block label that is the target
+// of an intra-block branch. The offset between the label and the
+// branch must be fit into one byte (considered "near"). These are
+// used for lowering i1 calculations, Select instructions, and 64-bit
+// compares on a 32-bit architecture, without basic block splitting.
+// Basic block splitting is not so desirable for several reasons, one
+// of which is the impact on decisions based on whether a variable's
+// live range spans multiple basic blocks.
//
// Intra-block control flow must be used with caution. Consider the
// sequence for "c = (a >= b ? x : y)".
@@ -321,15 +322,15 @@ public:
}
uint32_t getEmitInstCount() const override { return 0; }
IceString getName(const Cfg *Func) const;
+ SizeT getNumber() const { return Number; }
void emit(const Cfg *Func) const override;
- // TODO(jvoung): Filler in.
- void emitIAS(const Cfg *Func) const override { emit(Func); }
+ void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override;
private:
InstX8632Label(Cfg *Func, TargetX8632 *Target);
~InstX8632Label() override {}
- SizeT Number; // used only for unique label string generation
+ SizeT Number; // used for unique label generation.
};
// Conditional and unconditional branch instruction.
@@ -385,8 +386,7 @@ public:
return Sum;
}
void emit(const Cfg *Func) const override;
- // TODO(jvoung): Filler in.
- void emitIAS(const Cfg *Func) const override { emit(Func); }
+ void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override;
static bool classof(const Inst *Inst) { return isClassof(Inst, Br); }
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698