1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

97 Commits

Author SHA1 Message Date
Tim Northover
390335941f 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.

llvm-svn: 181135
2013-05-04 20:14:22 +00:00
Rafael Espindola
58fcd9bdde Fix Addend computation for non external relocations on Macho.
llvm-svn: 180790
2013-04-30 15:40:54 +00:00
Rafael Espindola
c3bc22082f 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.

llvm-svn: 180767
2013-04-30 01:29:57 +00:00
Rafael Espindola
d175d83203 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).

llvm-svn: 180736
2013-04-29 22:24:22 +00:00
Rafael Espindola
5189efa685 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.

llvm-svn: 180730
2013-04-29 21:09:32 +00:00
Rafael Espindola
eda9da47d6 Propagate relocation info to resolveRelocation.
This gets most of the MCJITs tests passing with MachO.

llvm-svn: 180716
2013-04-29 17:24:34 +00:00
Nadav Rotem
19172bc0f1 Teach the interpreter to handle vector compares and additional vector arithmetic operations.
Patch by Yuri Veselov.

llvm-svn: 180626
2013-04-26 20:19:41 +00:00
Nadav Rotem
17c064fb45 Revert r179409 because it caused some warnings and some of the build bots fail.
llvm-svn: 179418
2013-04-12 22:02:26 +00:00
Nadav Rotem
99420caf0a Add support for additional vector instructions in the interpreter.
patch by Veselov, Yuri <Yuri.Veselov@intel.com>.

