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

Side by Side Diff: src/IceInstX8632.h

Issue 1185703004: Add constant blinding/pooling option for X8632 code translation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: change the default sz-seed back to 1. Created 5 years, 6 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/IceGlobalContext.cpp ('k') | src/IceInstX8632.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/IceInstX8632.h - x86-32 machine instructions -*- C++ -*-===// 1 //===- subzero/src/IceInstX8632.h - x86-32 machine instructions -*- 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 InstX8632 and OperandX8632 classes and 10 // This file declares the InstX8632 and OperandX8632 classes and
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void emitSegmentOverride(X8632::AssemblerX8632 *Asm) const; 79 void emitSegmentOverride(X8632::AssemblerX8632 *Asm) const;
80 X8632::Address toAsmAddress(Assembler *Asm) const; 80 X8632::Address toAsmAddress(Assembler *Asm) const;
81 void emit(const Cfg *Func) const override; 81 void emit(const Cfg *Func) const override;
82 using OperandX8632::dump; 82 using OperandX8632::dump;
83 void dump(const Cfg *Func, Ostream &Str) const override; 83 void dump(const Cfg *Func, Ostream &Str) const override;
84 84
85 static bool classof(const Operand *Operand) { 85 static bool classof(const Operand *Operand) {
86 return Operand->getKind() == static_cast<OperandKind>(kMem); 86 return Operand->getKind() == static_cast<OperandKind>(kMem);
87 } 87 }
88 88
89 void setRandomized(bool R) { Randomized = R; }
90
91 bool getRandomized() const { return Randomized; }
92
89 private: 93 private:
90 OperandX8632Mem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset, 94 OperandX8632Mem(Cfg *Func, Type Ty, Variable *Base, Constant *Offset,
91 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg); 95 Variable *Index, uint16_t Shift, SegmentRegisters SegmentReg);
92 ~OperandX8632Mem() override {} 96 ~OperandX8632Mem() override {}
93 Variable *Base; 97 Variable *Base;
94 Constant *Offset; 98 Constant *Offset;
95 Variable *Index; 99 Variable *Index;
96 uint16_t Shift; 100 uint16_t Shift;
97 SegmentRegisters SegmentReg : 16; 101 SegmentRegisters SegmentReg : 16;
102 // A flag to show if this memory operand is a randomized one.
103 // Randomized memory operands are generated in
104 // TargetX8632::randomizeOrPoolImmediate()
105 bool Randomized;
98 }; 106 };
99 107
100 // VariableSplit is a way to treat an f64 memory location as a pair 108 // VariableSplit is a way to treat an f64 memory location as a pair
101 // of i32 locations (Low and High). This is needed for some cases 109 // of i32 locations (Low and High). This is needed for some cases
102 // of the Bitcast instruction. Since it's not possible for integer 110 // of the Bitcast instruction. Since it's not possible for integer
103 // registers to access the XMM registers and vice versa, the 111 // registers to access the XMM registers and vice versa, the
104 // lowering forces the f64 to be spilled to the stack and then 112 // lowering forces the f64 to be spilled to the stack and then
105 // accesses through the VariableSplit. 113 // accesses through the VariableSplit.
106 class VariableSplit : public OperandX8632 { 114 class VariableSplit : public OperandX8632 {
107 VariableSplit() = delete; 115 VariableSplit() = delete;
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; 1809 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const;
1802 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; 1810 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const;
1803 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; 1811 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const;
1804 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; 1812 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const;
1805 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; 1813 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const;
1806 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; 1814 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const;
1807 1815
1808 } // end of namespace Ice 1816 } // end of namespace Ice
1809 1817
1810 #endif // SUBZERO_SRC_ICEINSTX8632_H 1818 #endif // SUBZERO_SRC_ICEINSTX8632_H
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698