diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-03-08 08:31:54 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-08 08:31:54 +0000 |
commit | 032953d74746fa89b62e49b63a38ba6d8827b81a (patch) | |
tree | 329b4cb9ba0f9954f0018bd1a03ee3d5cdcee790 /lib/Target/X86 | |
parent | b4ddac9bf7b9d4aa7267702f375647b370ad32f4 (diff) | |
download | external_llvm-032953d74746fa89b62e49b63a38ba6d8827b81a.zip external_llvm-032953d74746fa89b62e49b63a38ba6d8827b81a.tar.gz external_llvm-032953d74746fa89b62e49b63a38ba6d8827b81a.tar.bz2 |
Putting more constants which do not contain relocations into .literal{4|8|16}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index ad9a1e8..81ec50e 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -255,17 +255,18 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { SwitchToDataSection(TAI->getDataSection(), I); else { // Read-only data. - bool isIntFPLiteral = Type->isInteger() || Type->isFloatingPoint(); - if (C->ContainsRelocations() && Subtarget->isTargetDarwin() && + bool HasReloc = C->ContainsRelocations(); + if (HasReloc && + Subtarget->isTargetDarwin() && TM.getRelocationModel() != Reloc::Static) SwitchToDataSection("\t.const_data\n"); - else if (isIntFPLiteral && Size == 4 && + else if (!HasReloc && Size == 4 && TAI->getFourByteConstantSection()) SwitchToDataSection(TAI->getFourByteConstantSection(), I); - else if (isIntFPLiteral && Size == 8 && + else if (!HasReloc && Size == 8 && TAI->getEightByteConstantSection()) SwitchToDataSection(TAI->getEightByteConstantSection(), I); - else if (isIntFPLiteral && Size == 16 && + else if (!HasReloc && Size == 16 && TAI->getSixteenByteConstantSection()) SwitchToDataSection(TAI->getSixteenByteConstantSection(), I); else if (TAI->getReadOnlySection()) |