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

Unified Diff: src/IceTargetLowering.h

Issue 1506653002: Subzero: Add Non-SFI support for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fill in part of the lit test Created 5 years 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/IceTargetLowering.h
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 3d139c0bc0ce73586a11c6d346eee7b5231c85b0..4d6db490a4aa53b81569a9ccc551acb8afeb8c57 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -146,9 +146,9 @@ class TargetLowering {
public:
// TODO(jvoung): return a unique_ptr like the other factory functions.
static TargetLowering *createLowering(TargetArch Target, Cfg *Func);
- static void staticInit(TargetArch Target);
+ static void staticInit(const ClFlags &Flags);
// Each target must define a public static method:
- // static void staticInit();
+ // static void staticInit(const ClFlags &Flags);
static std::unique_ptr<Assembler> createAssembler(TargetArch Target,
Cfg *Func);
void translate() {
@@ -234,6 +234,8 @@ public:
SizeT makeNextLabelNumber() { return NextLabelNumber++; }
SizeT makeNextJumpTableNumber() { return NextJumpTableNumber++; }
LoweringContext &getContext() { return Context; }
+ Cfg *getFunc() const { return Func; }
+ GlobalContext *getGlobalContext() const { return Ctx; }
enum RegSet {
RegSet_None = 0,
@@ -266,15 +268,15 @@ public:
virtual void emitVariable(const Variable *Var) const = 0;
- void emitWithoutPrefix(const ConstantRelocatable *CR) const;
- void emit(const ConstantRelocatable *CR) const;
- virtual const char *getConstantPrefix() const = 0;
+ void emitWithoutPrefix(const ConstantRelocatable *CR,
+ const char *Suffix = "") const;
- virtual void emit(const ConstantUndef *C) const = 0;
virtual void emit(const ConstantInteger32 *C) const = 0;
virtual void emit(const ConstantInteger64 *C) const = 0;
virtual void emit(const ConstantFloat *C) const = 0;
virtual void emit(const ConstantDouble *C) const = 0;
+ virtual void emit(const ConstantUndef *C) const = 0;
+ virtual void emit(const ConstantRelocatable *CR) const = 0;
/// Performs target-specific argument lowering.
virtual void lowerArguments() = 0;
@@ -415,6 +417,7 @@ protected:
const static constexpr char *H_fptoui_f64_i64 = "__Sz_fptoui_f64_i64";
const static constexpr char *H_frem_f32 = "fmodf";
const static constexpr char *H_frem_f64 = "fmod";
+ const static constexpr char *H_getIP_prefix = "__Sz_getIP_";
const static constexpr char *H_sdiv_i32 = "__divsi3";
const static constexpr char *H_sdiv_i64 = "__divdi3";
const static constexpr char *H_sitofp_i64_f32 = "__Sz_sitofp_i64_f32";

Powered by Google App Engine
This is Rietveld 408576698