| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// | 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// |
| 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 implements the TargetLoweringX8632 class, which | 10 // This file implements the TargetLoweringX8632 class, which |
| (...skipping 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3087 const bool IsCttz = true; | 3087 const bool IsCttz = true; |
| 3088 lowerCountZeros(IsCttz, Val->getType(), Instr->getDest(), FirstVal, | 3088 lowerCountZeros(IsCttz, Val->getType(), Instr->getDest(), FirstVal, |
| 3089 SecondVal); | 3089 SecondVal); |
| 3090 return; | 3090 return; |
| 3091 } | 3091 } |
| 3092 case Intrinsics::Fabs: { | 3092 case Intrinsics::Fabs: { |
| 3093 Operand *Src = legalize(Instr->getArg(0)); | 3093 Operand *Src = legalize(Instr->getArg(0)); |
| 3094 Type Ty = Src->getType(); | 3094 Type Ty = Src->getType(); |
| 3095 Variable *Dest = Instr->getDest(); | 3095 Variable *Dest = Instr->getDest(); |
| 3096 Variable *T = makeVectorOfFabsMask(Ty); | 3096 Variable *T = makeVectorOfFabsMask(Ty); |
| 3097 // The pand instruction operates on an m128 memory operand, so if |
| 3098 // Src is an f32 or f64, we need to make sure it's in a register. |
| 3099 if (!isVectorType(Ty)) |
| 3100 Src = legalizeToVar(Src); |
| 3097 _pand(T, Src); | 3101 _pand(T, Src); |
| 3098 if (isVectorType(Ty)) | 3102 if (isVectorType(Ty)) |
| 3099 _movp(Dest, T); | 3103 _movp(Dest, T); |
| 3100 else | 3104 else |
| 3101 _mov(Dest, T); | 3105 _mov(Dest, T); |
| 3102 return; | 3106 return; |
| 3103 } | 3107 } |
| 3104 case Intrinsics::Longjmp: { | 3108 case Intrinsics::Longjmp: { |
| 3105 InstCall *Call = makeHelperCall(H_call_longjmp, nullptr, 2); | 3109 InstCall *Call = makeHelperCall(H_call_longjmp, nullptr, 2); |
| 3106 Call->addArg(Instr->getArg(0)); | 3110 Call->addArg(Instr->getArg(0)); |
| (...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4847 case FT_Asm: | 4851 case FT_Asm: |
| 4848 case FT_Iasm: { | 4852 case FT_Iasm: { |
| 4849 OstreamLocker L(Ctx); | 4853 OstreamLocker L(Ctx); |
| 4850 emitConstantPool<PoolTypeConverter<float>>(Ctx); | 4854 emitConstantPool<PoolTypeConverter<float>>(Ctx); |
| 4851 emitConstantPool<PoolTypeConverter<double>>(Ctx); | 4855 emitConstantPool<PoolTypeConverter<double>>(Ctx); |
| 4852 } break; | 4856 } break; |
| 4853 } | 4857 } |
| 4854 } | 4858 } |
| 4855 | 4859 |
| 4856 } // end of namespace Ice | 4860 } // end of namespace Ice |
| OLD | NEW |