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 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 case InstArithmetic::Or: |
| 2812 case InstArithmetic::Fmul: |
| 2813 case InstArithmetic::Mul: |
2812 break; | 2814 break; |
2813 } | 2815 } |
2814 } | 2816 } |
2815 | 2817 |
2816 Variable *T = makeReg(DestTy); | 2818 Variable *T = makeReg(DestTy); |
2817 | 2819 |
2818 // * Handle div/rem separately. They require a non-legalized Src1 to inspect | 2820 // * Handle div/rem separately. They require a non-legalized Src1 to inspect |
2819 // whether or not Src1 is a non-zero constant. Once legalized it is more | 2821 // whether or not Src1 is a non-zero constant. Once legalized it is more |
2820 // difficult to determine (constant may be moved to a register). | 2822 // difficult to determine (constant may be moved to a register). |
2821 // * Handle floating point arithmetic separately: they require Src1 to be | 2823 // * Handle floating point arithmetic separately: they require Src1 to be |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3103 // T = 0 - T. | 3105 // T = 0 - T. |
3104 _rsb(T, T, _0); | 3106 _rsb(T, T, _0); |
3105 } | 3107 } |
3106 | 3108 |
3107 _mov(Dest, T); | 3109 _mov(Dest, T); |
3108 return; | 3110 return; |
3109 } | 3111 } |
3110 } | 3112 } |
3111 Variable *Src0R = Srcs.unswappedSrc0R(this); | 3113 Variable *Src0R = Srcs.unswappedSrc0R(this); |
3112 Variable *Src1R = Srcs.unswappedSrc1R(this); | 3114 Variable *Src1R = Srcs.unswappedSrc1R(this); |
3113 _mul(T, Src0R, Src1R); | 3115 if (isVectorType(DestTy)) { |
| 3116 _vmul(T, Src0R, Src1R); |
| 3117 } else { |
| 3118 _mul(T, Src0R, Src1R); |
| 3119 } |
3114 _mov(Dest, T); | 3120 _mov(Dest, T); |
3115 return; | 3121 return; |
3116 } | 3122 } |
3117 case InstArithmetic::Shl: { | 3123 case InstArithmetic::Shl: { |
3118 Variable *Src0R = Srcs.unswappedSrc0R(this); | 3124 Variable *Src0R = Srcs.unswappedSrc0R(this); |
3119 Operand *Src1R = Srcs.unswappedSrc1RShAmtImm(this); | 3125 Operand *Src1R = Srcs.unswappedSrc1RShAmtImm(this); |
3120 _lsl(T, Src0R, Src1R); | 3126 _lsl(T, Src0R, Src1R); |
3121 _mov(Dest, T); | 3127 _mov(Dest, T); |
3122 return; | 3128 return; |
3123 } | 3129 } |
(...skipping 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6499 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 6505 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
6500 // However, for compatibility with current NaCl LLVM, don't claim that. | 6506 // However, for compatibility with current NaCl LLVM, don't claim that. |
6501 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 6507 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
6502 } | 6508 } |
6503 | 6509 |
6504 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM]; | 6510 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM]; |
6505 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; | 6511 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; |
6506 | 6512 |
6507 } // end of namespace ARM32 | 6513 } // end of namespace ARM32 |
6508 } // end of namespace Ice | 6514 } // end of namespace Ice |
OLD | NEW |