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

Side by Side Diff: src/IceTargetLoweringARM32.h

Issue 1044423006: WIP: Add ARM32 add/ldr/str instructions and operand types. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: rebase Created 5 years, 7 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/IceInstARM32.def ('k') | src/IceTargetLoweringARM32.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/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 // This file declares the TargetLoweringARM32 class, which implements the 10 // This file declares the TargetLoweringARM32 class, which implements the
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); 123 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister);
124 124
125 void makeRandomRegisterPermutation( 125 void makeRandomRegisterPermutation(
126 llvm::SmallVectorImpl<int32_t> &Permutation, 126 llvm::SmallVectorImpl<int32_t> &Permutation,
127 const llvm::SmallBitVector &ExcludeRegisters) const override; 127 const llvm::SmallBitVector &ExcludeRegisters) const override;
128 128
129 // The following are helpers that insert lowered ARM32 instructions 129 // The following are helpers that insert lowered ARM32 instructions
130 // with minimal syntactic overhead, so that the lowering code can 130 // with minimal syntactic overhead, so that the lowering code can
131 // look as close to assembly as practical. 131 // look as close to assembly as practical.
132 132
133 void _add(Variable *Dest, Variable *Src0, Operand *Src1) {
134 Context.insert(InstARM32Add::create(Func, Dest, Src0, Src1));
135 }
133 void _ldr(Variable *Dest, OperandARM32Mem *Addr) { 136 void _ldr(Variable *Dest, OperandARM32Mem *Addr) {
134 Context.insert(InstARM32Ldr::create(Func, Dest, Addr)); 137 Context.insert(InstARM32Ldr::create(Func, Dest, Addr));
135 } 138 }
136 // If Dest=nullptr is passed in, then a new variable is created, 139 // If Dest=nullptr is passed in, then a new variable is created,
137 // marked as infinite register allocation weight, and returned 140 // marked as infinite register allocation weight, and returned
138 // through the in/out Dest argument. 141 // through the in/out Dest argument.
139 void _mov(Variable *&Dest, Operand *Src0, 142 void _mov(Variable *&Dest, Operand *Src0,
140 int32_t RegNum = Variable::NoRegister) { 143 int32_t RegNum = Variable::NoRegister) {
141 if (Dest == nullptr) 144 if (Dest == nullptr)
142 Dest = makeReg(Src0->getType(), RegNum); 145 Dest = makeReg(Src0->getType(), RegNum);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 190
188 private: 191 private:
189 void lowerGlobal(const VariableDeclaration &Var) const; 192 void lowerGlobal(const VariableDeclaration &Var) const;
190 ~TargetDataARM32() override {} 193 ~TargetDataARM32() override {}
191 template <typename T> static void emitConstantPool(GlobalContext *Ctx); 194 template <typename T> static void emitConstantPool(GlobalContext *Ctx);
192 }; 195 };
193 196
194 } // end of namespace Ice 197 } // end of namespace Ice
195 198
196 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H 199 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H
OLDNEW
« no previous file with comments | « src/IceInstARM32.def ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698