[llvm-commits] [llvm] r68006 - in /llvm/trunk/lib/Target/Alpha: AlphaTargetAsmInfo.cpp AlphaTargetAsmInfo.h
Anton Korobeynikov
asl at math.spbu.ru
Sun Mar 29 10:14:14 PDT 2009
Author: asl
Date: Sun Mar 29 12:14:14 2009
New Revision: 68006
URL: http://llvm.org/viewvc/llvm-project?rev=68006&view=rev
Log:
Alpha always requires global relocations to be r/w regardless of PIC.
Modified:
llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.h
Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.cpp?rev=68006&r1=68005&r2=68006&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.cpp Sun Mar 29 12:14:14 2009
@@ -16,7 +16,7 @@
using namespace llvm;
-AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
+AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
: TargetAsmInfo(TM) {
AlignmentIsInBytes = false;
PrivateGlobalPrefix = "$";
@@ -24,3 +24,8 @@
JumpTableDataSection = "\t.section .rodata\n";
WeakRefDirective = "\t.weak\t";
}
+
+unsigned AlphaTargetAsmInfo::RelocBehaviour() const {
+ return (TM.getRelocationModel() != Reloc::Static ?
+ Reloc::LocalOrGlobal : Reloc::Global);
+}
Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.h?rev=68006&r1=68005&r2=68006&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaTargetAsmInfo.h Sun Mar 29 12:14:14 2009
@@ -23,6 +23,8 @@
struct AlphaTargetAsmInfo : public TargetAsmInfo {
explicit AlphaTargetAsmInfo(const AlphaTargetMachine &TM);
+
+ virtual unsigned RelocBehaviour() const;
};
} // namespace llvm
More information about the llvm-commits
mailing list