[llvm-branch-commits] [llvm-branch] r195291 - Merging r195157:

Petar Jovanovic petar.jovanovic at imgtec.com
Wed Nov 20 16:52:34 PST 2013


Author: petarj
Date: Wed Nov 20 18:52:34 2013
New Revision: 195291

URL: http://llvm.org/viewvc/llvm-project?rev=195291&view=rev
Log:
Merging r195157:
------------------------------------------------------------------------
r195157 | petarj | 2013-11-19 22:56:00 +0100 (Tue, 19 Nov 2013) | 8 lines

[mips] Resolve relocation for the stubs in MCJIT when load address is known

Instead of processing relocation for branch to stubs right away, emit a
modified relocation and add it to queue to be resolved later when final load
address is known.
This resolves seven MIPS MCJIT issues that were caused by missing relocation
fixups at the end.

------------------------------------------------------------------------

Modified:
    llvm/branches/release_34/   (props changed)
    llvm/branches/release_34/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
    llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
    llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
    llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
    llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
    llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
    llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
    llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll

Propchange: llvm/branches/release_34/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 20 18:52:34 2013
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,195092-195094,195100,195102-195103,195118,195129,195138,195152,195161-195162,195193
+/llvm/trunk:155241,195092-195094,195100,195102-195103,195118,195129,195138,195152,195157,195161-195162,195193

Modified: llvm/branches/release_34/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp (original)
+++ llvm/branches/release_34/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Wed Nov 20 18:52:34 2013
@@ -1031,8 +1031,8 @@ void RuntimeDyldELF::processRelocationRe
     //  Look up for existing stub.
     StubMap::const_iterator i = Stubs.find(Value);
     if (i != Stubs.end()) {
-      resolveRelocation(Section, Offset,
-                        (uint64_t)Section.Address + i->second, RelType, 0);
+      RelocationEntry RE(SectionID, Offset, RelType, i->second);
+      addRelocationForSection(RE, SectionID);
       DEBUG(dbgs() << " Stub function found\n");
     } else {
       // Create a new stub function.
@@ -1057,9 +1057,8 @@ void RuntimeDyldELF::processRelocationRe
         addRelocationForSection(RELo, Value.SectionID);
       }
 
-      resolveRelocation(Section, Offset,
-                        (uint64_t)Section.Address + Section.StubOffset,
-                        RelType, 0);
+      RelocationEntry RE(SectionID, Offset, RelType, Section.StubOffset);
+      addRelocationForSection(RE, SectionID);
       Section.StubOffset += getMaxStubSize();
     }
   } else if (Arch == Triple::ppc64 || Arch == Triple::ppc64le) {

Modified: llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll (original)
+++ llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll Wed Nov 20 18:52:34 2013
@@ -1,7 +1,5 @@
 ; RUN: %lli_mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
 
-; XFAIL: mips
-
 declare i32 @FB()
 
 define i32 @FA() {

Modified: llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll (original)
+++ llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll Wed Nov 20 18:52:34 2013
@@ -1,7 +1,5 @@
 ; RUN: %lli_mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
 
-; XFAIL: mips
-
 declare i32 @FB()
 
 define i32 @main() {

Modified: llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll (original)
+++ llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll Wed Nov 20 18:52:34 2013
@@ -1,7 +1,5 @@
 ; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
 
-; XFAIL: mips
-
 define i32 @bar() {
 	ret i32 0
 }

Modified: llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll (original)
+++ llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll Wed Nov 20 18:52:34 2013
@@ -1,7 +1,5 @@
 ; RUN: %lli_mcjit -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target %s
 
-; XFAIL: mips
-
 ; The intention of this test is to verify that symbols mapped to COMMON in ELF
 ; work as expected.
 ;

Modified: llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll (original)
+++ llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll Wed Nov 20 18:52:34 2013
@@ -1,7 +1,5 @@
 ; RUN:  %lli_mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target %s
 
-; XFAIL: mips
-
 ; Check that a variable is always aligned as specified.
 
 @var = global i32 0, align 32

Modified: llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll (original)
+++ llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll Wed Nov 20 18:52:34 2013
@@ -1,7 +1,5 @@
 ; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
 
-; XFAIL: mips
-
 define double @test(double* %DP, double %Arg) {
 	%D = load double* %DP		; <double> [#uses=1]
 	%V = fadd double %D, 1.000000e+00		; <double> [#uses=2]

Modified: llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll?rev=195291&r1=195290&r2=195291&view=diff
==============================================================================
--- llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll (original)
+++ llvm/branches/release_34/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll Wed Nov 20 18:52:34 2013
@@ -1,7 +1,5 @@
 ; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
 
-; XFAIL: mips
-
 @count = global i32 1, align 4
 
 define i32 @main() nounwind uwtable {





More information about the llvm-branch-commits mailing list