Chris Lattner
762edbc074
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
5f936ef1ac
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
6e8d814d36
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
b2f9a73029
Delete trailing whitespace.
...
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Rafael Espindola
6de96a1b5d
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Duncan Sands
dc020f9c3c
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Misha Brukman
5cbf223916
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
906152a20f
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Evan Cheng
70b42590b0
Fix misplaced right parentheses.
...
llvm-svn: 61699
2009-01-05 17:17:04 +00:00
Dan Gohman
d32ec016cc
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
0b77319742
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
15e0481d39
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
75900bf5cd
DisableGVCompilation should not abort on internal GlobalValue's.
...
llvm-svn: 60750
2008-12-09 07:31:49 +00:00
Chris Lattner
ddd7581c73
Make JIT::runFunction handle functions with non-C calling conventions.
...
llvm-svn: 59904
2008-11-23 08:00:11 +00:00
Nicolas Geoffray
7aa444c031
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
bf9a055c98
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
e4df875dd6
Change binary dump format.
...
llvm-svn: 59119
2008-11-12 08:22:43 +00:00
Evan Cheng
b172c66af3
Comments and indentation.
...
llvm-svn: 59007
2008-11-10 23:26:16 +00:00
Evan Cheng
0d9db40994
Forgot these.
...
llvm-svn: 58952
2008-11-10 01:52:24 +00:00
Evan Cheng
686a725b45
Remove a InvalidateInstructionCache call with incorrect size.
...
llvm-svn: 58898
2008-11-08 08:15:39 +00:00
Evan Cheng
b31a717527
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
1b889b16da
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
776f5922fb
More debug output.
...
llvm-svn: 58894
2008-11-08 07:22:53 +00:00
Evan Cheng
077f686d4b
More debug output.
...
llvm-svn: 58868
2008-11-07 22:30:29 +00:00
Evan Cheng
00203155ad
Jump tables may be emitted by target.
...
llvm-svn: 58835
2008-11-07 09:02:17 +00:00
Evan Cheng
972fd1a1e0
Improve JIT debugging outputs format consistency.
...
llvm-svn: 58807
2008-11-06 17:46:04 +00:00
Evan Cheng
3aeeb3a47c
Need a \n.
...
llvm-svn: 58788
2008-11-06 01:18:29 +00:00
Evan Cheng
d1c5c7f499
Undo 58778 but makes the binary dump prettier.
...
llvm-svn: 58782
2008-11-05 23:44:08 +00:00
Evan Cheng
51b9b9f6e2
Remove debug output that's not really useful.
...
llvm-svn: 58778
2008-11-05 23:21:11 +00:00
Evan Cheng
132de1983f
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
33ba5e78d2
Debugging output tweak.
...
llvm-svn: 58737
2008-11-05 00:22:28 +00:00
Evan Cheng
9340be4641
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
09053e62a9
80 col violation.
...
llvm-svn: 58684
2008-11-04 06:10:31 +00:00
Evan Cheng
3a9aead4d4
Silence a compiler warning.
...
llvm-svn: 58598
2008-11-03 07:14:02 +00:00
Jim Grosbach
2589604d85
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
4421a114bb
Let target resolve some relocation results.
...
llvm-svn: 58407
2008-10-29 23:54:46 +00:00
Jim Grosbach
ff2b4948ce
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
5457ce9ac3
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
f3c03b02dc
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
94844e2054
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
Nuno Lopes
a67f06b9c7
little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()
...
llvm-svn: 57484
2008-10-14 10:04:52 +00:00
Mon P Wang
297364cd3b
Revert r57340 move guard mutex in getPointerToFunction as this can cause
...
deadlock issues with java
llvm-svn: 57356
2008-10-10 18:07:10 +00:00
Mon P Wang
6e5eccf86b
Moved guard mutex upwards to guard materializing a function
...
in getPointerToFunction
llvm-svn: 57340
2008-10-10 01:47:42 +00:00
Dale Johannesen
4f0bd68cfe
Add a "loses information" return value to APFloat::convert
...
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Dale Johannesen
54306fe499
Rename APFloat::convertToAPInt to bitcastToAPInt to
...
make it clearer what the function does. No functional
change.
llvm-svn: 57325
2008-10-09 18:53:47 +00:00
Duncan Sands
26ff6f9c54
Add <cstdio> include where needed by gcc-4.4.
...
Patch by Samuel Tardieu.
llvm-svn: 57291
2008-10-08 07:23:46 +00:00
Daniel Dunbar
a8c424bf61
Unbreak build.
...
llvm-svn: 57017
2008-10-03 17:11:57 +00:00
Jim Grosbach
b22ef71d46
On Darwin ARM, memory needs special handling to do JIT. This patch expands
...
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..
llvm-svn: 57013
2008-10-03 16:17:20 +00:00
Dan Gohman
0d1e9a8e04
Switch the MachineOperand accessors back to the short names like
...
isReg, etc., from isRegister, etc.
llvm-svn: 57006
2008-10-03 15:45:36 +00:00
Nicolas Geoffray
74056ae3d5
Acquire the lock only when necessary. More precisely, do not acquire
...
the lock when calling a method which may materialize the llvm::Function.
llvm-svn: 56995
2008-10-03 07:27:08 +00:00