Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// | 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 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 /// \file | 10 /// \file |
| (...skipping 5730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5741 Variable *TargetX86Base<Machine>::makeVectorOfZeros(Type Ty, int32_t RegNum) { | 5741 Variable *TargetX86Base<Machine>::makeVectorOfZeros(Type Ty, int32_t RegNum) { |
| 5742 return makeZeroedRegister(Ty, RegNum); | 5742 return makeZeroedRegister(Ty, RegNum); |
| 5743 } | 5743 } |
| 5744 | 5744 |
| 5745 template <class Machine> | 5745 template <class Machine> |
| 5746 Variable *TargetX86Base<Machine>::makeVectorOfMinusOnes(Type Ty, | 5746 Variable *TargetX86Base<Machine>::makeVectorOfMinusOnes(Type Ty, |
| 5747 int32_t RegNum) { | 5747 int32_t RegNum) { |
| 5748 Variable *MinusOnes = makeReg(Ty, RegNum); | 5748 Variable *MinusOnes = makeReg(Ty, RegNum); |
| 5749 // Insert a FakeDef so the live range of MinusOnes is not overestimated. | 5749 // Insert a FakeDef so the live range of MinusOnes is not overestimated. |
| 5750 Context.insert<InstFakeDef>(MinusOnes); | 5750 Context.insert<InstFakeDef>(MinusOnes); |
| 5751 _pcmpeq(MinusOnes, MinusOnes); | 5751 if (Ty == IceType_f64) |
| 5752 // pcmpeqq requires SSE 4.1, while pcmpeqd does the same job and only | |
|
Jim Stichnoth
2015/12/20 18:42:23
Could you also note that f64 is (currently) used o
sehr
2016/01/07 18:53:12
Done.
| |
| 5753 // requires SSE2. | |
| 5754 _pcmpeq(MinusOnes, MinusOnes, IceType_f32); | |
| 5755 else | |
| 5756 _pcmpeq(MinusOnes, MinusOnes); | |
| 5752 return MinusOnes; | 5757 return MinusOnes; |
| 5753 } | 5758 } |
| 5754 | 5759 |
| 5755 template <class Machine> | 5760 template <class Machine> |
| 5756 Variable *TargetX86Base<Machine>::makeVectorOfOnes(Type Ty, int32_t RegNum) { | 5761 Variable *TargetX86Base<Machine>::makeVectorOfOnes(Type Ty, int32_t RegNum) { |
| 5757 Variable *Dest = makeVectorOfZeros(Ty, RegNum); | 5762 Variable *Dest = makeVectorOfZeros(Ty, RegNum); |
| 5758 Variable *MinusOne = makeVectorOfMinusOnes(Ty); | 5763 Variable *MinusOne = makeVectorOfMinusOnes(Ty); |
| 5759 _psub(Dest, MinusOne); | 5764 _psub(Dest, MinusOne); |
| 5760 return Dest; | 5765 return Dest; |
| 5761 } | 5766 } |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6403 } | 6408 } |
| 6404 // the offset is not eligible for blinding or pooling, return the original | 6409 // the offset is not eligible for blinding or pooling, return the original |
| 6405 // mem operand | 6410 // mem operand |
| 6406 return MemOperand; | 6411 return MemOperand; |
| 6407 } | 6412 } |
| 6408 | 6413 |
| 6409 } // end of namespace X86Internal | 6414 } // end of namespace X86Internal |
| 6410 } // end of namespace Ice | 6415 } // end of namespace Ice |
| 6411 | 6416 |
| 6412 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 6417 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
| OLD | NEW |