llvm-svn: 179409
2013-04-12 20:45:20 +00:00
Eli Bendersky
88f7dd304e Rewrite test/ExecutionEngine tests to use FileCheck instead of grep
llvm-svn: 179043
2013-04-08 19:51:36 +00:00
Akira Hatanaka
70bcdf07be [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.

llvm-svn: 178910
2013-04-05 20:54:46 +00:00
Ulrich Weigand
045c5fae3d 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.

llvm-svn: 178869
2013-04-05 13:29:04 +00:00
Nadav Rotem
fe272b52da Add support for vector data types in the LLVM interpreter.
Patch by:
Veselov, Yuri <Yuri.Veselov@intel.com>

llvm-svn: 178469
2013-04-01 15:53:30 +00:00
Jyotsna Verma
8dc3b4847f Disable Execution Engine tests not supported by Hexagon.
llvm-svn: 177896
2013-03-25 20:02:14 +00:00
Renato Golin
86c3e15702 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.

llvm-svn: 176243
2013-02-28 10:05:10 +00:00
Renato Golin
1d5ca6f92e Proper XFAILs for ARMv7 / v5
llvm-svn: 176095
2013-02-26 17:16:27 +00:00
Tim Northover
6d736b1227 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.

llvm-svn: 175433
2013-02-18 11:08:37 +00:00
Peter Collingbourne
5f190b5e4e 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

llvm-svn: 172627
2013-01-16 17:27:22 +00:00
NAKAMURA Takumi
af8d10bdd1 llvm/test/ExecutionEngine/MCJIT/lit.local.cfg: ppc32-elf is not ready.
llvm-svn: 168364
2012-11-20 10:49:01 +00:00
Simon Atanasyan
946ee234f3 Marking remote mcjit tests as XFAIL for MIPS.
llvm-svn: 168357
2012-11-20 07:25:17 +00:00
Ulrich Weigand
c0920bb63a Enable MCJIT tests on PowerPC.
Disable old JIT tests on PowerPC.

llvm-svn: 168316
2012-11-19 17:57:07 +00:00
NAKAMURA Takumi
5948e67968 MCJIT: [cygming] Give noop to __main also in RecordingMemoryManger. It is emitted in @main().
XFAIL(s) can be removed.

llvm-svn: 168282
2012-11-18 06:16:32 +00:00
NAKAMURA Takumi
0a04171e80 test/ExecutionEngine/MCJIT/stubs-remote.ll: Prune DOSish CRLF.
llvm-svn: 168281
2012-11-18 06:16:21 +00:00
Andrew Kaylor
734b62b6ac Marking remote mcjit tests as XFAIL for cygwin (hopefully only temporarily).
llvm-svn: 168226
2012-11-17 00:02:50 +00:00
Andrew Kaylor
f132e42fe6 Marking remote mcjit tests as XFAIL for mingw32 (hopefully only temporarily).
llvm-svn: 168221
2012-11-16 23:38:16 +00:00
Andrew Kaylor
47462d3fe5 Marking remote mcjit tests as XFAIL for ARM (hopefully only temporarily).
llvm-svn: 168210
2012-11-16 22:21:04 +00:00
Andrew Kaylor
3b722976b8 Adding new tests to test lli's pseudo-remote feature (-remote-mcjit).
llvm-svn: 168180
2012-11-16 18:51:59 +00:00
Amara Emerson
6ad9fb1a92 Add MCJIT test case for running global constructors.
llvm-svn: 168149
2012-11-16 11:17:00 +00:00
Tim Northover
a1e6e26f6e Align the data section correctly when loading an ELF file.
Patch by Amara Emerson.

llvm-svn: 166920
2012-10-29 10:47:07 +00:00
Tim Northover
fdb1d1af73 Make use of common-symbol alignment info in ELF loader.
Patch by Amara Emerson.

llvm-svn: 166919
2012-10-29 10:47:04 +00:00
James Molloy
6addd26621 Some regression tests which are testing the old jit and are exercising functionality which is both known to be broken and not expected to be fixed in the old jit. To remove these from the regression test output, I've marked them XFAIL (for lit tests) and ifdef'd them out (unit tests). These modifications remove the last long-standing regression test failures from the buildbots (though updating the triple to reflect new ubuntu configuration has temporarily caused some new failures). Tested on x86-64 and ARM Linux.
Patch by David Tweed!

llvm-svn: 165390
2012-10-08 13:06:30 +00:00
NAKAMURA Takumi
da9a939cdb Enable llvm/test/ExecutionEngine/MCJIT also for cygwin.
llvm-svn: 165313
2012-10-05 14:10:29 +00:00
Tim Northover
0f0719897b Implement .rel relocation for R_ARM_ABS32 in MCJIT.
Patch by Amara Emerson.

llvm-svn: 165128
2012-10-03 16:29:42 +00:00
NAKAMURA Takumi
2c00334731 test/ExecutionEngine/MCJIT: MCJIT should work also on mingw.
FIXME: Also cygwin?
llvm-svn: 165081
2012-10-03 01:42:37 +00:00
Andrew Kaylor
0d06582cd5 Support for generating ELF objects on Windows.
This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present.  This patch also enables MCJIT tests on Windows using the new environment value.

llvm-svn: 165030
2012-10-02 18:38:34 +00:00
Jim Grosbach
855092deca Revert "Enable MCJIT tests on Darwin."
This reverts commit 163278.

Works OK on x86_64, but not i386. Will re-enable when that's cleared up.

llvm-svn: 163290
2012-09-06 03:24:09 +00:00
Jim Grosbach
fb64c491ba Enable MCJIT tests on Darwin.
llvm-svn: 163278
2012-09-06 00:59:06 +00:00
Michael Liao
5c1090880a Should put test case under test/ExecutionEngine/MCJIT/
llvm-svn: 162885
2012-08-30 00:43:57 +00:00
Akira Hatanaka
0ce3a3b090 Add Mips to the list of target architectures for the MCJIT tests.
Patch by Reed Kotler.

llvm-svn: 158933
2012-06-21 20:23:32 +00:00
Danil Malyshev
0d982140e7 Temporarily disabled the MCJIT tests for Darwin, because the RuntimeDyldMachO has a problems with relocations for 32bit x86.
llvm-svn: 157035
2012-05-18 00:30:58 +00:00
Danil Malyshev
dade6759c4 - Added ExecutionEngine/MCJIT tests
- Added HOST_ARCH to Makefile.config.in
The HOST_ARCH will be used by MCJIT tests filter, because MCJIT supported only x86 and ARM architectures now.

llvm-svn: 157015
2012-05-17 21:07:47 +00:00
Preston Gurd
6e9bcca355 This patch improves the MCJIT runtime dynamic loader by adding new handling
of zero-initialized sections, virtual sections and common symbols
and preventing the loading of sections which are not required for
execution such as debug information.

Patch by Andy Kaylor!

llvm-svn: 154610
2012-04-12 20:13:57 +00:00
Bill Wendling
86e08bb6de Revert r153694. It was causing failures in the buildbots.
llvm-svn: 153701
2012-03-29 23:23:59 +00:00
Danil Malyshev
d66f6a3b28 Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

llvm-svn: 153694
2012-03-29 21:46:18 +00:00
Chandler Carruth
8243f2a6d4 Revert a series of commits to MCJIT to get the build working in CMake
(and hopefully on Windows). The bots have been down most of the day
because of this, and it's not clear to me what all will be required to
fix it.

The commits started with r153205, then r153207, r153208, and r153221.
The first commit seems to be the real culprit, but I couldn't revert
a smaller number of patches.

When resubmitting, r153207 and r153208 should be folded into r153205,
they were simple build fixes.

llvm-svn: 153241
2012-03-22 05:44:06 +00:00
Danil Malyshev
88676c0b84 Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

llvm-svn: 153221
2012-03-21 21:06:29 +00:00
Eli Bendersky
4afdeeb682 Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed.
Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.

llvm-svn: 150664
2012-02-16 06:28:33 +00:00
Eli Bendersky
d53bd9175f Remove "XFAIL: arm" from test/ExecutionEngine/test-return.ll
The test passes on ARM bots

llvm-svn: 148315
2012-01-17 18:21:05 +00:00
Eli Bendersky
fd380c0d1e Additional ExecutionEngine tests, as part of bringing up the MCJIT on ELF
implementation.
Currently lit still executes ExecutionEngine tests with JIT (not MCJIT) by
default. MCJIT tests can be executed manually by calling llvm-lit with
--param jit_impl=mcjit

llvm-svn: 148299
2012-01-17 09:14:54 +00:00
Eli Bendersky
973d44eb7c Adding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is currently basic and will be enhanced with future patches.
Patch developed by Andy Kaylor and Daniel Malea. Reviewed on llvm-commits.

llvm-svn: 148231
2012-01-16 08:56:09 +00:00