1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

825 Commits

Author SHA1 Message Date
Dan Gohman
c264b63de6 Split the locking out of JIT::runJITOnFunction so that callers
that already hold the lock can call an entry point that doesn't
re-acquire the lock.

llvm-svn: 63965
2009-02-06 21:25:08 +00:00
Chris Lattner
9e3a296933 allow main to have any integer type.
llvm-svn: 63743
2009-02-04 17:48:18 +00:00
Nick Lewycky
a9c6af0bb8 Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn't
there.

This changes the interpreter to use libffi. After this patch, the interpreter
will barely be able to call any external functions if built on a system without
libffi installed (just enough to pass 'make check' really). But with libffi,
we can now call any function that isn't variadic or taking a struct or vector
parameter (but pointer to struct is fine). Patch by Alexei Svitkine!

llvm-svn: 63723
2009-02-04 06:26:47 +00:00
Evan Cheng
d650c9ecd7 Fix PR3423: Link llvm on ARM EABI machines. Patch by Robert Schuster.
llvm-svn: 63489
2009-02-01 06:42:27 +00:00
Nate Begeman
4de6ffb743 Add support for deleting a module provider from a JIT in such a way that it does not cause the owned module to be fully materialized.
llvm-svn: 62864
2009-01-23 19:27:28 +00:00
Tanya Lattner
33f3303401 Revert r62553 and r62616 due to issues with portability.
llvm-svn: 62777
2009-01-22 20:09:20 +00:00
Chris Lattner
da545d3918 rename methods in System/Host to be more consistent.
llvm-svn: 62776
2009-01-22 19:53:00 +00:00
Chris Lattner
b4ffb1f824 add getPointerToGlobal to the C bindings, patch by Lennart Augustsson!
PR3364

llvm-svn: 62697
2009-01-21 18:11:10 +00:00
Duncan Sands
eb7ffc9654 Fix typo. Patch by Alexei Svitkine.
llvm-svn: 62616
2009-01-20 21:20:23 +00:00
Nick Lewycky
6ef90b1a25 Make the Interpreter use libffi if it's available. Patch from Alexei Svitkine!
This requires a rebuild of 'configure' itself. I will be committing that next, but
built with the wrong version of autoconf. Somebody who has the right one, please update
it.

As a side-note, because of the way autoconf works, all built tools will link against
libffi, not just lli. If you know how to fix this, please let me know ...

llvm-svn: 62553
2009-01-20 00:51:40 +00:00
Chris Lattner
0354d30311 don't assert and die on out of range (undefined) shifts. This fixes
PR3334.

llvm-svn: 62352
2009-01-16 20:17:02 +00:00
Evan Cheng
2932869ed4 Change isGVCompilationDisabled() semantics again. It should abort on any GV that's not constant whether it's "internal" or not. In a server / client environment, GV is returned in the same block of memory as code. However, the memory might not be writable.
llvm-svn: 62336
2009-01-16 19:14:49 +00:00
Mikhail Glushenkov
49be18cfc6 Registry.h should not depend on CommandLine.h.
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.

llvm-svn: 62312
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5000223556 Delete trailing whitespace.
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Rafael Espindola
0aba6c9435 Add the private linkage.
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Duncan Sands
bcdbfb63dc Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.

llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Misha Brukman
71c7e40966 Removed trailing whitespace from Makefiles.
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
8271066844 Tidy up #includes, deleting a bunch of unnecessary #includes.
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Evan Cheng
b3026de547 Fix misplaced right parentheses.
llvm-svn: 61699
2009-01-05 17:17:04 +00:00
Dan Gohman
6d6dd15fc3 Handle weak_extern in the JIT. This fixes
SingleSource/UnitTests/2007-04-25-weak.c in JIT mode. The test
now passes on systems which are able to produce a correct
reference output to compare with.

llvm-svn: 61674
2009-01-05 05:32:42 +00:00
Evan Cheng
caa31a82fc Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin.
llvm-svn: 60828
2008-12-10 02:32:19 +00:00
Evan Cheng
1264f4bc9c Fix a bug introduced by r59265. If lazy compilation is disabled, return actual function ptr instead of ptr to stub if function is already compiled.
llvm-svn: 60822
2008-12-10 01:33:59 +00:00
Evan Cheng
3130873f30 DisableGVCompilation should not abort on internal GlobalValue's.
llvm-svn: 60750
2008-12-09 07:31:49 +00:00
Chris Lattner
5c70ae0588 Make JIT::runFunction handle functions with non-C calling conventions.
llvm-svn: 59904
2008-11-23 08:00:11 +00:00
Nicolas Geoffray
3cd13e7e65 Implement support for JIT exceptions on X86_64. Relative offsets are
encoded on 32 bytes, and the personality function is not encoded as
relative.

