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 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2741 Context.insert(LabelFalse); | 2741 Context.insert(LabelFalse); |
2742 _mov_nonkillable(Dest, Zero); | 2742 _mov_nonkillable(Dest, Zero); |
2743 Context.insert(LabelTrue); | 2743 Context.insert(LabelTrue); |
2744 } | 2744 } |
2745 return; | 2745 return; |
2746 } | 2746 } |
2747 | 2747 |
2748 // cmp b, c | 2748 // cmp b, c |
2749 Operand *Src0RM = | 2749 Operand *Src0RM = |
2750 legalize(Src0, IsSrc1ImmOrReg ? (Legal_Reg | Legal_Mem) : Legal_Reg); | 2750 legalize(Src0, IsSrc1ImmOrReg ? (Legal_Reg | Legal_Mem) : Legal_Reg); |
2751 InstX8632Label *Label = InstX8632Label::create(Func, this); | |
2752 _cmp(Src0RM, Src1); | 2751 _cmp(Src0RM, Src1); |
2753 _mov(Dest, One); | 2752 _setcc(Dest, getIcmp32Mapping(Inst->getCondition())); |
2754 _br(getIcmp32Mapping(Inst->getCondition()), Label); | |
2755 _mov_nonkillable(Dest, Zero); | |
2756 Context.insert(Label); | |
2757 } | 2753 } |
2758 | 2754 |
2759 void TargetX8632::lowerInsertElement(const InstInsertElement *Inst) { | 2755 void TargetX8632::lowerInsertElement(const InstInsertElement *Inst) { |
2760 Operand *SourceVectNotLegalized = Inst->getSrc(0); | 2756 Operand *SourceVectNotLegalized = Inst->getSrc(0); |
2761 Operand *ElementToInsertNotLegalized = Inst->getSrc(1); | 2757 Operand *ElementToInsertNotLegalized = Inst->getSrc(1); |
2762 ConstantInteger32 *ElementIndex = | 2758 ConstantInteger32 *ElementIndex = |
2763 llvm::dyn_cast<ConstantInteger32>(Inst->getSrc(2)); | 2759 llvm::dyn_cast<ConstantInteger32>(Inst->getSrc(2)); |
2764 // Only constant indices are allowed in PNaCl IR. | 2760 // Only constant indices are allowed in PNaCl IR. |
2765 assert(ElementIndex); | 2761 assert(ElementIndex); |
2766 unsigned Index = ElementIndex->getValue(); | 2762 unsigned Index = ElementIndex->getValue(); |
(...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4887 case FT_Asm: | 4883 case FT_Asm: |
4888 case FT_Iasm: { | 4884 case FT_Iasm: { |
4889 OstreamLocker L(Ctx); | 4885 OstreamLocker L(Ctx); |
4890 emitConstantPool<PoolTypeConverter<float>>(Ctx); | 4886 emitConstantPool<PoolTypeConverter<float>>(Ctx); |
4891 emitConstantPool<PoolTypeConverter<double>>(Ctx); | 4887 emitConstantPool<PoolTypeConverter<double>>(Ctx); |
4892 } break; | 4888 } break; |
4893 } | 4889 } |
4894 } | 4890 } |
4895 | 4891 |
4896 } // end of namespace Ice | 4892 } // end of namespace Ice |
OLD | NEW |