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

Side by Side Diff: src/IceTargetLoweringARM32.h

Issue 1129263005: Convert Constant->emit() definitions to allow multiple targets to define them. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: report fatal Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file declares the TargetLoweringARM32 class, which implements the 10 // This file declares the TargetLoweringARM32 class, which implements the
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool hasFramePointer() const override { return UsesFramePointer; } 46 bool hasFramePointer() const override { return UsesFramePointer; }
47 SizeT getFrameOrStackReg() const override { 47 SizeT getFrameOrStackReg() const override {
48 return UsesFramePointer ? RegARM32::Reg_fp : RegARM32::Reg_sp; 48 return UsesFramePointer ? RegARM32::Reg_fp : RegARM32::Reg_sp;
49 } 49 }
50 size_t typeWidthInBytesOnStack(Type Ty) const override { 50 size_t typeWidthInBytesOnStack(Type Ty) const override {
51 // Round up to the next multiple of 4 bytes. In particular, i1, 51 // Round up to the next multiple of 4 bytes. In particular, i1,
52 // i8, and i16 are rounded up to 4 bytes. 52 // i8, and i16 are rounded up to 4 bytes.
53 return (typeWidthInBytes(Ty) + 3) & ~3; 53 return (typeWidthInBytes(Ty) + 3) & ~3;
54 } 54 }
55 void emitVariable(const Variable *Var) const override; 55 void emitVariable(const Variable *Var) const override;
56
57 const char *getConstantPrefix() const final { return "#"; }
58 void emit(const ConstantUndef *C) const final;
59 void emit(const ConstantInteger32 *C) const final;
60 void emit(const ConstantInteger64 *C) const final;
61 void emit(const ConstantFloat *C) const final;
62 void emit(const ConstantDouble *C) const final;
63
56 void lowerArguments() override; 64 void lowerArguments() override;
57 void addProlog(CfgNode *Node) override; 65 void addProlog(CfgNode *Node) override;
58 void addEpilog(CfgNode *Node) override; 66 void addEpilog(CfgNode *Node) override;
59 67
60 protected: 68 protected:
61 explicit TargetARM32(Cfg *Func); 69 explicit TargetARM32(Cfg *Func);
62 70
63 void postLower() override; 71 void postLower() override;
64 72
65 void lowerAlloca(const InstAlloca *Inst) override; 73 void lowerAlloca(const InstAlloca *Inst) override;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 138
131 private: 139 private:
132 void lowerGlobal(const VariableDeclaration &Var) const; 140 void lowerGlobal(const VariableDeclaration &Var) const;
133 ~TargetDataARM32() override {} 141 ~TargetDataARM32() override {}
134 template <typename T> static void emitConstantPool(GlobalContext *Ctx); 142 template <typename T> static void emitConstantPool(GlobalContext *Ctx);
135 }; 143 };
136 144
137 } // end of namespace Ice 145 } // end of namespace Ice
138 146
139 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H 147 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698