| 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 2790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::Fsub: | 2808 case InstArithmetic::Fsub: |
| 2809 case InstArithmetic::Sub: | 2809 case InstArithmetic::Sub: |
| 2810 case InstArithmetic::And: | 2810 case InstArithmetic::And: |
| 2811 case InstArithmetic::Or: |
| 2811 break; | 2812 break; |
| 2812 } | 2813 } |
| 2813 } | 2814 } |
| 2814 | 2815 |
| 2815 Variable *T = makeReg(DestTy); | 2816 Variable *T = makeReg(DestTy); |
| 2816 | 2817 |
| 2817 // * Handle div/rem separately. They require a non-legalized Src1 to inspect | 2818 // * Handle div/rem separately. They require a non-legalized Src1 to inspect |
| 2818 // whether or not Src1 is a non-zero constant. Once legalized it is more | 2819 // whether or not Src1 is a non-zero constant. Once legalized it is more |
| 2819 // difficult to determine (constant may be moved to a register). | 2820 // difficult to determine (constant may be moved to a register). |
| 2820 // * Handle floating point arithmetic separately: they require Src1 to be | 2821 // * Handle floating point arithmetic separately: they require Src1 to be |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2961 _vand(T, Src0R, Src1R); | 2962 _vand(T, Src0R, Src1R); |
| 2962 } else { | 2963 } else { |
| 2963 Operand *Src1RF = Srcs.src1RF(this); | 2964 Operand *Src1RF = Srcs.src1RF(this); |
| 2964 _and(T, Src0R, Src1RF); | 2965 _and(T, Src0R, Src1RF); |
| 2965 } | 2966 } |
| 2966 _mov(Dest, T); | 2967 _mov(Dest, T); |
| 2967 return; | 2968 return; |
| 2968 } | 2969 } |
| 2969 case InstArithmetic::Or: { | 2970 case InstArithmetic::Or: { |
| 2970 Variable *Src0R = Srcs.src0R(this); | 2971 Variable *Src0R = Srcs.src0R(this); |
| 2971 Operand *Src1RF = Srcs.src1RF(this); | 2972 if (isVectorType(DestTy)) { |
| 2972 _orr(T, Src0R, Src1RF); | 2973 Variable *Src1R = legalizeToReg(Src1); |
| 2974 _vorr(T, Src0R, Src1R); |
| 2975 } else { |
| 2976 Operand *Src1RF = Srcs.src1RF(this); |
| 2977 _orr(T, Src0R, Src1RF); |
| 2978 } |
| 2973 _mov(Dest, T); | 2979 _mov(Dest, T); |
| 2974 return; | 2980 return; |
| 2975 } | 2981 } |
| 2976 case InstArithmetic::Xor: { | 2982 case InstArithmetic::Xor: { |
| 2977 Variable *Src0R = Srcs.src0R(this); | 2983 Variable *Src0R = Srcs.src0R(this); |
| 2978 Operand *Src1RF = Srcs.src1RF(this); | 2984 Operand *Src1RF = Srcs.src1RF(this); |
| 2979 _eor(T, Src0R, Src1RF); | 2985 _eor(T, Src0R, Src1RF); |
| 2980 _mov(Dest, T); | 2986 _mov(Dest, T); |
| 2981 return; | 2987 return; |
| 2982 } | 2988 } |
| (...skipping 3510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6493 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 6499 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 6494 // However, for compatibility with current NaCl LLVM, don't claim that. | 6500 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 6495 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 6501 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 6496 } | 6502 } |
| 6497 | 6503 |
| 6498 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM]; | 6504 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM]; |
| 6499 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; | 6505 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; |
| 6500 | 6506 |
| 6501 } // end of namespace ARM32 | 6507 } // end of namespace ARM32 |
| 6502 } // end of namespace Ice | 6508 } // end of namespace Ice |
| OLD | NEW |