| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// | 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 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 /// \file | 10 /// \file |
| (...skipping 2787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 } | 2798 } |
| 2799 | 2799 |
| 2800 if (isVectorType(DestTy)) { | 2800 if (isVectorType(DestTy)) { |
| 2801 switch (Instr->getOp()) { | 2801 switch (Instr->getOp()) { |
| 2802 default: | 2802 default: |
| 2803 UnimplementedLoweringError(this, Instr); | 2803 UnimplementedLoweringError(this, Instr); |
| 2804 return; | 2804 return; |
| 2805 // Explicitly whitelist vector instructions we have implemented/enabled. | 2805 // Explicitly whitelist vector instructions we have implemented/enabled. |
| 2806 case InstArithmetic::Fadd: | 2806 case InstArithmetic::Fadd: |
| 2807 case InstArithmetic::Add: | 2807 case InstArithmetic::Add: |
| 2808 case InstArithmetic::And: |
| 2808 break; | 2809 break; |
| 2809 } | 2810 } |
| 2810 } | 2811 } |
| 2811 | 2812 |
| 2812 Variable *T = makeReg(DestTy); | 2813 Variable *T = makeReg(DestTy); |
| 2813 | 2814 |
| 2814 // * Handle div/rem separately. They require a non-legalized Src1 to inspect | 2815 // * Handle div/rem separately. They require a non-legalized Src1 to inspect |
| 2815 // whether or not Src1 is a non-zero constant. Once legalized it is more | 2816 // whether or not Src1 is a non-zero constant. Once legalized it is more |
| 2816 // difficult to determine (constant may be moved to a register). | 2817 // difficult to determine (constant may be moved to a register). |
| 2817 // * Handle floating point arithmetic separately: they require Src1 to be | 2818 // * Handle floating point arithmetic separately: they require Src1 to be |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2946 if (!Srcs.immediateIsFlexEncodable() && | 2947 if (!Srcs.immediateIsFlexEncodable() && |
| 2947 Srcs.invertedImmediateIsFlexEncodable()) { | 2948 Srcs.invertedImmediateIsFlexEncodable()) { |
| 2948 Variable *Src0R = Srcs.src0R(this); | 2949 Variable *Src0R = Srcs.src0R(this); |
| 2949 Operand *Src1F = Srcs.invertedSrc1F(this); | 2950 Operand *Src1F = Srcs.invertedSrc1F(this); |
| 2950 _bic(T, Src0R, Src1F); | 2951 _bic(T, Src0R, Src1F); |
| 2951 _mov(Dest, T); | 2952 _mov(Dest, T); |
| 2952 return; | 2953 return; |
| 2953 } | 2954 } |
| 2954 } | 2955 } |
| 2955 Variable *Src0R = Srcs.src0R(this); | 2956 Variable *Src0R = Srcs.src0R(this); |
| 2956 Operand *Src1RF = Srcs.src1RF(this); | 2957 if (isVectorType(DestTy)) { |
| 2957 _and(T, Src0R, Src1RF); | 2958 Variable *Src1R = legalizeToReg(Src1); |
| 2959 _vand(T, Src0R, Src1R); |
| 2960 } else { |
| 2961 Operand *Src1RF = Srcs.src1RF(this); |
| 2962 _and(T, Src0R, Src1RF); |
| 2963 } |
| 2958 _mov(Dest, T); | 2964 _mov(Dest, T); |
| 2959 return; | 2965 return; |
| 2960 } | 2966 } |
| 2961 case InstArithmetic::Or: { | 2967 case InstArithmetic::Or: { |
| 2962 Variable *Src0R = Srcs.src0R(this); | 2968 Variable *Src0R = Srcs.src0R(this); |
| 2963 Operand *Src1RF = Srcs.src1RF(this); | 2969 Operand *Src1RF = Srcs.src1RF(this); |
| 2964 _orr(T, Src0R, Src1RF); | 2970 _orr(T, Src0R, Src1RF); |
| 2965 _mov(Dest, T); | 2971 _mov(Dest, T); |
| 2966 return; | 2972 return; |
| 2967 } | 2973 } |
| (...skipping 3511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6479 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 6485 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 6480 // However, for compatibility with current NaCl LLVM, don't claim that. | 6486 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 6481 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 6487 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 6482 } | 6488 } |
| 6483 | 6489 |
| 6484 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM]; | 6490 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM]; |
| 6485 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; | 6491 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; |
| 6486 | 6492 |
| 6487 } // end of namespace ARM32 | 6493 } // end of namespace ARM32 |
| 6488 } // end of namespace Ice | 6494 } // end of namespace Ice |
| OLD | NEW |