[llvm-commits] [llvm] r54214 - in /llvm/trunk/lib/Target/Mips: MipsTargetAsmInfo.cpp MipsTargetAsmInfo.h
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Wed Jul 30 10:04:04 PDT 2008
Author: bruno
Date: Wed Jul 30 12:04:04 2008
New Revision: 54214
URL: http://llvm.org/viewvc/llvm-project?rev=54214&view=rev
Log:
Removed small section flag for mips, the assembler doesnt support this flag
Modified:
llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp
llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.h
Modified: llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp?rev=54214&r1=54213&r2=54214&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.cpp Wed Jul 30 12:04:04 2008
@@ -45,8 +45,16 @@
}
-SectionKind::Kind
-MipsTargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const {
+unsigned MipsTargetAsmInfo::
+SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
+ unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
+ // Mask out Small Section flag bit, Mips doesnt support 's' section symbol
+ // for its small sections.
+ return (Flags & (~SectionFlags::Small));
+}
+
+SectionKind::Kind MipsTargetAsmInfo::
+SectionKindForGlobal(const GlobalValue *GV) const {
SectionKind::Kind K = ELFTargetAsmInfo::SectionKindForGlobal(GV);
if (Subtarget->hasABICall())
@@ -72,8 +80,8 @@
return K;
}
-const Section*
-MipsTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
+const Section* MipsTargetAsmInfo::
+SelectSectionForGlobal(const GlobalValue *GV) const {
SectionKind::Kind K = SectionKindForGlobal(GV);
const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV);
Modified: llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.h?rev=54214&r1=54213&r2=54214&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetAsmInfo.h Wed Jul 30 12:04:04 2008
@@ -34,6 +34,12 @@
virtual SectionKind::Kind
SectionKindForGlobal(const GlobalValue *GV) const;
+ /// SectionFlagsForGlobal - This hook allows the target to select proper
+ /// section flags either for given global or for section.
+ virtual unsigned
+ SectionFlagsForGlobal(const GlobalValue *GV = NULL,
+ const char* name = NULL) const;
+
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
private:
More information about the llvm-commits
mailing list