summaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
* Implement x86 long double in jit (not reallyDale Johannesen2007-09-172-4/+93
| | | | | | | | complete, but common cases work) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42043 91177308-0d34-0410-b5e6-96231b3b80d8
* Next round of APFloat changes.Dale Johannesen2007-09-062-4/+6
| | | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
* rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()Chris Lattner2007-08-231-2/+3
| | | | | | | | Add an APSInt::toString() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
* move assertion into mutex guard, a partial fix for PR1606.Chris Lattner2007-08-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41050 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment typo noticed by Sandro Magi.Reid Spencer2007-08-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41018 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate redundant conditions from the signless types conversion.Chris Lattner2007-08-081-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40927 91177308-0d34-0410-b5e6-96231b3b80d8
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-1/+1
| | | | | | | | | indexing an empty std::vector. Updates to all clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment: don't expect from external function resolver in interpreterAnton Korobeynikov2007-07-301-0/+5
| | | | | | | things, it wasn't designed to handle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40608 91177308-0d34-0410-b5e6-96231b3b80d8
* Add detection of __dso_handle presence during configure. Use this ↵Anton Korobeynikov2007-07-301-15/+20
| | | | | | | | | | information in the JITer (short path is added for darwin). This is needed to properly JIT llvm-gcc-4.2-built binaries, since cxa_atexit is enabled by default on much more targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40600 91177308-0d34-0410-b5e6-96231b3b80d8
* More explicit keywords.Dan Gohman2007-07-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40589 91177308-0d34-0410-b5e6-96231b3b80d8
* VStudio compiler errors and placing Function*->ExFunc map under ↵Chuck Rose III2007-07-271-4/+5
| | | | | | | | | | | | | ManagedStatic control. This commit fixes two things. One is a pair of VStudio compiler errors stemming from variables which defined within the for loop statement and also within the body of the for loop. I fixed these by renaming one of the two variables. Additionally, I've made the Function*->ExFunc map in ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown. In repeated uses of the interpreter, where the same Function* address may get used for completely differnet functions, this was causing a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40558 91177308-0d34-0410-b5e6-96231b3b80d8
* Hush a noisy warning from GCC 4.2 about overflow during conversion by usingReid Spencer2007-07-191-2/+2
| | | | | | | the type "unsigned" instead of uintptr_t for a 1-bit structure field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40066 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typosGabor Greif2007-07-091-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38453 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-052-5/+5
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* (For Chris): Fix failure where we rejected compiling stubs when lazy ↵Evan Cheng2007-06-301-18/+25
| | | | | | compilation is disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37825 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments to fallsthrough cases. Also, this fixes PR1492Anton Korobeynikov2007-06-031-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37405 91177308-0d34-0410-b5e6-96231b3b80d8
* Check arguments & return types of main(). Abort in case of no match.Anton Korobeynikov2007-06-031-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37404 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1486:Reid Spencer2007-06-012-2/+2
| | | | | | | | Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth to be set to 0 (illegal) producing a subsequent assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37391 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute the correct word number.Zhou Sheng2007-05-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37322 91177308-0d34-0410-b5e6-96231b3b80d8
* On Linux platforms and at optimization levels -O1 and above, llvm-gcc canReid Spencer2007-05-191-3/+14
| | | | | | | | turn "putchar" calls into _IO_putc calls which is a lower-level interface. This patch allows these calls to be executed by lli in interpreter mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37254 91177308-0d34-0410-b5e6-96231b3b80d8
* Print integer values as both decimal and hexadecimal for convenienceReid Spencer2007-05-171-1/+1
| | | | | | | of verifying result values when debugging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37156 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid a "loss of precision" error in gcc 4.1.3.Reid Spencer2007-05-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37105 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement printing of instruction result values when debug info is turnedReid Spencer2007-05-161-0/+21
| | | | | | | | on. This helps to speed up the debugging time by showing computational results as the program executes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37095 91177308-0d34-0410-b5e6-96231b3b80d8
* Bitcast all the bits of a floating point value, not just one. The zeroReid Spencer2007-05-041-0/+2
| | | | | | | | | extension is needed because the constructor for the Destination value causes the APInt to have a bit width of 1. Patch by Guoling Han. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36733 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Don't swap byte order in scanf. It isn't necessary and leads toReid Spencer2007-04-261-1/+1
| | | | | | | | | incorrect results (canonicalization was dropped several commits ago). 2. Add support for fscanf. 3. Suppress a warning about cast to pointer from non-pointer-sized integer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36482 91177308-0d34-0410-b5e6-96231b3b80d8
* We only need one putchar which gives it a shot at getting matched by itsReid Spencer2007-04-211-17/+4
| | | | | | | users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36305 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid mutating a global in an accessorChris Lattner2007-04-201-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36289 91177308-0d34-0410-b5e6-96231b3b80d8
* fit in 80 colsChris Lattner2007-04-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36288 91177308-0d34-0410-b5e6-96231b3b80d8
* rename JIT::state -> JIT::jitstate to avoid shadowing ExecutionEngine::stateChris Lattner2007-04-202-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36286 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate use of Instruction::getPrev(). Patch by Gabor Greif in 2005.Chris Lattner2007-04-171-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36198 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement @sext and @zext parameter attribute handling properly instead ofReid Spencer2007-04-161-11/+20
| | | | | | | | forcing every small argument of every function regardless of attributes or calling convention to be expanded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36174 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1293:Reid Spencer2007-03-301-49/+67
| | | | | | | | | | | * Rename the FunctionType* parameter from M to FT on all the functions. * Implement a fix for PR1293 by just asserting that library functions that must return pointers should have pointer typed results. This just makes sure that we don't attempt to use an uninitialized integer or something later on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35508 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak C++ build.Jeff Cohen2007-03-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35067 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use std::hex.Bill Wendling2007-03-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35038 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use a cast. It causes an error on some platforms.Bill Wendling2007-03-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35037 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix all of last night's JIT failures in Prolangs-C++ by finishing theReid Spencer2007-03-061-42/+151
| | | | | | | implementation of getConstantValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34988 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PR1240Anton Korobeynikov2007-03-061-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34959 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Make StoreValueToMemory a little more efficient by not requiring callerReid Spencer2007-03-061-2/+2
| | | | | | | | | to make a copy of the GenericValue. 2. Fix a copy & paste bug in StoreValueToMemory where 64-bit values were truncated to 32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34958 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some thinko's in the last patch. PtrSize has to be in bits and weReid Spencer2007-03-061-2/+2
| | | | | | | might need to zext not just trunc the value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34955 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in IntToPtr. Truncating to 64-bits only works if the integerReid Spencer2007-03-061-1/+5
| | | | | | | is larger. Adjust so that it truncates to pointer width, only if necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34954 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code as a result of the change in GenericValue to have a singleReid Spencer2007-03-061-28/+15
| | | | | | | integer field of type APInt instead of different sized integer fields. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34952 91177308-0d34-0410-b5e6-96231b3b80d8
* Radically simplify execution. This patch gets rid of all the specialReid Spencer2007-03-061-636/+128
| | | | | | | | | handling for integer of various sizes. GenericValue now has just a single integer field of type APInt. We use its facilities directly in the execution of all instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34951 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust and simplify external function processing now that GenericValue hasReid Spencer2007-03-061-33/+41
| | | | | | | a single integer field of type APInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34950 91177308-0d34-0410-b5e6-96231b3b80d8
* APInt's are no longer allocated on the heap because they are directReid Spencer2007-03-061-12/+0
| | | | | | | | members of GenericValue. Consequently the code to clean them up isn't needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34948 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the insufficient code in Interpreter::create that computed theReid Spencer2007-03-061-12/+0
| | | | | | | | | Target DataLayout incorrectly. For now, we'll trust that the module has got the correct DataLayout. In the future, this needs to be changed to tell the TargetData to be "current host". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34947 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify things significantly because GenericValue now has a single integerReid Spencer2007-03-061-281/+72
| | | | | | | | | | field, of type APInt, instead of multiple integer fields. Also, get rid of the special endianness code in StoreValueToMemory and LoadValueToMemory. ExecutionEngine is always used to execute on the host platform so this is now unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34946 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary #include.Reid Spencer2007-03-031-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34889 91177308-0d34-0410-b5e6-96231b3b80d8
* Deal with error handling better.Reid Spencer2007-03-035-14/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34887 91177308-0d34-0410-b5e6-96231b3b80d8
* Complete the APIntification of the interpreter. All asserts for > 64 bitsReid Spencer2007-03-031-118/+209
| | | | | | | | have been removed and dealt with. The interpreter should now be able to execute any LLVM program using any bit width. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34884 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid memory leakage by having caller construct the APInt for theReid Spencer2007-03-031-5/+4
| | | | | | | destination value of LoadValueFromMemory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34883 91177308-0d34-0410-b5e6-96231b3b80d8