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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 807293003: Subzero: Randomize register assignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a TODO Created 6 years 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister); 173 Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister);
174 Variable *makeVectorOfMinusOnes(Type Ty, 174 Variable *makeVectorOfMinusOnes(Type Ty,
175 int32_t RegNum = Variable::NoRegister); 175 int32_t RegNum = Variable::NoRegister);
176 Variable *makeVectorOfHighOrderBits(Type Ty, 176 Variable *makeVectorOfHighOrderBits(Type Ty,
177 int32_t RegNum = Variable::NoRegister); 177 int32_t RegNum = Variable::NoRegister);
178 178
179 // Return a memory operand corresponding to a stack allocated Variable. 179 // Return a memory operand corresponding to a stack allocated Variable.
180 OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot, 180 OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot,
181 uint32_t Offset = 0); 181 uint32_t Offset = 0);
182 182
183 void makeRandomRegisterPermutation(
184 llvm::SmallVectorImpl<int32_t> &Permutation,
185 const llvm::SmallBitVector &ExcludeRegisters) const;
186
183 // The following are helpers that insert lowered x86 instructions 187 // The following are helpers that insert lowered x86 instructions
184 // with minimal syntactic overhead, so that the lowering code can 188 // with minimal syntactic overhead, so that the lowering code can
185 // look as close to assembly as practical. 189 // look as close to assembly as practical.
186 void _adc(Variable *Dest, Operand *Src0) { 190 void _adc(Variable *Dest, Operand *Src0) {
187 Context.insert(InstX8632Adc::create(Func, Dest, Src0)); 191 Context.insert(InstX8632Adc::create(Func, Dest, Src0));
188 } 192 }
189 void _add(Variable *Dest, Operand *Src0) { 193 void _add(Variable *Dest, Operand *Src0) {
190 Context.insert(InstX8632Add::create(Func, Dest, Src0)); 194 Context.insert(InstX8632Add::create(Func, Dest, Src0));
191 } 195 }
192 void _adjust_stack(int32_t Amount) { 196 void _adjust_stack(int32_t Amount) {
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 }; 509 };
506 510
507 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; 511 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const;
508 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; 512 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const;
509 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 513 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
510 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 514 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
511 515
512 } // end of namespace Ice 516 } // end of namespace Ice
513 517
514 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 518 #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