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

Side by Side Diff: src/IceTargetLoweringX8632Traits.h

Issue 1537703002: Subzero. x8664. Resurrects the Target. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 12 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/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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 enum ScaleFactor { TIMES_1 = 0, TIMES_2 = 1, TIMES_4 = 2, TIMES_8 = 3 }; 61 enum ScaleFactor { TIMES_1 = 0, TIMES_2 = 1, TIMES_4 = 2, TIMES_8 = 3 };
62 62
63 using GPRRegister = ::Ice::RegX8632::GPRRegister; 63 using GPRRegister = ::Ice::RegX8632::GPRRegister;
64 using ByteRegister = ::Ice::RegX8632::ByteRegister; 64 using ByteRegister = ::Ice::RegX8632::ByteRegister;
65 using XmmRegister = ::Ice::RegX8632::XmmRegister; 65 using XmmRegister = ::Ice::RegX8632::XmmRegister;
66 using X87STRegister = ::Ice::RegX8632::X87STRegister; 66 using X87STRegister = ::Ice::RegX8632::X87STRegister;
67 67
68 using Cond = ::Ice::CondX86; 68 using Cond = ::Ice::CondX86;
69 69
70 using RegisterSet = ::Ice::RegX8632; 70 using RegisterSet = ::Ice::RegX8632;
71 static const SizeT StackPtr = RegX8632::Reg_esp;
72 static const SizeT FramePtr = RegX8632::Reg_ebp;
71 static const GPRRegister Encoded_Reg_Accumulator = RegX8632::Encoded_Reg_eax; 73 static const GPRRegister Encoded_Reg_Accumulator = RegX8632::Encoded_Reg_eax;
72 static const GPRRegister Encoded_Reg_Counter = RegX8632::Encoded_Reg_ecx; 74 static const GPRRegister Encoded_Reg_Counter = RegX8632::Encoded_Reg_ecx;
73 static const FixupKind PcRelFixup = llvm::ELF::R_386_PC32; 75 static const FixupKind PcRelFixup = llvm::ELF::R_386_PC32;
74 static const FixupKind RelFixup = llvm::ELF::R_386_32; 76 static const FixupKind RelFixup = llvm::ELF::R_386_32;
75 77
76 class Operand { 78 class Operand {
77 public: 79 public:
78 Operand(const Operand &other) 80 Operand(const Operand &other)
79 : fixup_(other.fixup_), length_(other.length_) { 81 : fixup_(other.fixup_), length_(other.length_) {
80 memmove(&encoding_[0], &other.encoding_[0], other.length_); 82 memmove(&encoding_[0], &other.encoding_[0], other.length_);
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 if (!First) 572 if (!First)
571 Str << " "; 573 Str << " ";
572 First = false; 574 First = false;
573 Str << getRegName(Register); 575 Str << getRegName(Register);
574 } 576 }
575 Str << "}\n"; 577 Str << "}\n";
576 } 578 }
577 } 579 }
578 } 580 }
579 581
582 static int32_t getRaxOrDie() {
583 llvm::report_fatal_error("no rax in non-64-bit mode.");
584 }
Jim Stichnoth 2015/12/22 15:36:16 I would "return -1;" to avoid compiler warnings/er
John 2015/12/22 16:20:02 but that's what that attribute is for... there's j
585
586 static int32_t getRdxOrDie() {
587 llvm::report_fatal_error("no rdx in non-64-bit mode.");
588 }
589
580 /// The maximum number of arguments to pass in XMM registers 590 /// The maximum number of arguments to pass in XMM registers
581 static const uint32_t X86_MAX_XMM_ARGS = 4; 591 static const uint32_t X86_MAX_XMM_ARGS = 4;
582 /// The maximum number of arguments to pass in GPR registers 592 /// The maximum number of arguments to pass in GPR registers
583 static const uint32_t X86_MAX_GPR_ARGS = 0; 593 static const uint32_t X86_MAX_GPR_ARGS = 0;
584 /// The number of bits in a byte 594 /// The number of bits in a byte
585 static const uint32_t X86_CHAR_BIT = 8; 595 static const uint32_t X86_CHAR_BIT = 8;
586 /// Stack alignment. This is defined in IceTargetLoweringX8632.cpp because it 596 /// Stack alignment. This is defined in IceTargetLoweringX8632.cpp because it
587 /// is used as an argument to std::max(), and the default std::less<T> has an 597 /// is used as an argument to std::max(), and the default std::less<T> has an
588 /// operator(T const&, T const&) which requires this member to have an 598 /// operator(T const&, T const&) which requires this member to have an
589 /// address. 599 /// address.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 877
868 } // end of namespace X86Internal 878 } // end of namespace X86Internal
869 879
870 namespace X8632 { 880 namespace X8632 {
871 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>; 881 using Traits = ::Ice::X86Internal::MachineTraits<TargetX8632>;
872 } // end of namespace X8632 882 } // end of namespace X8632
873 883
874 } // end of namespace Ice 884 } // end of namespace Ice
875 885
876 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H 886 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632TRAITS_H
OLDNEW
« Makefile.standalone ('K') | « src/IceRegAlloc.cpp ('k') | src/IceTargetLoweringX8664.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698