[llvm-commits] [llvm] r168282 - in /llvm/trunk: test/ExecutionEngine/MCJIT/simpletest-remote.ll test/ExecutionEngine/MCJIT/stubs-remote.ll test/ExecutionEngine/MCJIT/test-common-symbols-remote.ll test/ExecutionEngine/MCJIT/test-data-align-remote.ll test/ExecutionEngine/MCJIT/test-fp-no-external-funcs-remote.ll test/ExecutionEngine/MCJIT/test-global-init-nonzero-remote.ll test/ExecutionEngine/MCJIT/test-ptr-reloc-remote.ll tools/lli/RecordingMemoryManager.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Sat Nov 17 22:16:32 PST 2012
Author: chapuni
Date: Sun Nov 18 00:16:32 2012
New Revision: 168282
URL: http://llvm.org/viewvc/llvm-project?rev=168282&view=rev
Log:
MCJIT: [cygming] Give noop to __main also in RecordingMemoryManger. It is emitted in @main().
XFAIL(s) can be removed.
Modified:
llvm/trunk/test/ExecutionEngine/MCJIT/simpletest-remote.ll
llvm/trunk/test/ExecutionEngine/MCJIT/stubs-remote.ll
llvm/trunk/test/ExecutionEngine/MCJIT/test-common-symbols-remote.ll
llvm/trunk/test/ExecutionEngine/MCJIT/test-data-align-remote.ll
llvm/trunk/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs-remote.ll
llvm/trunk/test/ExecutionEngine/MCJIT/test-global-init-nonzero-remote.ll
llvm/trunk/test/ExecutionEngine/MCJIT/test-ptr-reloc-remote.ll
llvm/trunk/tools/lli/RecordingMemoryManager.cpp
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/simpletest-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/simpletest-remote.ll?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/simpletest-remote.ll (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/simpletest-remote.ll Sun Nov 18 00:16:32 2012
@@ -1,5 +1,5 @@
; RUN: %lli -mtriple=%mcjit_triple -use-mcjit -remote-mcjit %s > /dev/null
-; XFAIL: arm, mingw32
+; XFAIL: arm
define i32 @bar() {
ret i32 0
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/stubs-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/stubs-remote.ll?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/stubs-remote.ll (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/stubs-remote.ll Sun Nov 18 00:16:32 2012
@@ -1,5 +1,5 @@
; RUN: %lli -mtriple=%mcjit_triple -use-mcjit -remote-mcjit -disable-lazy-compilation=false %s
-; XFAIL: arm, mingw32
+; XFAIL: arm
define i32 @main() nounwind {
entry:
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/test-common-symbols-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/test-common-symbols-remote.ll?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/test-common-symbols-remote.ll (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/test-common-symbols-remote.ll Sun Nov 18 00:16:32 2012
@@ -1,5 +1,5 @@
; RUN: %lli -mtriple=%mcjit_triple -use-mcjit -remote-mcjit -O0 -disable-lazy-compilation=false %s
-; XFAIL: arm, mingw32, cygwin
+; XFAIL: arm
; The intention of this test is to verify that symbols mapped to COMMON in ELF
; work as expected.
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/test-data-align-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/test-data-align-remote.ll?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/test-data-align-remote.ll (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/test-data-align-remote.ll Sun Nov 18 00:16:32 2012
@@ -1,5 +1,5 @@
; RUN: %lli -mtriple=%mcjit_triple -use-mcjit -remote-mcjit -O0 %s
-; XFAIL: arm, mingw32
+; XFAIL: arm
; Check that a variable is always aligned as specified.
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs-remote.ll?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs-remote.ll (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs-remote.ll Sun Nov 18 00:16:32 2012
@@ -1,5 +1,5 @@
; RUN: %lli -mtriple=%mcjit_triple -use-mcjit -remote-mcjit %s > /dev/null
-; XFAIL: arm, mingw32
+; XFAIL: arm
define double @test(double* %DP, double %Arg) {
%D = load double* %DP ; <double> [#uses=1]
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/test-global-init-nonzero-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/test-global-init-nonzero-remote.ll?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/test-global-init-nonzero-remote.ll (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/test-global-init-nonzero-remote.ll Sun Nov 18 00:16:32 2012
@@ -1,5 +1,5 @@
; RUN: %lli -mtriple=%mcjit_triple -use-mcjit -remote-mcjit %s > /dev/null
-; XFAIL: arm, mingw32, cygwin
+; XFAIL: arm
@count = global i32 1, align 4
Modified: llvm/trunk/test/ExecutionEngine/MCJIT/test-ptr-reloc-remote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/MCJIT/test-ptr-reloc-remote.ll?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/MCJIT/test-ptr-reloc-remote.ll (original)
+++ llvm/trunk/test/ExecutionEngine/MCJIT/test-ptr-reloc-remote.ll Sun Nov 18 00:16:32 2012
@@ -1,5 +1,5 @@
; RUN: %lli -mtriple=%mcjit_triple -use-mcjit -remote-mcjit -O0 %s
-; XFAIL: arm, mingw32
+; XFAIL: arm
@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
Modified: llvm/trunk/tools/lli/RecordingMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/RecordingMemoryManager.cpp?rev=168282&r1=168281&r2=168282&view=diff
==============================================================================
--- llvm/trunk/tools/lli/RecordingMemoryManager.cpp (original)
+++ llvm/trunk/tools/lli/RecordingMemoryManager.cpp Sun Nov 18 00:16:32 2012
@@ -82,7 +82,20 @@
void RecordingMemoryManager::deallocateExceptionTable(void *ET) {
llvm_unreachable("Unexpected!");
}
+
+static int jit_noop() {
+ return 0;
+}
+
void *RecordingMemoryManager::getPointerToNamedFunction(const std::string &Name,
bool AbortOnFailure) {
+ // We should not invoke parent's ctors/dtors from generated main()!
+ // On Mingw and Cygwin, the symbol __main is resolved to
+ // callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
+ // (and register wrong callee's dtors with atexit(3)).
+ // We expect ExecutionEngine::runStaticConstructorsDestructors()
+ // is called before ExecutionEngine::runFunctionAsMain() is called.
+ if (Name == "__main") return (void*)(intptr_t)&jit_noop;
+
return NULL;
}
More information about the llvm-commits
mailing list