[llvm-branch-commits] [llvm-branch] r239698 - Merging r238751:
Daniel Sanders
daniel.sanders at imgtec.com
Sun Jun 14 08:36:13 PDT 2015
Author: dsanders
Date: Sun Jun 14 10:36:12 2015
New Revision: 239698
URL: http://llvm.org/viewvc/llvm-project?rev=239698&view=rev
Log:
Merging r238751:
------------------------------------------------------------------------
r238751 | rafael | 2015-06-01 16:10:51 +0100 (Mon, 01 Jun 2015) | 3 lines
Fix relocation selection for foo-. on mips.
This handles only the 32 bit case.
------------------------------------------------------------------------
Added:
llvm/branches/release_36/test/MC/Mips/relocation.s
- copied unchanged from r238751, llvm/trunk/test/MC/Mips/relocation.s
Modified:
llvm/branches/release_36/ (props changed)
llvm/branches/release_36/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/branches/release_36/lib/MC/MCObjectFileInfo.cpp
llvm/branches/release_36/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
llvm/branches/release_36/lib/Target/Mips/MipsAsmPrinter.cpp
Propchange: llvm/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jun 14 10:36:12 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226151,226164-226166,226170-226171,226182,226407-226409,226473,226588,226616,226652,226664,226708,226711,226755,226791,226808-226809,226905,227005,227084-227085,227087,227089,227250,227260-227261,227269,227290,227294,227299,227319,227339,227430,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228403,228411,228444,228490,228500,228507,228518,228525,228565,228656,228760-228761,228793,228842,228899,228957,228969,228979,229029,229343,229351-229352,229421,229495,229529,229731,229911,230058,230235,230500,230657,230742,230748,230956,231219,231227,231237,231563,231601,232046,232085,232189,232382,233904,236457,236635
+/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226151,226164-226166,226170-226171,226182,226407-226409,226473,226588,226616,226652,226664,226708,226711,226755,226791,226808-226809,226905,227005,227084-227085,227087,227089,227250,227260-227261,227269,227290,227294,227299,227319,227339,227430,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228403,228411,228444,228490,228500,228507,228518,228525,228565,228656,228760-228761,228793,228842,228899,228957,228969,228979,229029,229343,229351-229352,229421,229495,229529,229731,229911,230058,230235,230500,230657,230742,230748,230956,231219,231227,231237,231563,231601,232046,232085,232189,232382,233904,236457,236635,238751
Modified: llvm/branches/release_36/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=239698&r1=239697&r2=239698&view=diff
==============================================================================
--- llvm/branches/release_36/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/branches/release_36/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun Jun 14 10:36:12 2015
@@ -656,7 +656,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG
(void)BlockNumber;
bool MatchFilterBB = false; (void)MatchFilterBB;
#ifndef NDEBUG
- MatchFilterBB = (!FilterDAGBasicBlockName.empty() &&
+ MatchFilterBB = (FilterDAGBasicBlockName.empty() ||
FilterDAGBasicBlockName ==
FuncInfo->MBB->getBasicBlock()->getName().str());
#endif
Modified: llvm/branches/release_36/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/MC/MCObjectFileInfo.cpp?rev=239698&r1=239697&r2=239698&view=diff
==============================================================================
--- llvm/branches/release_36/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/branches/release_36/lib/MC/MCObjectFileInfo.cpp Sun Jun 14 10:36:12 2015
@@ -350,6 +350,8 @@ void MCObjectFileInfo::InitELFMCObjectFi
// eh_frame section can be read-only. DW.ref.personality will be generated
// for relocation.
PersonalityEncoding = dwarf::DW_EH_PE_indirect;
+ LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+ TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
break;
case Triple::ppc64:
case Triple::ppc64le:
Modified: llvm/branches/release_36/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp?rev=239698&r1=239697&r2=239698&view=diff
==============================================================================
--- llvm/branches/release_36/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp (original)
+++ llvm/branches/release_36/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp Sun Jun 14 10:36:12 2015
@@ -55,8 +55,7 @@ unsigned MipsELFObjectWriter::GetRelocTy
default:
llvm_unreachable("invalid fixup kind!");
case FK_Data_4:
- Type = ELF::R_MIPS_32;
- break;
+ return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32;
case FK_Data_8:
Type = ELF::R_MIPS_64;
break;
Modified: llvm/branches/release_36/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Target/Mips/MipsAsmPrinter.cpp?rev=239698&r1=239697&r2=239698&view=diff
==============================================================================
--- llvm/branches/release_36/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/branches/release_36/lib/Target/Mips/MipsAsmPrinter.cpp Sun Jun 14 10:36:12 2015
@@ -29,6 +29,8 @@
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineMemOperand.h"
+#include "llvm/CodeGen/MachineModuleInfoImpls.h"
+#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
@@ -1033,6 +1035,27 @@ void MipsAsmPrinter::EmitEndOfAsmFile(Mo
}
// return to the text section
OutStreamer.SwitchSection(OutContext.getObjectFileInfo()->getTextSection());
+
+ /* if (Subtarget->isTargetELF()) */ {
+ const TargetLoweringObjectFileELF &TLOFELF =
+ static_cast<const TargetLoweringObjectFileELF &>(getObjFileLowering());
+
+ MachineModuleInfoELF &MMIELF = MMI->getObjFileInfo<MachineModuleInfoELF>();
+
+ // Output stubs for external and common global variables.
+ MachineModuleInfoELF::SymbolListTy Stubs = MMIELF.GetGVStubList();
+ if (!Stubs.empty()) {
+ OutStreamer.SwitchSection(TLOFELF.getDataRelSection());
+ const DataLayout *TD = TM.getSubtargetImpl()->getDataLayout();
+
+ for (const auto &Stub : Stubs) {
+ OutStreamer.EmitLabel(Stub.first);
+ OutStreamer.EmitSymbolValue(Stub.second.getPointer(),
+ TD->getPointerSize());
+ }
+ Stubs.clear();
+ }
+ }
}
void MipsAsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
More information about the llvm-branch-commits
mailing list