diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-20 06:45:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-20 06:45:39 +0000 |
commit | 45eeffcc2ac48cda51127f094a418c7c99a9cb3a (patch) | |
tree | e24ae641ac55330378a5c7df18fa22f2839f6798 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 38caaf14c11aaef054cd60687d92c0248f7768f5 (diff) | |
download | bcm5719-llvm-45eeffcc2ac48cda51127f094a418c7c99a9cb3a.tar.gz bcm5719-llvm-45eeffcc2ac48cda51127f094a418c7c99a9cb3a.zip |
make mcasmstreamer handle expanding 8 byte integer constants to
4-byte constants if .quad isn't supported. Switch a bunch of
methods used by the dwarf writer to use OutStreamer.EmitIntValue.
llvm-svn: 93987
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index d439fb6e3c1..d008b8f99d6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -784,39 +784,25 @@ void AsmPrinter::EmitSLEB128Bytes(int Value) const { /// EmitInt8 - Emit a byte directive and value. /// void AsmPrinter::EmitInt8(int Value) const { - O << MAI->getData8bitsDirective(); - PrintHex(Value & 0xFF); + OutStreamer.EmitIntValue(Value, 1, 0/*addrspace*/); } /// EmitInt16 - Emit a short directive and value. /// void AsmPrinter::EmitInt16(int Value) const { - O << MAI->getData16bitsDirective(); - PrintHex(Value & 0xFFFF); + OutStreamer.EmitIntValue(Value, 2, 0/*addrspace*/); } /// EmitInt32 - Emit a long directive and value. /// void AsmPrinter::EmitInt32(int Value) const { - O << MAI->getData32bitsDirective(); - PrintHex(Value); + OutStreamer.EmitIntValue(Value, 4, 0/*addrspace*/); } /// EmitInt64 - Emit a long long directive and value. /// void AsmPrinter::EmitInt64(uint64_t Value) const { - if (MAI->getData64bitsDirective()) { - O << MAI->getData64bitsDirective(); - PrintHex(Value); - } else { - if (TM.getTargetData()->isBigEndian()) { - EmitInt32(unsigned(Value >> 32)); O << '\n'; - EmitInt32(unsigned(Value)); - } else { - EmitInt32(unsigned(Value)); O << '\n'; - EmitInt32(unsigned(Value >> 32)); - } - } + OutStreamer.EmitIntValue(Value, 8, 0/*addrspace*/); } /// toOctal - Convert the low order bits of X into an octal digit. |