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

Side by Side Diff: src/IceTargetLoweringX8632Traits.h

Issue 1472623002: Unify alloca, outgoing arg, and prolog construction (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review fixes. Also removed StackAdjustment. 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTargetLoweringX8664.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/IceTargetLoweringX8632Traits.h - x86-32 traits -*- C++ -*-=// 1 //===- subzero/src/IceTargetLoweringX8632Traits.h - x86-32 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 void dump(const Cfg *Func, Ostream &Str) const override; 745 void dump(const Cfg *Func, Ostream &Str) const override;
746 746
747 static bool classof(const Operand *Operand) { 747 static bool classof(const Operand *Operand) {
748 return Operand->getKind() == static_cast<OperandKind>(kMem); 748 return Operand->getKind() == static_cast<OperandKind>(kMem);
749 } 749 }
750 750
751 void setRandomized(bool R) { Randomized = R; } 751 void setRandomized(bool R) { Randomized = R; }
752 752
753 bool getRandomized() const { return Randomized; } 753 bool getRandomized() const { return Randomized; }
754 754
755 void setIgnoreStackAdjust(bool Ignore) { IgnoreStackAdjust = Ignore; }
756 bool getIgnoreStackAdjust() const { return IgnoreStackAdjust; }
757
758 private: 755 private:
759 X86OperandMem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, 756 X86OperandMem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset,
760 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg); 757 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg);
761 758
762 Variable *Base; 759 Variable *Base;
763 Constant *Offset; 760 Constant *Offset;
764 Variable *Index; 761 Variable *Index;
765 uint16_t Shift; 762 uint16_t Shift;
766 SegmentRegisters SegmentReg : 16; 763 SegmentRegisters SegmentReg : 16;
767 /// A flag to show if this memory operand is a randomized one. Randomized 764 /// A flag to show if this memory operand is a randomized one. Randomized
768 /// memory operands are generated in 765 /// memory operands are generated in
769 /// TargetX86Base::randomizeOrPoolImmediate() 766 /// TargetX86Base::randomizeOrPoolImmediate()
770 bool Randomized; 767 bool Randomized;
771 /// Memory operations involving the stack pointer need to know when the
772 /// stack pointer was moved temporarily. Ignore that adjustment in
773 /// cases that should be pinned to the stack pointer, such as outgoing
774 /// arguments to calls.
775 bool IgnoreStackAdjust = false;
776 }; 768 };
777 769
778 /// VariableSplit is a way to treat an f64 memory location as a pair of i32 770 /// VariableSplit is a way to treat an f64 memory location as a pair of i32
779 /// locations (Low and High). This is needed for some cases of the Bitcast 771 /// locations (Low and High). This is needed for some cases of the Bitcast
780 /// instruction. Since it's not possible for integer registers to access the 772 /// instruction. Since it's not possible for integer registers to access the
781 /// XMM registers and vice versa, the lowering forces the f64 to be spilled to 773 /// XMM registers and vice versa, the lowering forces the f64 to be spilled to
782 /// the stack and then accesses through the VariableSplit. 774 /// the stack and then accesses through the VariableSplit.
783 // TODO(jpp): remove references to VariableSplit from IceInstX86Base as 64bit 775 // TODO(jpp): remove references to VariableSplit from IceInstX86Base as 64bit
784 // targets can natively handle these. 776 // targets can natively handle these.
785 class VariableSplit : public X86Operand { 777 class VariableSplit : public X86Operand {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 865
874 } // end of namespace X86Internal 866 } // end of namespace X86Internal
875 867
876 namespace X8632 { 868 namespace X8632 {
877 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>; 869 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>;
878 } // end of namespace X8632 870 } // end of namespace X8632
879 871
880 } // end of namespace Ice 872 } // end of namespace Ice
881 873
882 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H 874 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTargetLoweringX8664.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698