| 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 4571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4582 if (!First) | 4582 if (!First) |
| 4583 Str << " "; | 4583 Str << " "; |
| 4584 First = false; | 4584 First = false; |
| 4585 Str << getRegName(Register, IceType_i32); | 4585 Str << getRegName(Register, IceType_i32); |
| 4586 } | 4586 } |
| 4587 Str << "}\n"; | 4587 Str << "}\n"; |
| 4588 } | 4588 } |
| 4589 } | 4589 } |
| 4590 } | 4590 } |
| 4591 | 4591 |
| 4592 template <> |
| 4593 void ConstantInteger32::emitWithoutDollar(GlobalContext *Ctx) const { |
| 4594 if (!ALLOW_DUMP) |
| 4595 return; |
| 4596 Ostream &Str = Ctx->getStrEmit(); |
| 4597 Str << (int32_t)getValue(); |
| 4598 } |
| 4599 |
| 4592 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const { | 4600 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const { |
| 4593 if (!ALLOW_DUMP) | 4601 if (!ALLOW_DUMP) |
| 4594 return; | 4602 return; |
| 4595 Ostream &Str = Ctx->getStrEmit(); | 4603 Ostream &Str = Ctx->getStrEmit(); |
| 4596 Str << "$" << (int32_t)getValue(); | 4604 Str << "$"; |
| 4605 emitWithoutDollar(Ctx); |
| 4606 } |
| 4607 |
| 4608 template <> void ConstantInteger64::emitWithoutDollar(GlobalContext *) const { |
| 4609 llvm_unreachable("Not expecting to emitWithoutDollar 64-bit integers"); |
| 4597 } | 4610 } |
| 4598 | 4611 |
| 4599 template <> void ConstantInteger64::emit(GlobalContext *) const { | 4612 template <> void ConstantInteger64::emit(GlobalContext *) const { |
| 4600 llvm_unreachable("Not expecting to emit 64-bit integers"); | 4613 llvm_unreachable("Not expecting to emit 64-bit integers"); |
| 4601 } | 4614 } |
| 4602 | 4615 |
| 4616 template <> void ConstantFloat::emitWithoutDollar(GlobalContext *) const { |
| 4617 llvm_unreachable("Not expecting to emitWithoutDollar floats"); |
| 4618 } |
| 4619 |
| 4603 template <> void ConstantFloat::emit(GlobalContext *Ctx) const { | 4620 template <> void ConstantFloat::emit(GlobalContext *Ctx) const { |
| 4604 if (!ALLOW_DUMP) | 4621 if (!ALLOW_DUMP) |
| 4605 return; | 4622 return; |
| 4606 Ostream &Str = Ctx->getStrEmit(); | 4623 Ostream &Str = Ctx->getStrEmit(); |
| 4607 emitPoolLabel(Str); | 4624 emitPoolLabel(Str); |
| 4608 } | 4625 } |
| 4609 | 4626 |
| 4627 template <> void ConstantDouble::emitWithoutDollar(GlobalContext *) const { |
| 4628 llvm_unreachable("Not expecting to emitWithoutDollar doubles"); |
| 4629 } |
| 4630 |
| 4610 template <> void ConstantDouble::emit(GlobalContext *Ctx) const { | 4631 template <> void ConstantDouble::emit(GlobalContext *Ctx) const { |
| 4611 if (!ALLOW_DUMP) | 4632 if (!ALLOW_DUMP) |
| 4612 return; | 4633 return; |
| 4613 Ostream &Str = Ctx->getStrEmit(); | 4634 Ostream &Str = Ctx->getStrEmit(); |
| 4614 emitPoolLabel(Str); | 4635 emitPoolLabel(Str); |
| 4615 } | 4636 } |
| 4616 | 4637 |
| 4638 void ConstantUndef::emitWithoutDollar(GlobalContext *) const { |
| 4639 llvm_unreachable("Not expecting to emitWithoutDollar undef"); |
| 4640 } |
| 4641 |
| 4617 void ConstantUndef::emit(GlobalContext *) const { | 4642 void ConstantUndef::emit(GlobalContext *) const { |
| 4618 llvm_unreachable("undef value encountered by emitter."); | 4643 llvm_unreachable("undef value encountered by emitter."); |
| 4619 } | 4644 } |
| 4620 | 4645 |
| 4621 TargetDataX8632::TargetDataX8632(GlobalContext *Ctx) | 4646 TargetDataX8632::TargetDataX8632(GlobalContext *Ctx) |
| 4622 : TargetDataLowering(Ctx) {} | 4647 : TargetDataLowering(Ctx) {} |
| 4623 | 4648 |
| 4624 void TargetDataX8632::lowerGlobal(const VariableDeclaration &Var) const { | 4649 void TargetDataX8632::lowerGlobal(const VariableDeclaration &Var) const { |
| 4625 // If external and not initialized, this must be a cross test. | 4650 // If external and not initialized, this must be a cross test. |
| 4626 // Don't generate a declaration for such cases. | 4651 // Don't generate a declaration for such cases. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4788 case FT_Asm: | 4813 case FT_Asm: |
| 4789 case FT_Iasm: { | 4814 case FT_Iasm: { |
| 4790 OstreamLocker L(Ctx); | 4815 OstreamLocker L(Ctx); |
| 4791 emitConstantPool<PoolTypeConverter<float>>(Ctx); | 4816 emitConstantPool<PoolTypeConverter<float>>(Ctx); |
| 4792 emitConstantPool<PoolTypeConverter<double>>(Ctx); | 4817 emitConstantPool<PoolTypeConverter<double>>(Ctx); |
| 4793 } break; | 4818 } break; |
| 4794 } | 4819 } |
| 4795 } | 4820 } |
| 4796 | 4821 |
| 4797 } // end of namespace Ice | 4822 } // end of namespace Ice |
| OLD | NEW |