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

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: 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/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index 8235d1fe264e284f355e8adbb6d1bc19d1ec573c..baa990d0fbef8c4408d30fd3aa29aa4dcda5145c 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -322,14 +322,15 @@ public:
uint32_t getEmitInstCount() const override { return 0; }
IceString getName(const Cfg *Func) const;
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;
+ x86::Label *getAsmLabel() const { return &AsmLabel; }
private:
InstX8632Label(Cfg *Func, TargetX8632 *Target);
~InstX8632Label() override {}
SizeT Number; // used only for unique label string generation
+ mutable x86::Label AsmLabel; // modified by emitIAS.
Jim Stichnoth 2014/10/22 18:01:14 Is the mutable aspect "permanent", or just a stop-
jvoung (off chromium) 2014/10/22 20:43:58 Unfortunately, it is permanent. I wasn't sure of a
Jim Stichnoth 2014/10/22 21:50:08 I think that would be a cleaner approach, maybe a
jvoung (off chromium) 2014/10/23 18:05:27 Okay I agree it's cleaner. It adds a bit of indire
};
// 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') | src/IceInstX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698