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

Side by Side Diff: src/IceTargetLoweringARM32.h

Issue 1257283004: Iasm and obj lowering for advanced switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 4 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.h ('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 /// \file 10 /// \file
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return UsesFramePointer ? RegARM32::Reg_fp : RegARM32::Reg_sp; 73 return UsesFramePointer ? RegARM32::Reg_fp : RegARM32::Reg_sp;
74 } 74 }
75 size_t typeWidthInBytesOnStack(Type Ty) const override { 75 size_t typeWidthInBytesOnStack(Type Ty) const override {
76 // Round up to the next multiple of 4 bytes. In particular, i1, 76 // Round up to the next multiple of 4 bytes. In particular, i1,
77 // i8, and i16 are rounded up to 4 bytes. 77 // i8, and i16 are rounded up to 4 bytes.
78 return (typeWidthInBytes(Ty) + 3) & ~3; 78 return (typeWidthInBytes(Ty) + 3) & ~3;
79 } 79 }
80 80
81 // TODO(ascull): what size is best for ARM? 81 // TODO(ascull): what size is best for ARM?
82 SizeT getMinJumpTableSize() const override { return 3; } 82 SizeT getMinJumpTableSize() const override { return 3; }
83 void emitJumpTable(const Cfg *Func,
84 const InstJumpTable *JumpTable) const override;
83 85
84 void emitVariable(const Variable *Var) const override; 86 void emitVariable(const Variable *Var) const override;
85 87
86 const char *getConstantPrefix() const final { return "#"; } 88 const char *getConstantPrefix() const final { return "#"; }
87 void emit(const ConstantUndef *C) const final; 89 void emit(const ConstantUndef *C) const final;
88 void emit(const ConstantInteger32 *C) const final; 90 void emit(const ConstantInteger32 *C) const final;
89 void emit(const ConstantInteger64 *C) const final; 91 void emit(const ConstantInteger64 *C) const final;
90 void emit(const ConstantFloat *C) const final; 92 void emit(const ConstantFloat *C) const final;
91 void emit(const ConstantDouble *C) const final; 93 void emit(const ConstantDouble *C) const final;
92 94
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 TargetDataARM32 &operator=(const TargetDataARM32 &) = delete; 427 TargetDataARM32 &operator=(const TargetDataARM32 &) = delete;
426 428
427 public: 429 public:
428 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) { 430 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) {
429 return std::unique_ptr<TargetDataLowering>(new TargetDataARM32(Ctx)); 431 return std::unique_ptr<TargetDataLowering>(new TargetDataARM32(Ctx));
430 } 432 }
431 433
432 void lowerGlobals(const VariableDeclarationList &Vars, 434 void lowerGlobals(const VariableDeclarationList &Vars,
433 const IceString &SectionSuffix) override; 435 const IceString &SectionSuffix) override;
434 void lowerConstants() override; 436 void lowerConstants() override;
437 void lowerJumpTables() override;
435 438
436 protected: 439 protected:
437 explicit TargetDataARM32(GlobalContext *Ctx); 440 explicit TargetDataARM32(GlobalContext *Ctx);
438 441
439 private: 442 private:
440 ~TargetDataARM32() override = default; 443 ~TargetDataARM32() override = default;
441 template <typename T> static void emitConstantPool(GlobalContext *Ctx); 444 template <typename T> static void emitConstantPool(GlobalContext *Ctx);
442 }; 445 };
443 446
444 class TargetHeaderARM32 final : public TargetHeaderLowering { 447 class TargetHeaderARM32 final : public TargetHeaderLowering {
(...skipping 13 matching lines...) Expand all
458 461
459 private: 462 private:
460 ~TargetHeaderARM32() = default; 463 ~TargetHeaderARM32() = default;
461 464
462 TargetARM32Features CPUFeatures; 465 TargetARM32Features CPUFeatures;
463 }; 466 };
464 467
465 } // end of namespace Ice 468 } // end of namespace Ice
466 469
467 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H 470 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698