summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use the new maskToBitWidth function to ensure that the results ofReid Spencer2007-01-181-10/+15
| | | | | | computations do not overflow the intended bit width. llvm-svn: 33326
* Make shl instruction mask its result to the correct bitsize. This isReid Spencer2007-01-181-5/+10
| | | | | | | sufficient to get llvm-test/SingleSource/UnitTests/Integer/general-test.ll working with lli in interpreter mode. llvm-svn: 33321
* Two changes:Reid Spencer2007-01-181-18/+17
| | | | | | | | | 1. Fix logic for executeGEP. Only 32-bit and 64-bit integer types are acceptable as indices. 2. Ensure that all integer cast operations truncate their result to the integer size of the operand. llvm-svn: 33318
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-6/+6
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* eliminate calls to Type::isInteger, preferring isIntegral instead.Chris Lattner2007-01-151-4/+4
| | | | llvm-svn: 33222
* For PR1064:Reid Spencer2007-01-121-379/+686
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-26/+26
| | | | llvm-svn: 33076
* For PR950:Reid Spencer2006-12-311-319/+207
| | | | | | Convert signed integer types to signless ones. llvm-svn: 32787
* For PR950:Reid Spencer2006-12-231-112/+329
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* elimiante Statistic static ctorsChris Lattner2006-12-191-5/+2
| | | | llvm-svn: 32702
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-29/+28
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-1/+1
| | | | | | is 'unsigned'. llvm-svn: 32279
* Unbreak VC++ build.Jeff Cohen2006-12-021-0/+1
| | | | llvm-svn: 32113
* Removed #include <iostream> and replaced streams with llvm streams.Bill Wendling2006-11-271-29/+29
| | | | llvm-svn: 31949
* For PR950:Reid Spencer2006-11-271-34/+179
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Remove redundant <cmath>.Jim Laskey2006-11-081-1/+0
| | | | llvm-svn: 31561
* For PR950:Reid Spencer2006-11-081-19/+50
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* Remove a function prototype that is no longer needed (REM patch missed it)Reid Spencer2006-11-021-2/+0
| | | | llvm-svn: 31374
* For PR950:Reid Spencer2006-11-021-12/+50
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* Remove unnecessary sign conversions made possible by last patch.Reid Spencer2006-11-011-4/+0
| | | | llvm-svn: 31339
* Fix a bug in the interpreter where divides of unmatched signed operandsReid Spencer2006-11-011-8/+11
| | | | | | | would fail. E.g. udiv sint X, Y or sdiv uint X, Y would fail to find a type match in the switch statement and fail the operation. llvm-svn: 31338
* For PR950:Reid Spencer2006-10-261-11/+51
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
* For PR950:Reid Spencer2006-10-201-2/+2
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* The interpreter assumes that the caller of runFunction() must be lli, andJeff Cohen2006-02-071-3/+3
| | | | | | | | therefore the function being called must be a main() returning an int. The consequences when these assumptions are false are not good, so don't assume them. llvm-svn: 26031
* core changes for varargsAndrew Lenharth2005-06-181-12/+3
| | | | llvm-svn: 22254
* * Remove trailing whitespaceMisha Brukman2005-04-211-96/+96
| | | | | | * Convert tabs to spaces llvm-svn: 21421
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-3/+3
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Silence VS warningsChris Lattner2005-01-081-4/+4
| | | | llvm-svn: 19389
* Add support for unreachableChris Lattner2004-10-161-0/+5
| | | | llvm-svn: 17056
* Convert code to compile with vc7.1.Reid Spencer2004-09-151-2/+3
| | | | | | Patch contributed by Paolo Invernizzi. Thanks Paolo! llvm-svn: 16368
* Changes For Bug 352Reid Spencer2004-09-011-2/+2
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Fixes for PR341Chris Lattner2004-07-151-2/+2
| | | | llvm-svn: 14848
* Fixes for PR341Chris Lattner2004-07-151-2/+2
| | | | llvm-svn: 14847
* Move the IntrinsicLowering header into the CodeGen directory, as per PR346Chris Lattner2004-06-201-1/+1
| | | | llvm-svn: 14266
* Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner2004-06-171-20/+20
| | | | llvm-svn: 14201
* Go back to the interpreter main loop after performing intrinsic lowering,Brian Gaeke2004-04-231-0/+1
| | | | | | | | because 1) the first instruction might not be a call site, and 2) CS and SF.Caller were not getting set to point to the new call site anyway (resulting in a crash on e.g. call %llvm.memset). llvm-svn: 13122
* Add support for the select instructionChris Lattner2004-04-201-2/+22
| | | | llvm-svn: 13076
* Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* toChris Lattner2004-03-131-3/+3
| | | | | | Intrinsic::va*. This avoid conflicting with macros in the stdlib.h file. llvm-svn: 12356
* Represent va_list in interpreter as a (ec-stack-depth . var-arg-index)Brian Gaeke2004-02-251-11/+14
| | | | | | | | | pair, and look up varargs in the execution stack every time, instead of just pushing iterators (which can be invalidated during callFunction()) around. (union GenericValue now has a "pair of uints" member, to support this mechanism.) Fixes Bug 234. llvm-svn: 11845
* The Interpreter was failing the AtExit UnitTest. This fixes it.Brian Gaeke2004-02-131-0/+4
| | | | llvm-svn: 11367
* rename the "exceptional" destination of an invoke instruction to the ↵Chris Lattner2004-02-081-2/+1
| | | | | | 'unwind' dest llvm-svn: 11202
* Don't pass anything to the IntrinsicLowering class that is not_intrinsic,Brian Gaeke2004-01-141-1/+4
| | | | | | | | | because that makes it abort. Also, fix a typo in a comment. This checkin brought to you by the "It only takes about 30 seconds to run ENABLE_LLI tests on Shootout on zion, even if they all dump core" fund. llvm-svn: 10844
* Clean up a lot of the code I added yesterday by exposing the IntrinsicLoweringChris Lattner2003-12-281-1/+0
| | | | | | implementation from the TargetMachine directly. llvm-svn: 10636
* Pass around IntrinsicLowering instances as appropriate.Chris Lattner2003-12-281-5/+36
| | | | | | Reimplement the Interpreters implementation of va_* to be more direct. llvm-svn: 10627
* Since we are using a gep_type_iterator, we apparently must get the typeBrian Gaeke2003-12-121-2/+1
| | | | | | | index by using I.getOperand() here. This was failing an assertion on basically every struct access. llvm-svn: 10426
* Add support for --debug-only=interpreter, to print out instrs beforeBrian Gaeke2003-12-111-40/+144
| | | | | | | | | | | | | | | | | | interpreting them. Move support for getting the value of a ConstantExpr into getConstantExprValue(), and add support for the rest of the different kinds of ConstantExprs. (I don't think I like ConstantExprs!) This requires separate procedures executeShlInst() and executeShrInst(). Reduce the number of references to TheEE. Get rid of an old comment mentioning annotations. Fix exitCalled(), which was crashing the Interpreter. This was a leftover from the return-value code refactoring. llvm-svn: 10389
* Do not depend on structure elements being of type UByteTyChris Lattner2003-11-251-20/+28
| | | | llvm-svn: 10224
* Change LLI's internal representation of va_list to a pointer to the nextBrian Gaeke2003-11-131-10/+10
| | | | | | | | argument to be returned by va_arg. This allows va_lists to be passed between different LLVM procedures (though it is unlikely that an LLI va_list would make sense to an external function, except by chance.) llvm-svn: 9965
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-1/+5
| | | | llvm-svn: 9903
* Implement vaarg instruction. This is not quite perfect: 2003-08-11-VaListArgBrian Gaeke2003-11-071-0/+35
| | | | | | still causes a crash. But it's better than before. llvm-svn: 9794
OpenPOWER on IntegriCloud