Commit Graph

256 Commits

Author SHA1 Message Date
Reid Spencer
45430ac4f6 Remove a function prototype that is no longer needed (REM patch missed it)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 08:12:02 +00:00
Reid Spencer
0a783f783c For PR950:
Replace the REM instruction with UREM, SREM and FREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:53:59 +00:00
Reid Spencer
fa8a51e041 Remove unnecessary sign conversions made possible by last patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31339 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 03:45:43 +00:00
Reid Spencer
fe85526713 Fix a bug in the interpreter where divides of unmatched signed operands
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31338 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 03:41:05 +00:00
Reid Spencer
1628cec4d7 For PR950:
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 06:15:43 +00:00
Reid Spencer
b83eb6447b For PR950:
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Chris Lattner
fe85403467 initial changes to support JIT'ing from multiple module providers, implicitly
linking the program on the fly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 01:24:12 +00:00
Chris Lattner
426b782a92 Simplify TargetData ctor call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28832 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:24:38 +00:00
Chris Lattner
276f4b5235 Simplify interpreter construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28826 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:08:38 +00:00
Chris Lattner
26e6e109d5 Fix -pedantic warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28635 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:27:11 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 19:21:13 +00:00
Owen Anderson
a69571c799 Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 01:29:57 +00:00
Jeff Cohen
2f51914d82 Get JIT/Interpreter working on Windows again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 02:53:49 +00:00
Chris Lattner
726c1ef2bd remove the intrinsiclowering hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26970 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 05:22:51 +00:00
Chris Lattner
2fe4bb06c6 Eliminate the dependency of ExecutionEngine on the JIT/Interpreter libraries.
Now you can build a tool with just the JIT or just the interpreter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26946 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-22 06:07:50 +00:00
Jeff Cohen
8c9191c644 The interpreter assumes that the caller of runFunction() must be lli, and
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26031 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-07 05:29:44 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Andrew Lenharth
558bc88a00 core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:34:52 +00:00
Misha Brukman
3c94497ec7 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21440 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 04:08:30 +00:00
Misha Brukman
d1c881a8d4 * Remove trailing whitespace
* Convert tabs to spaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21421 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 22:43:08 +00:00
Chris Lattner
e4d5c441e0 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
4e7dd8f7c4 If the interpreter tries to execute an external function, kill it. Of course
since we are dirty, special case __main.  This should fix the infinite loop
horrible stuff that happens on linux-alpha when configuring llvm-gcc.  It
might also help cygwin, who knows??


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19729 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 19:59:37 +00:00
Chris Lattner
638559aaa3 Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19586 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 01:31:31 +00:00
Chris Lattner
9dacd128b4 Silence warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19392 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:13:44 +00:00
Chris Lattner
d564496b46 Silence VS warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19389 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:05:34 +00:00
Reid Spencer
df5a37efc9 Use System/DynamicLibrary instead of Support/DynamicLinker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18357 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 14:11:29 +00:00
Misha Brukman
895eddfad4 Implement ExecutionEngine::freeMachineCodeForFunction()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17601 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 23:58:46 +00:00
Reid Spencer
685f86ac0e Fix library name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17307 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 05:37:24 +00:00
Reid Spencer
abec8f96e3 Changes to support rand48 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17284 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:03:44 +00:00
Reid Spencer
cac731ecbe We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Reid Spencer
86d341b204 Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Chris Lattner
ec7c1ab1da Add support for unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:21:33 +00:00
Reid Spencer
d96cb6eaa0 Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Reid Spencer
9f41a5fe85 Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 20:43:57 +00:00
Reid Spencer
2da5c3dda6 Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 17:06:42 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Chris Lattner
ed6c073097 Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14848 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:51:32 +00:00
Chris Lattner
0a8e8e1a4e Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:51:31 +00:00
Reid Spencer
954da37bb4 Add #include <iostream> since Value.h does not #include it any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:19:56 +00:00
Chris Lattner
3048373748 Move the IntrinsicLowering header into the CodeGen directory, as per PR346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14266 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-20 07:49:54 +00:00
Chris Lattner
f70c22b019 Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 18:19:28 +00:00
Brian Gaeke
59108d3d40 Add int ferror(FILE *)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14194 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-16 02:56:40 +00:00
Chris Lattner
63e8dfa8a3 These #includes are long dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13856 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 21:24:38 +00:00
Reid Spencer
0098bdfb97 Get rid of a wart: useless getFILE function is now a cast macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13747 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:46:15 +00:00
Brian Gaeke
3c66c355b6 Generalize the strlen size_t hack, for the benefit of the other external
functions with wrappers that either take or return size_ts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13296 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-01 06:42:15 +00:00
Brian Gaeke
b440dea57b Go back to the interpreter main loop after performing intrinsic lowering,
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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13122 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-23 18:05:28 +00:00
Chris Lattner
759d34ffb7 Add support for the select instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-20 16:43:21 +00:00
Chris Lattner
702a8a070f Adjust to new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12646 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-04 19:47:06 +00:00
Chris Lattner
c6b0fb39cb Adjust to new gep_type_iterator prototypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12644 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-04 17:30:06 +00:00
Chris Lattner
317201d773 Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
Intrinsic::va*.  This avoid conflicting with macros in the stdlib.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-13 00:24:00 +00:00