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

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: Remove redundancies. 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister); 172 Variable *makeVectorOfOnes(Type Ty, int32_t RegNum = Variable::NoRegister);
173 Variable *makeVectorOfMinusOnes(Type Ty, 173 Variable *makeVectorOfMinusOnes(Type Ty,
174 int32_t RegNum = Variable::NoRegister); 174 int32_t RegNum = Variable::NoRegister);
175 Variable *makeVectorOfHighOrderBits(Type Ty, 175 Variable *makeVectorOfHighOrderBits(Type Ty,
176 int32_t RegNum = Variable::NoRegister); 176 int32_t RegNum = Variable::NoRegister);
177 177
178 // Return a memory operand corresponding to a stack allocated Variable. 178 // Return a memory operand corresponding to a stack allocated Variable.
179 OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot, 179 OperandX8632Mem *getMemoryOperandForStackSlot(Type Ty, Variable *Slot,
180 uint32_t Offset = 0); 180 uint32_t Offset = 0);
181 181
182 void makeRandomRegisterPermutation(RegisterPermutation &Permutation,
183 const llvm::SmallBitVector &ExcludeRegisters);
184
182 // The following are helpers that insert lowered x86 instructions 185 // The following are helpers that insert lowered x86 instructions
183 // with minimal syntactic overhead, so that the lowering code can 186 // with minimal syntactic overhead, so that the lowering code can
184 // look as close to assembly as practical. 187 // look as close to assembly as practical.
185 void _adc(Variable *Dest, Operand *Src0) { 188 void _adc(Variable *Dest, Operand *Src0) {
186 Context.insert(InstX8632Adc::create(Func, Dest, Src0)); 189 Context.insert(InstX8632Adc::create(Func, Dest, Src0));
187 } 190 }
188 void _add(Variable *Dest, Operand *Src0) { 191 void _add(Variable *Dest, Operand *Src0) {
189 Context.insert(InstX8632Add::create(Func, Dest, Src0)); 192 Context.insert(InstX8632Add::create(Func, Dest, Src0));
190 } 193 }
191 void _adjust_stack(int32_t Amount) { 194 void _adjust_stack(int32_t Amount) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 virtual ~TargetGlobalInitX8632() {} 496 virtual ~TargetGlobalInitX8632() {}
494 }; 497 };
495 498
496 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 499 template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
497 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 500 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
498 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 501 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
499 502
500 } // end of namespace Ice 503 } // end of namespace Ice
501 504
502 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 505 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698