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 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 void TargetARM32::lowerFcmp(const InstFcmp *Instr) { | 2495 void TargetARM32::lowerFcmp(const InstFcmp *Instr) { |
2496 Variable *Dest = Instr->getDest(); | 2496 Variable *Dest = Instr->getDest(); |
2497 if (isVectorType(Dest->getType())) { | 2497 if (isVectorType(Dest->getType())) { |
2498 Variable *T = makeReg(Dest->getType()); | 2498 Variable *T = makeReg(Dest->getType()); |
2499 Context.insert(InstFakeDef::create(Func, T)); | 2499 Context.insert(InstFakeDef::create(Func, T)); |
2500 _mov(Dest, T); | 2500 _mov(Dest, T); |
2501 UnimplementedError(Func->getContext()->getFlags()); | 2501 UnimplementedError(Func->getContext()->getFlags()); |
2502 return; | 2502 return; |
2503 } | 2503 } |
2504 | 2504 |
2505 Variable *T = makeReg(IceType_i32); | 2505 Variable *T = makeReg(IceType_i1); |
2506 Operand *_1 = Ctx->getConstantInt32(1); | 2506 Operand *_1 = Ctx->getConstantInt32(1); |
2507 Operand *_0 = Ctx->getConstantZero(IceType_i32); | 2507 Operand *_0 = Ctx->getConstantZero(IceType_i32); |
2508 | 2508 |
2509 CondARM32::Cond CondIfTrue0, CondIfTrue1, CondIfFalse; | 2509 CondARM32::Cond CondIfTrue0, CondIfTrue1, CondIfFalse; |
2510 lowerFcmpCond(Instr, &CondIfTrue0, &CondIfTrue1, &CondIfFalse); | 2510 lowerFcmpCond(Instr, &CondIfTrue0, &CondIfTrue1, &CondIfFalse); |
2511 | 2511 |
2512 bool RedefineT = false; | 2512 bool RedefineT = false; |
2513 if (CondIfFalse != CondARM32::kNone) { | 2513 if (CondIfFalse != CondARM32::kNone) { |
2514 assert(!RedefineT); | 2514 assert(!RedefineT); |
2515 _mov(T, _0, CondIfFalse); | 2515 _mov(T, _0, CondIfFalse); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 if (isVectorType(Dest->getType())) { | 2661 if (isVectorType(Dest->getType())) { |
2662 Variable *T = makeReg(Dest->getType()); | 2662 Variable *T = makeReg(Dest->getType()); |
2663 Context.insert(InstFakeDef::create(Func, T)); | 2663 Context.insert(InstFakeDef::create(Func, T)); |
2664 _mov(Dest, T); | 2664 _mov(Dest, T); |
2665 UnimplementedError(Func->getContext()->getFlags()); | 2665 UnimplementedError(Func->getContext()->getFlags()); |
2666 return; | 2666 return; |
2667 } | 2667 } |
2668 | 2668 |
2669 Constant *_0 = Ctx->getConstantZero(IceType_i32); | 2669 Constant *_0 = Ctx->getConstantZero(IceType_i32); |
2670 Constant *_1 = Ctx->getConstantInt32(1); | 2670 Constant *_1 = Ctx->getConstantInt32(1); |
2671 Variable *T = makeReg(IceType_i32); | 2671 Variable *T = makeReg(IceType_i1); |
2672 | 2672 |
2673 CondARM32::Cond CondIfTrue, CondIfFalse; | 2673 CondARM32::Cond CondIfTrue, CondIfFalse; |
2674 lowerIcmpCond(Inst, &CondIfTrue, &CondIfFalse); | 2674 lowerIcmpCond(Inst, &CondIfTrue, &CondIfFalse); |
2675 | 2675 |
2676 _mov(T, _0, CondIfFalse); | 2676 _mov(T, _0, CondIfFalse); |
2677 _mov_redefined(T, _1, CondIfTrue); | 2677 _mov_redefined(T, _1, CondIfTrue); |
2678 _mov(Dest, T); | 2678 _mov(Dest, T); |
2679 | 2679 |
2680 return; | 2680 return; |
2681 } | 2681 } |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4266 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 4266 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
4267 // However, for compatibility with current NaCl LLVM, don't claim that. | 4267 // However, for compatibility with current NaCl LLVM, don't claim that. |
4268 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 4268 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
4269 } | 4269 } |
4270 | 4270 |
4271 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[IceType_NUM]; | 4271 llvm::SmallBitVector TargetARM32::TypeToRegisterSet[IceType_NUM]; |
4272 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; | 4272 llvm::SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; |
4273 llvm::SmallBitVector TargetARM32::ScratchRegs; | 4273 llvm::SmallBitVector TargetARM32::ScratchRegs; |
4274 | 4274 |
4275 } // end of namespace Ice | 4275 } // end of namespace Ice |
OLD | NEW |