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

Side by Side Diff: src/IceTargetLoweringX8664Traits.h

Issue 1311653003: Add UBSAN build option and fix undefined behaviour errors. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Neater way to set Target_Max Created 5 years, 3 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
« src/IceTargetKinds.def ('K') | « src/IceTargetLoweringX8632Traits.h ('k') | no next file » | 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/IceTargetLoweringX8664Traits.h - x86-64 traits -*- C++ -*-=// 1 //===- subzero/src/IceTargetLoweringX8664Traits.h - x86-64 traits -*- 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 using Assembler = X8664::AssemblerX8664; 558 using Assembler = X8664::AssemblerX8664;
559 559
560 /// X86Operand extends the Operand hierarchy. Its subclasses are 560 /// X86Operand extends the Operand hierarchy. Its subclasses are
561 /// X86OperandMem and VariableSplit. 561 /// X86OperandMem and VariableSplit.
562 class X86Operand : public ::Ice::Operand { 562 class X86Operand : public ::Ice::Operand {
563 X86Operand() = delete; 563 X86Operand() = delete;
564 X86Operand(const X86Operand &) = delete; 564 X86Operand(const X86Operand &) = delete;
565 X86Operand &operator=(const X86Operand &) = delete; 565 X86Operand &operator=(const X86Operand &) = delete;
566 566
567 public: 567 public:
568 enum OperandKindX8664 { k__Start = ::Ice::Operand::kTarget, kMem, kSplit }; 568 enum OperandKindX8664 { k__Start = ::Ice::Operand::kTarget0, kMem, kSplit };
569 using ::Ice::Operand::dump; 569 using ::Ice::Operand::dump;
570 570
571 void dump(const Cfg *, Ostream &Str) const override; 571 void dump(const Cfg *, Ostream &Str) const override;
572 572
573 protected: 573 protected:
574 X86Operand(OperandKindX8664 Kind, Type Ty) 574 X86Operand(OperandKindX8664 Kind, Type Ty)
575 : Operand(static_cast<::Ice::Operand::OperandKind>(Kind), Ty) {} 575 : Operand(static_cast<::Ice::Operand::OperandKind>(Kind), Ty) {}
576 }; 576 };
577 577
578 /// X86OperandMem represents the m64 addressing mode, with optional base and 578 /// X86OperandMem represents the m64 addressing mode, with optional base and
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 class SpillVariable : public Variable { 678 class SpillVariable : public Variable {
679 SpillVariable() = delete; 679 SpillVariable() = delete;
680 SpillVariable(const SpillVariable &) = delete; 680 SpillVariable(const SpillVariable &) = delete;
681 SpillVariable &operator=(const SpillVariable &) = delete; 681 SpillVariable &operator=(const SpillVariable &) = delete;
682 682
683 public: 683 public:
684 static SpillVariable *create(Cfg *Func, Type Ty, SizeT Index) { 684 static SpillVariable *create(Cfg *Func, Type Ty, SizeT Index) {
685 return new (Func->allocate<SpillVariable>()) SpillVariable(Ty, Index); 685 return new (Func->allocate<SpillVariable>()) SpillVariable(Ty, Index);
686 } 686 }
687 const static OperandKind SpillVariableKind = 687 const static OperandKind SpillVariableKind =
688 static_cast<OperandKind>(kVariable_Target); 688 static_cast<OperandKind>(kVariable_Target0);
689 static bool classof(const Operand *Operand) { 689 static bool classof(const Operand *Operand) {
690 return Operand->getKind() == SpillVariableKind; 690 return Operand->getKind() == SpillVariableKind;
691 } 691 }
692 void setLinkedTo(Variable *Var) { LinkedTo = Var; } 692 void setLinkedTo(Variable *Var) { LinkedTo = Var; }
693 Variable *getLinkedTo() const { return LinkedTo; } 693 Variable *getLinkedTo() const { return LinkedTo; }
694 // Inherit dump() and emit() from Variable. 694 // Inherit dump() and emit() from Variable.
695 695
696 private: 696 private:
697 SpillVariable(Type Ty, SizeT Index) 697 SpillVariable(Type Ty, SizeT Index)
698 : Variable(SpillVariableKind, Ty, Index), LinkedTo(nullptr) {} 698 : Variable(SpillVariableKind, Ty, Index), LinkedTo(nullptr) {}
(...skipping 23 matching lines...) Expand all
722 722
723 } // end of namespace X86Internal 723 } // end of namespace X86Internal
724 724
725 namespace X8664 { 725 namespace X8664 {
726 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>; 726 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8664>;
727 } // end of namespace X8664 727 } // end of namespace X8664
728 728
729 } // end of namespace Ice 729 } // end of namespace Ice
730 730
731 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H 731 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H
OLDNEW
« src/IceTargetKinds.def ('K') | « src/IceTargetLoweringX8632Traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698