llvm-svn: 59516
2008-11-18 10:44:46 +00:00
Evan Cheng
f8ba919d76 Always emit a function pointer as a pointer to the function stub (if there is one). This makes it possible to compare function pointer values in lazy compilation mode. This fixes PR3043.
llvm-svn: 59265
2008-11-13 21:50:50 +00:00
Evan Cheng
b6c760349e Change binary dump format.
llvm-svn: 59119
2008-11-12 08:22:43 +00:00
Evan Cheng
b9dbae83d7 Comments and indentation.
llvm-svn: 59007
2008-11-10 23:26:16 +00:00
Evan Cheng
e2bed5dc3b Forgot these.
llvm-svn: 58952
2008-11-10 01:52:24 +00:00
Evan Cheng
7f1eececb4 Remove a InvalidateInstructionCache call with incorrect size.
llvm-svn: 58898
2008-11-08 08:15:39 +00:00
Evan Cheng
3d9c134136 Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ptr.
llvm-svn: 58897
2008-11-08 08:02:53 +00:00
Evan Cheng
fe6df6ae18 Rename isString -> isExternalSymbol; getString -> getExternalSymbol since these work on externsym machine relocations.
llvm-svn: 58895
2008-11-08 07:37:34 +00:00
Evan Cheng
8dfc67205a More debug output.
llvm-svn: 58894
2008-11-08 07:22:53 +00:00
Evan Cheng
237175e1ab More debug output.
llvm-svn: 58868
2008-11-07 22:30:29 +00:00
Evan Cheng
6e23b1e651 Jump tables may be emitted by target.
llvm-svn: 58835
2008-11-07 09:02:17 +00:00
Evan Cheng
1ea366a419 Improve JIT debugging outputs format consistency.
llvm-svn: 58807
2008-11-06 17:46:04 +00:00
Evan Cheng
3e727721d0 Need a \n.
llvm-svn: 58788
2008-11-06 01:18:29 +00:00
Evan Cheng
7390b46342 Undo 58778 but makes the binary dump prettier.
llvm-svn: 58782
2008-11-05 23:44:08 +00:00
Evan Cheng
575f3150cf Remove debug output that's not really useful.
llvm-svn: 58778
2008-11-05 23:21:11 +00:00
Evan Cheng
2702e22b83 Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS X
indirect gv reference. Please don't call it lazy.

llvm-svn: 58746
2008-11-05 01:50:32 +00:00
Evan Cheng
8a5c3c5cc3 Debugging output tweak.
llvm-svn: 58737
2008-11-05 00:22:28 +00:00
Evan Cheng
28e234a959 For some targets, it's not possible to place GVs in the same memory buffer as the MachineCodeEmitter allocated memory. Code and data has different read / write / execution privilege requirements.
This is a short term workaround. The current solution is for the JIT memory manager to manage code and data memory separately.

llvm-svn: 58688
2008-11-04 09:30:48 +00:00
Evan Cheng
7847f4f030 80 col violation.
llvm-svn: 58684
2008-11-04 06:10:31 +00:00
Evan Cheng
45516a94c1 Silence a compiler warning.
llvm-svn: 58598
2008-11-03 07:14:02 +00:00
Jim Grosbach
31e64cbf49 Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.
llvm-svn: 58475
2008-10-30 23:44:39 +00:00
Evan Cheng
479adf22ee Let target resolve some relocation results.
llvm-svn: 58407
2008-10-29 23:54:46 +00:00
Jim Grosbach
d735f403a0 Support for constant islands in the ARM JIT.
Since the ARM constant pool handling supercedes the standard LLVM constant
pool entirely, the JIT emitter does not allocate space for the constants,
nor initialize the memory. The constant pool is considered part of the 
instruction stream.

Likewise, when resolving relocations into the constant pool, a hook into
the target back end is used to resolve from the constant ID# to the
address where the constant is stored.

For now, the support in the ARM emitter is limited to 32-bit integer. Future
patches will expand this to the full range of constants necessary.

llvm-svn: 58338
2008-10-28 18:25:49 +00:00
Nicolas Geoffray
ce30b5caf0 Support for allocation of TLS variables in the JIT. Allocation of a global
variable is moved to the execution engine. The JIT calls the TargetJITInfo
to allocate thread local storage. Currently, only linux/x86 knows how to
allocate thread local global variables.

llvm-svn: 58142
2008-10-25 15:41:43 +00:00
Oscar Fuentes
a932cae97a CMake: Turned some libraries into partially linked objects. Corrected
names of LLVMCore and ARMCodeGen.

llvm-svn: 57943
2008-10-22 02:51:53 +00:00
Nuno Lopes
112ac04abd fix a tricky bug in the JIT global variable emitter, that was triggered when JITing a variable independently of a function. This lead to sharing memory memory between functions and GVs thus changing the value of a GV could change the code in execution. more details on the ML.
llvm-svn: 57900
2008-10-21 11:42:16 +00:00