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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 456033003: Subzero: Randomize register assignment. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Typo Created 6 years, 4 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/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.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/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 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 TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister); 174 Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister);
175 Variable *makeVectorOfMinusOnes(Type Ty, 175 Variable *makeVectorOfMinusOnes(Type Ty,
176 int32_t RegNum = Variable::NoRegister); 176 int32_t RegNum = Variable::NoRegister);
177 Variable *makeVectorOfHighOrderBits(Type Ty, 177 Variable *makeVectorOfHighOrderBits(Type Ty,
178 int32_t RegNum = Variable::NoRegister); 178 int32_t RegNum = Variable::NoRegister);
179 179
180 // Return a memory operand corresponding to a stack allocated Variable. 180 // Return a memory operand corresponding to a stack allocated Variable.
181 OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot, 181 OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot,
182 uint32_t Offset = 0); 182 uint32_t Offset = 0);
183 183
184 void
185 makeRandomRegisterPermutation(llvm::SmallVectorImpl<int32_t> &Permutation,
186 const llvm::SmallBitVector &ExcludeRegisters);
187
184 // The following are helpers that insert lowered x86 instructions 188 // The following are helpers that insert lowered x86 instructions
185 // with minimal syntactic overhead, so that the lowering code can 189 // with minimal syntactic overhead, so that the lowering code can
186 // look as close to assembly as practical. 190 // look as close to assembly as practical.
187 void _adc(Variable *Dest, Operand *Src0) { 191 void _adc(Variable *Dest, Operand *Src0) {
188 Context.insert(InstX8632Adc::create(Func, Dest, Src0)); 192 Context.insert(InstX8632Adc::create(Func, Dest, Src0));
189 } 193 }
190 void _add(Variable *Dest, Operand *Src0) { 194 void _add(Variable *Dest, Operand *Src0) {
191 Context.insert(InstX8632Add::create(Func, Dest, Src0)); 195 Context.insert(InstX8632Add::create(Func, Dest, Src0));
192 } 196 }
193 void _adjust_stack(int32_t Amount) { 197 void _adjust_stack(int32_t Amount) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 virtual ~TargetGlobalInitX8632() {} 499 virtual ~TargetGlobalInitX8632() {}
496 }; 500 };
497 501
498 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 502 template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
499 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 503 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
500 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 504 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
501 505
502 } // end of namespace Ice 506 } // end of namespace Ice
503 507
504 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 508 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698