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

Side by Side Diff: src/IceTargetLoweringARM32.h

Issue 1571433004: Implements include/exclude register lists for translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 11 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/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 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 /// \file 10 /// \file
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ARM32InstructionSet InstructionSet = ARM32InstructionSet::Begin; 50 ARM32InstructionSet InstructionSet = ARM32InstructionSet::Begin;
51 }; 51 };
52 52
53 // The target lowering logic for ARM32. 53 // The target lowering logic for ARM32.
54 class TargetARM32 : public TargetLowering { 54 class TargetARM32 : public TargetLowering {
55 TargetARM32() = delete; 55 TargetARM32() = delete;
56 TargetARM32(const TargetARM32 &) = delete; 56 TargetARM32(const TargetARM32 &) = delete;
57 TargetARM32 &operator=(const TargetARM32 &) = delete; 57 TargetARM32 &operator=(const TargetARM32 &) = delete;
58 58
59 public: 59 public:
60 static void staticInit(const ClFlags &Flags); 60 static void staticInit(GlobalContext *Ctx);
61 // TODO(jvoung): return a unique_ptr. 61 // TODO(jvoung): return a unique_ptr.
62 static std::unique_ptr<::Ice::TargetLowering> create(Cfg *Func) { 62 static std::unique_ptr<::Ice::TargetLowering> create(Cfg *Func) {
63 return makeUnique<TargetARM32>(Func); 63 return makeUnique<TargetARM32>(Func);
64 } 64 }
65 65
66 std::unique_ptr<::Ice::Assembler> createAssembler() const override { 66 std::unique_ptr<::Ice::Assembler> createAssembler() const override {
67 return makeUnique<ARM32::AssemblerARM32>(); 67 return makeUnique<ARM32::AssemblerARM32>();
68 } 68 }
69 69
70 void initNodeForLowering(CfgNode *Node) override { 70 void initNodeForLowering(CfgNode *Node) override {
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 bool PrologEmitsFixedAllocas = false; 1012 bool PrologEmitsFixedAllocas = false;
1013 uint32_t MaxOutArgsSizeBytes = 0; 1013 uint32_t MaxOutArgsSizeBytes = 0;
1014 // TODO(jpp): std::array instead of array. 1014 // TODO(jpp): std::array instead of array.
1015 static llvm::SmallBitVector TypeToRegisterSet[RCARM32_NUM]; 1015 static llvm::SmallBitVector TypeToRegisterSet[RCARM32_NUM];
1016 static llvm::SmallBitVector RegisterAliases[RegARM32::Reg_NUM]; 1016 static llvm::SmallBitVector RegisterAliases[RegARM32::Reg_NUM];
1017 static llvm::SmallBitVector ScratchRegs; 1017 static llvm::SmallBitVector ScratchRegs;
1018 llvm::SmallBitVector RegsUsed; 1018 llvm::SmallBitVector RegsUsed;
1019 VarList PhysicalRegisters[IceType_NUM]; 1019 VarList PhysicalRegisters[IceType_NUM];
1020 VarList PreservedGPRs; 1020 VarList PreservedGPRs;
1021 VarList PreservedSRegs; 1021 VarList PreservedSRegs;
1022 // Mask of registers available to method getRegisterSet().
1023 static llvm::SmallBitVector RegisterSetMask;
1022 1024
1023 /// Helper class that understands the Calling Convention and register 1025 /// Helper class that understands the Calling Convention and register
1024 /// assignments. The first few integer type parameters can use r0-r3, 1026 /// assignments. The first few integer type parameters can use r0-r3,
1025 /// regardless of their position relative to the floating-point/vector 1027 /// regardless of their position relative to the floating-point/vector
1026 /// arguments in the argument list. Floating-point and vector arguments 1028 /// arguments in the argument list. Floating-point and vector arguments
1027 /// can use q0-q3 (aka d0-d7, s0-s15). For more information on the topic, 1029 /// can use q0-q3 (aka d0-d7, s0-s15). For more information on the topic,
1028 /// see the ARM Architecture Procedure Calling Standards (AAPCS). 1030 /// see the ARM Architecture Procedure Calling Standards (AAPCS).
1029 /// 1031 ///
1030 /// Technically, arguments that can start with registers but extend beyond the 1032 /// Technically, arguments that can start with registers but extend beyond the
1031 /// available registers can be split between the registers and the stack. 1033 /// available registers can be split between the registers and the stack.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 private: 1204 private:
1203 ~TargetHeaderARM32() = default; 1205 ~TargetHeaderARM32() = default;
1204 1206
1205 TargetARM32Features CPUFeatures; 1207 TargetARM32Features CPUFeatures;
1206 }; 1208 };
1207 1209
1208 } // end of namespace ARM32 1210 } // end of namespace ARM32
1209 } // end of namespace Ice 1211 } // end of namespace Ice
1210 1212
1211 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H 1213 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698