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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 874353006: Write out global initializers and data rel directly to ELF file. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: tweak comment Created 5 years, 10 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
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 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 TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 llvm::SmallBitVector ScratchRegs; 481 llvm::SmallBitVector ScratchRegs;
482 llvm::SmallBitVector RegsUsed; 482 llvm::SmallBitVector RegsUsed;
483 SizeT NextLabelNumber; 483 SizeT NextLabelNumber;
484 VarList PhysicalRegisters[IceType_NUM]; 484 VarList PhysicalRegisters[IceType_NUM];
485 static IceString RegNames[]; 485 static IceString RegNames[];
486 486
487 private: 487 private:
488 ~TargetX8632() override {} 488 ~TargetX8632() override {}
489 }; 489 };
490 490
491 class TargetGlobalX8632 : public TargetGlobalLowering { 491 class TargetDataX8632 : public TargetDataLowering {
492 TargetGlobalX8632() = delete; 492 TargetDataX8632() = delete;
493 TargetGlobalX8632(const TargetGlobalX8632 &) = delete; 493 TargetDataX8632(const TargetDataX8632 &) = delete;
494 TargetGlobalX8632 &operator=(const TargetGlobalX8632 &) = delete; 494 TargetDataX8632 &operator=(const TargetDataX8632 &) = delete;
495 495
496 public: 496 public:
497 static TargetGlobalLowering *create(GlobalContext *Ctx) { 497 static TargetDataLowering *create(GlobalContext *Ctx) {
498 return new TargetGlobalX8632(Ctx); 498 return new TargetDataX8632(Ctx);
499 } 499 }
500 500
501 virtual void lowerInit(const VariableDeclaration &Var) const final; 501 void lowerGlobal(const VariableDeclaration &Var) const final;
502 virtual void lowerConstants(GlobalContext *Ctx) const final; 502 void lowerGlobalsELF(const VariableDeclarationList &Vars) const final;
503 void lowerConstants(GlobalContext *Ctx) const final;
503 504
504 protected: 505 protected:
505 TargetGlobalX8632(GlobalContext *Ctx); 506 TargetDataX8632(GlobalContext *Ctx);
506 507
507 private: 508 private:
508 ~TargetGlobalX8632() override {} 509 ~TargetDataX8632() override {}
509 template <typename T> static void emitConstantPool(GlobalContext *Ctx); 510 template <typename T> static void emitConstantPool(GlobalContext *Ctx);
510 }; 511 };
511 512
512 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; 513 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const;
513 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; 514 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const;
514 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 515 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
515 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 516 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
516 517
517 } // end of namespace Ice 518 } // end of namespace Ice
518 519
519 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 520 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698