diff options
author | Amara Emerson <amara.emerson@arm.com> | 2013-05-03 11:36:35 +0000 |
---|---|---|
committer | Amara Emerson <amara.emerson@arm.com> | 2013-05-03 11:36:35 +0000 |
commit | 5d446e61d992f105a05aade62d5305fd8a346081 (patch) | |
tree | 397251bdb3b58c7cbe7a93b1885cc2f77d3c058e /lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | 820b3fd7716cf5ab26961d1b2b21fd5d0f330fe1 (diff) |
Add support for reading ARM ELF build attributes.
Build attribute sections can now be read if they exist via ELFObjectFile, and
the llvm-readobj tool has been extended with an option to dump this information
if requested. Regression tests are also included which exercise these features.
Also update the docs with a fixed ARM ABI link and a new link to the Addenda
which provides the build attributes specification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 13ec208793..2d5dca5c04 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -15,7 +15,6 @@ #define DEBUG_TYPE "asm-printer" #include "ARMAsmPrinter.h" #include "ARM.h" -#include "ARMBuildAttrs.h" #include "ARMConstantPoolValue.h" #include "ARMMachineFunctionInfo.h" #include "ARMTargetMachine.h" @@ -44,6 +43,7 @@ #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/Object/ELF_ARM.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ELF.h" @@ -90,7 +90,7 @@ namespace { break; /* GAS requires .fpu to be emitted regardless of EABI attribute */ case ARMBuildAttrs::Advanced_SIMD_arch: - case ARMBuildAttrs::VFP_arch: + case ARMBuildAttrs::FP_arch: Streamer.EmitRawText(StringRef("\t.fpu ") + String.lower()); break; } @@ -798,24 +798,24 @@ void ARMAsmPrinter::emitAttributes() { /* VFPv4 + .fpu */ if (Subtarget->hasVFP4()) { - AttrEmitter->EmitAttribute(ARMBuildAttrs::VFP_arch, + AttrEmitter->EmitAttribute(ARMBuildAttrs::FP_arch, ARMBuildAttrs::AllowFPv4A); if (emitFPU) - AttrEmitter->EmitTextAttribute(ARMBuildAttrs::VFP_arch, "vfpv4"); + AttrEmitter->EmitTextAttribute(ARMBuildAttrs::FP_arch, "vfpv4"); /* VFPv3 + .fpu */ } else if (Subtarget->hasVFP3()) { - AttrEmitter->EmitAttribute(ARMBuildAttrs::VFP_arch, + AttrEmitter->EmitAttribute(ARMBuildAttrs::FP_arch, ARMBuildAttrs::AllowFPv3A); if (emitFPU) - AttrEmitter->EmitTextAttribute(ARMBuildAttrs::VFP_arch, "vfpv3"); + AttrEmitter->EmitTextAttribute(ARMBuildAttrs::FP_arch, "vfpv3"); /* VFPv2 + .fpu */ } else if (Subtarget->hasVFP2()) { - AttrEmitter->EmitAttribute(ARMBuildAttrs::VFP_arch, + AttrEmitter->EmitAttribute(ARMBuildAttrs::FP_arch, ARMBuildAttrs::AllowFPv2); if (emitFPU) - AttrEmitter->EmitTextAttribute(ARMBuildAttrs::VFP_arch, "vfpv2"); + AttrEmitter->EmitTextAttribute(ARMBuildAttrs::FP_arch, "vfpv2"); } /* TODO: ARMBuildAttrs::Allowed is not completely accurate, |