Commit Graph

226 Commits

Author SHA1 Message Date
Daniel Dunbar
24ec2e5a72 [tests] Cleanup initialization of test suffixes.
- Instead of setting the suffixes in a bunch of places, just set one master
   list in the top-level config. We now only modify the suffix list in a few
   suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py).

 - Aside from removing the need for a bunch of lit.local.cfg files, this enables
   4 tests that were inadvertently being skipped (one in
   Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and
   CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been
   XFAILED).

 - This commit also fixes a bunch of config files to use config.root instead of
   older copy-pasted code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188513 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-16 00:37:11 +00:00
Lang Hames
623f2025a7 Optimistically ignore scattered relocations in MachO in RuntimeDyld. This
un-breaks simple use cases while I work on more general support.

<rdar://problem/14487667>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188044 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:57:01 +00:00
Elena Demikhovsky
aefdc04b2b LLVM Interpreter: MIPS tests should pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187867 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 06:13:21 +00:00
Elena Demikhovsky
7398c774f6 LLVM Interpreter: fixed bug 16694
fix for: Bug 16694 - ExecutionEngine/test-interp-vec-loadstore.ll failing on powerpc-darwin8 (http://llvm.org/bugs/show_bug.cgi?id=16694)
The ExecutionEngine/test-interp-vec-loadstore.ll test has been failing on powerpc-darwin8 (on other platforms it passed)

the reason of fail was wrong output by printf. this output is checked by FileCheck, but on little-endian powerpc the output numeric data were printed inside out and FileCheck reported fail.
the printfs have been replaced by checking data inside test and numeric output has been replaced by the text output like : "int test passed, float test passed". The text output is checked by FileCheck.
the dependency on data layout has been removed.

done by Yuri Veselov (Intel)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187791 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 10:40:45 +00:00
Elena Demikhovsky
cf21d155ed LLVM Interpreter: This patch implements vector support for cast operations (zext, sext, uitofp, sitofp, trunc, fpext, fptosi, fptrunc, bitcast) and shift operations (shl, ashr, lshr) for integer and floating point data types.
Added tests.

Done by Yuri Veselov (mailto:Yuri.Veselov@intel.com).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187724 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 12:17:06 +00:00
Petar Jovanovic
f0639501ea [mips] Remove XFAIL from test-ptr-reloc-remote.ll
The change r187019 has fixed multiple relocations in dynamic linker for
MIPS, so now this test passes for MIPS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187053 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24 17:14:05 +00:00
Stephen Lin
0dfc166487 Add newlines at end of test files, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186263 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-13 22:00:58 +00:00
Rafael Espindola
d1100b3325 Enable mcjit tests on ppc64 when building with cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183143 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-03 19:17:21 +00:00
Tim Northover
95a565a063 Disable new legacy JIT test on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183071 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 10:24:11 +00:00
Tim Northover
85c622d6b6 X86: change MOV64ri64i32 into MOV32ri64
The MOV64ri64i32 instruction required hacky MCInst lowering because it
was allocated as setting a GR64, but the eventual instruction ("movl")
only set a GR32. This converts it into a so-called "MOV32ri64" which
still accepts a (appropriate) 64-bit immediate but defines a GR32.
This is then converted to the full GR64 by a SUBREG_TO_REG operation,
thus keeping everyone happy.

This fixes a typo in the opcode field of the original patch, which
should make the legact JIT work again (& adds test for that problem).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183068 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-01 09:55:14 +00:00
Tim Northover
e274b476de ARM: use pristine object file while processing relocations
Previously we would read-modify-write the target bits when processing
relocations for the MCJIT. This had the problem that when relocations
were processed multiple times for the same object file (as they can
be), the result is not idempotent and the values became corrupted.

The solution to this is to take any bits used in the destination from
the pristine object file as LLVM emitted it.

This should fix PR16013 and remote MCJIT on ARM ELF targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182800 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-28 19:48:19 +00:00
Renato Golin
3a408fa878 Disable remote MCJIT on pre-v6 ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-20 07:46:06 +00:00
Tim Northover
820b147493 Invalidate instruction cache when setting memory to be executable.
lli's remote MCJIT code calls setExecutable just prior to running
code. In line with Darwin behaviour this seems to be the place to
invalidate any caches needed so that relocations can take effect
properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-19 15:28:16 +00:00
Renato Golin
6d65f333a3 Unsupported remote JIT on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182201 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-18 19:42:07 +00:00
Rafael Espindola
aa4f36407f XFAIL this test for mingw too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-13 00:18:24 +00:00
Aaron Ballman
2e2c12b996 XFAILing this test on Win32 to unbreak the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181600 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 14:42:16 +00:00
Adhemerval Zanella
f51d7e76ae PowerPC: Fix unimplemented relocation on ppc64
This patch handles the R_PPC64_REL64 relocation type for powerpc64
for mcjit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181220 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 17:21:23 +00:00
Ulrich Weigand
7207285e65 [SystemZ] Set up JIT/MCJIT test cases
This patch adds the necessary configuration bits and #ifdef's to set up
the JIT/MCJIT test cases for SystemZ.  Like other recent targets, we do
fully support MCJIT, but do not support the old JIT at all.  Set up the
lit config files accordingly, and disable old-JIT unit tests.

Patch by Richard Sandiford.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181207 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 16:21:50 +00:00
Rafael Espindola
9d4e034bbc Free the exception object. Should fix the vg bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181195 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 13:30:52 +00:00
Rafael Espindola
cf896576c8 XFAIL for cygwin.
Looks like symbol resolution is not working on cygwin, the test fails
because __gxx_personality_v0 is not found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181179 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 03:35:56 +00:00
Rafael Espindola
f93b6d2ec5 This should also fail on ARM.
We currently have no way to register new eh frames on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181172 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05 22:42:34 +00:00
Rafael Espindola
9caaa902c3 Fix XFAIL line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181171 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05 21:30:10 +00:00
Rafael Espindola
b9e20bae2e XFAIL this on ppc64.
It looks like eh uses an unimplemented relocation on pp64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181169 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05 21:04:18 +00:00
Rafael Espindola
a2e40fbd62 Add EH support to the MCJIT.
This gets exception handling working on ELF and Macho (x86-64 at least).
Other than the EH frame registration, this patch also implements support
for GOT relocations which are used to locate the personality function on
MachO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181167 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05 20:43:10 +00:00
Tim Northover
7428539a1c AArch64: enable MCJIT and tests now that everything passes.
This removes dire warnings about AArch64 being unsupported and enables
the tests when appropriate on this platform.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181135 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04 20:14:22 +00:00
Rafael Espindola
e87dadc44b Fix Addend computation for non external relocations on Macho.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 15:40:54 +00:00
Rafael Espindola
8e6e02a41b Collect the Addend for external relocs.
This fixes 2013-04-04-RelocAddend.ll. We don't have a testcase for non external
relocs with an Addend. I will try to write one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180767 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 01:29:57 +00:00
Rafael Espindola
59a0e79631 Add getSymbolAlignment to the ObjectFile interface.
For regular object files this is only meaningful for common symbols. An object
file format with direct support for atoms should be able to provide alignment
information for all symbols.

This replaces getCommonSymbolAlignment and fixes
test-common-symbols-alignment.ll on darwin. This also includes a fix to
MachOObjectFile::getSymbolFlags. It was marking undefined symbols as common
(already tested by existing mcjit tests now that it is used).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180736 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29 22:24:22 +00:00
Rafael Espindola
8a905e7e34 Disable the MCJIT tests on 32 bit darwin.
I recently enabled them on 32 and 64 bit darwin, but it looks like 32 bit is
still fairly broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180730 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29 21:09:32 +00:00
Rafael Espindola
87b5017139 Propagate relocation info to resolveRelocation.
This gets most of the MCJITs tests passing with MachO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180716 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29 17:24:34 +00:00
Nadav Rotem
0d840bb2fa Teach the interpreter to handle vector compares and additional vector arithmetic operations.
Patch by Yuri Veselov.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180626 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26 20:19:41 +00:00
Nadav Rotem
0fda0f3976 Revert r179409 because it caused some warnings and some of the build bots fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179418 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 22:02:26 +00:00
Nadav Rotem
affe889d08 Add support for additional vector instructions in the interpreter.
patch by Veselov, Yuri <Yuri.Veselov@intel.com>.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179409 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 20:45:20 +00:00
Eli Bendersky
20680b045a Rewrite test/ExecutionEngine tests to use FileCheck instead of grep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179043 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 19:51:36 +00:00
Akira Hatanaka
84058c9acc [mips] XFAIL test-interp-vec-loadstore.ll in an attempt to turn builder
llvm-mips-linux green.

llvm-mips-linux runs on a big endian machine. This test passes if I change 'e'
to 'E' in the target data layout string.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178910 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 20:54:46 +00:00
Ulrich Weigand
03f018a713 Respect Addend when processing MCJIT relocations to local/global symbols.
When the RuntimeDyldELF::processRelocationRef routine finds the target
symbol of a relocation in the local or global symbol table, it performs
a section-relative relocation:

    Value.SectionID = lsi->second.first;
    Value.Addend = lsi->second.second;

At this point, however, any Addend that might have been specified in
the original relocation record is lost.  This is somewhat difficult to
trigger for relocations within the code section since they usually
do not contain non-zero Addends (when built with the default JIT code
model, in any case).  However, the problem can be reliably triggered
by a relocation within the data section caused by code like:

 int test[2] = { -1, 0 };
 int *p = &test[1];

The initializer of "p" will need a relocation to "test + 4".  On
platforms using RelA relocations this means an Addend of 4 is required.
Current code ignores this addend when processing the relocation,
resulting in incorrect execution.

Fixed by taking the Addend into account when processing relocations
to symbols found in the local or global symbol table.

Tested on x86_64-linux and powerpc64-linux.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178869 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 13:29:04 +00:00
Nadav Rotem
953783e00c Add support for vector data types in the LLVM interpreter.
Patch by:
Veselov, Yuri <Yuri.Veselov@intel.com>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178469 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-01 15:53:30 +00:00
Jyotsna Verma
3cf2dba90f Disable Execution Engine tests not supported by Hexagon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177896 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:02:14 +00:00
Renato Golin
4a4fb84d4b Corrections for XFAIL armv5 tests
Most of the tests that behave differently on llvm-arm-linux buildbot
did so becase the triple wasn't set correctly to armv5, so we can
revert most of the special behaviour added previously. Some tests
still need the special treatment, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176243 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-28 10:05:10 +00:00
Renato Golin
e57aaf038f Proper XFAILs for ARMv7 / v5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176095 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26 17:16:27 +00:00
Tim Northover
f13a7e2b21 AArch64: adjust tests which rely on a default JIT
Profiling tests *do* need a JIT. They'll pass if a cross-compiler targetting
AArch64 by default has been built, but fail if a native AArch64 compiler has
been build. Therefore XFAIL is inappropriate and we mark them unsupported.

ExecutionEngine tests are JIT by definition, they should also be unsupported.

Transforms/LICM only uses the interpreter to check the output is still sane
after optimisation. It can be switched to use an interpreter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175433 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18 11:08:37 +00:00
Peter Collingbourne
fbb662f840 Introduce llvm::sys::getProcessTriple() function.
In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
as part of work to allow the user to supply a different default
target triple at configure time.  This change also affected the JIT.
However, it is inappropriate to use the default target triple in the
JIT in most circumstances because this will not necessarily match
the current architecture used by the process, leading to illegal
instruction and other such errors at run time.

Introduce the getProcessTriple() function for use in the JIT and
its clients, and cause the JIT to use it.  On architectures with a
single bitness, the host and process triples are identical.  On other
architectures, the host triple represents the architecture of the
host CPU, while the process triple represents the architecture used
by the host CPU to interpret machine code within the current process.
For example, when executing 32-bit code on a 64-bit Linux machine,
the host triple may be 'x86_64-unknown-linux-gnu', while the process
triple may be 'i386-unknown-linux-gnu'.

This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
platforms.

Differential Revision: http://llvm-reviews.chandlerc.com/D254

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172627 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 17:27:22 +00:00
NAKAMURA Takumi
fecc368beb llvm/test/ExecutionEngine/MCJIT/lit.local.cfg: ppc32-elf is not ready.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168364 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-20 10:49:01 +00:00
Simon Atanasyan
01425d639e Marking remote mcjit tests as XFAIL for MIPS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168357 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-20 07:25:17 +00:00
Ulrich Weigand
948d9f743e Enable MCJIT tests on PowerPC.
Disable old JIT tests on PowerPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168316 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-19 17:57:07 +00:00
NAKAMURA Takumi
fad9751d6e MCJIT: [cygming] Give noop to __main also in RecordingMemoryManger. It is emitted in @main().
XFAIL(s) can be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168282 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-18 06:16:32 +00:00
NAKAMURA Takumi
64b5015900 test/ExecutionEngine/MCJIT/stubs-remote.ll: Prune DOSish CRLF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-18 06:16:21 +00:00
Andrew Kaylor
784c5bb8b5 Marking remote mcjit tests as XFAIL for cygwin (hopefully only temporarily).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168226 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-17 00:02:50 +00:00
Andrew Kaylor
21414e953a Marking remote mcjit tests as XFAIL for mingw32 (hopefully only temporarily).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168221 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 23:38:16 +00:00
Andrew Kaylor
3bae2696ff Marking remote mcjit tests as XFAIL for ARM (hopefully only temporarily).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168210 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 22:21:04 +00:00