| 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 4683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4694 snprintf(buf, llvm::array_lengthof(buf), T::PrintfString, RawValue); | 4694 snprintf(buf, llvm::array_lengthof(buf), T::PrintfString, RawValue); |
| 4695 assert(CharsPrinted >= 0 && | 4695 assert(CharsPrinted >= 0 && |
| 4696 (size_t)CharsPrinted < llvm::array_lengthof(buf)); | 4696 (size_t)CharsPrinted < llvm::array_lengthof(buf)); |
| 4697 (void)CharsPrinted; // avoid warnings if asserts are disabled | 4697 (void)CharsPrinted; // avoid warnings if asserts are disabled |
| 4698 Const->emitPoolLabel(Str); | 4698 Const->emitPoolLabel(Str); |
| 4699 Str << ":\n\t" << T::AsmTag << "\t" << buf << "\t# " << T::TypeName << " " | 4699 Str << ":\n\t" << T::AsmTag << "\t" << buf << "\t# " << T::TypeName << " " |
| 4700 << Value << "\n"; | 4700 << Value << "\n"; |
| 4701 } | 4701 } |
| 4702 } | 4702 } |
| 4703 | 4703 |
| 4704 void TargetDataX8632::lowerConstants(GlobalContext *Ctx) const { | 4704 void TargetDataX8632::lowerConstants() const { |
| 4705 if (Ctx->getFlags().DisableTranslation) | 4705 if (Ctx->getFlags().DisableTranslation) |
| 4706 return; | 4706 return; |
| 4707 // No need to emit constants from the int pool since (for x86) they | 4707 // No need to emit constants from the int pool since (for x86) they |
| 4708 // are embedded as immediates in the instructions, just emit float/double. | 4708 // are embedded as immediates in the instructions, just emit float/double. |
| 4709 if (Ctx->getFlags().UseELFWriter) { | 4709 if (Ctx->getFlags().UseELFWriter) { |
| 4710 ELFObjectWriter *Writer = Ctx->getObjectWriter(); | 4710 ELFObjectWriter *Writer = Ctx->getObjectWriter(); |
| 4711 Writer->writeConstantPool<ConstantFloat>(IceType_f32); | 4711 Writer->writeConstantPool<ConstantFloat>(IceType_f32); |
| 4712 Writer->writeConstantPool<ConstantDouble>(IceType_f64); | 4712 Writer->writeConstantPool<ConstantDouble>(IceType_f64); |
| 4713 } else { | 4713 } else { |
| 4714 OstreamLocker L(Ctx); | 4714 OstreamLocker L(Ctx); |
| 4715 emitConstantPool<PoolTypeConverter<float>>(Ctx); | 4715 emitConstantPool<PoolTypeConverter<float>>(Ctx); |
| 4716 emitConstantPool<PoolTypeConverter<double>>(Ctx); | 4716 emitConstantPool<PoolTypeConverter<double>>(Ctx); |
| 4717 } | 4717 } |
| 4718 } | 4718 } |
| 4719 | 4719 |
| 4720 } // end of namespace Ice | 4720 } // end of namespace Ice |
| OLD | NEW |