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

Side by Side Diff: src/IceTargetLoweringX8664Traits.h

Issue 1838753002: Subzero: Remove IceString. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More cleanup Created 4 years, 8 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/IceTargetLoweringX8664.cpp ('k') | src/IceTargetLoweringX86Base.h » ('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/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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 Begin, 294 Begin,
295 // SSE2 is the PNaCl baseline instruction set. 295 // SSE2 is the PNaCl baseline instruction set.
296 SSE2 = Begin, 296 SSE2 = Begin,
297 SSE4_1, 297 SSE4_1,
298 End 298 End
299 }; 299 };
300 300
301 static const char *TargetName; 301 static const char *TargetName;
302 static constexpr Type WordType = IceType_i64; 302 static constexpr Type WordType = IceType_i64;
303 303
304 static IceString getRegName(RegNumT RegNum) { 304 static const char *getRegName(RegNumT RegNum) {
305 static const char *const RegNames[RegisterSet::Reg_NUM] = { 305 static const char *const RegNames[RegisterSet::Reg_NUM] = {
306 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \ 306 #define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, \
307 sboxres, isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, \ 307 sboxres, isGPR, is64, is32, is16, is8, isXmm, is64To8, is32To8, \
308 is16To8, isTrunc8Rcvr, isAhRcvr, aliases) \ 308 is16To8, isTrunc8Rcvr, isAhRcvr, aliases) \
309 name, 309 name,
310 REGX8664_TABLE 310 REGX8664_TABLE
311 #undef X 311 #undef X
312 }; 312 };
313 RegNum.assertIsValid(); 313 RegNum.assertIsValid();
314 return RegNames[RegNum]; 314 return RegNames[RegNum];
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 /// stack slot only if its linked Variable has a register. If the linked 985 /// stack slot only if its linked Variable has a register. If the linked
986 /// Variable has a stack slot, then the Variable and SpillVariable share that 986 /// Variable has a stack slot, then the Variable and SpillVariable share that
987 /// slot. 987 /// slot.
988 class SpillVariable : public Variable { 988 class SpillVariable : public Variable {
989 SpillVariable() = delete; 989 SpillVariable() = delete;
990 SpillVariable(const SpillVariable &) = delete; 990 SpillVariable(const SpillVariable &) = delete;
991 SpillVariable &operator=(const SpillVariable &) = delete; 991 SpillVariable &operator=(const SpillVariable &) = delete;
992 992
993 public: 993 public:
994 static SpillVariable *create(Cfg *Func, Type Ty, SizeT Index) { 994 static SpillVariable *create(Cfg *Func, Type Ty, SizeT Index) {
995 return new (Func->allocate<SpillVariable>()) SpillVariable(Ty, Index); 995 return new (Func->allocate<SpillVariable>())
996 SpillVariable(Func, Ty, Index);
996 } 997 }
997 constexpr static auto SpillVariableKind = 998 constexpr static auto SpillVariableKind =
998 static_cast<OperandKind>(kVariable_Target); 999 static_cast<OperandKind>(kVariable_Target);
999 static bool classof(const Operand *Operand) { 1000 static bool classof(const Operand *Operand) {
1000 return Operand->getKind() == SpillVariableKind; 1001 return Operand->getKind() == SpillVariableKind;
1001 } 1002 }
1002 void setLinkedTo(Variable *Var) { LinkedTo = Var; } 1003 void setLinkedTo(Variable *Var) { LinkedTo = Var; }
1003 Variable *getLinkedTo() const { return LinkedTo; } 1004 Variable *getLinkedTo() const { return LinkedTo; }
1004 // Inherit dump() and emit() from Variable. 1005 // Inherit dump() and emit() from Variable.
1005 1006
1006 private: 1007 private:
1007 SpillVariable(Type Ty, SizeT Index) 1008 SpillVariable(const Cfg *Func, Type Ty, SizeT Index)
1008 : Variable(SpillVariableKind, Ty, Index), LinkedTo(nullptr) {} 1009 : Variable(Func, SpillVariableKind, Ty, Index), LinkedTo(nullptr) {}
1009 Variable *LinkedTo; 1010 Variable *LinkedTo;
1010 }; 1011 };
1011 1012
1012 // Note: The following data structures are defined in IceInstX8664.cpp. 1013 // Note: The following data structures are defined in IceInstX8664.cpp.
1013 1014
1014 static const struct InstBrAttributesType { 1015 static const struct InstBrAttributesType {
1015 Cond::BrCond Opposite; 1016 Cond::BrCond Opposite;
1016 const char *DisplayString; 1017 const char *DisplayString;
1017 const char *EmitString; 1018 const char *EmitString;
1018 } InstBrAttributes[]; 1019 } InstBrAttributes[];
(...skipping 12 matching lines...) Expand all
1031 const char *FldString; // s, l, or <blank> 1032 const char *FldString; // s, l, or <blank>
1032 } TypeAttributes[]; 1033 } TypeAttributes[];
1033 }; 1034 };
1034 1035
1035 using Traits = ::Ice::X8664::TargetX8664Traits; 1036 using Traits = ::Ice::X8664::TargetX8664Traits;
1036 } // end of namespace X8664 1037 } // end of namespace X8664
1037 1038
1038 } // end of namespace Ice 1039 } // end of namespace Ice
1039 1040
1040 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H 1041 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8664TRAITS_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8664.cpp ('k') | src/IceTargetLoweringX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698