Commit Graph

355 Commits

Author SHA1 Message Date
Chris Lattner ad48131254 Reorder #includes to follow LLVM conventions
llvm-svn: 8375
2003-09-05 20:08:15 +00:00
Brian Gaeke f3a300d578 ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
Build ExecutionEngine as library.

llvm-svn: 8370
2003-09-05 19:39:22 +00:00
Brian Gaeke 9b518bc0be Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.

llvm-svn: 8367
2003-09-05 18:55:03 +00:00
Brian Gaeke a7669038fc Make CreateArgv part of lli rather than part of ExecutionEngine.
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
 GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
 into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
 isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
 more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".

llvm-svn: 8366
2003-09-05 18:42:01 +00:00
Brian Gaeke 33d98aebe7 Remove printOperandInfo(), and simplify run().
llvm-svn: 8362
2003-09-05 05:22:08 +00:00
Brian Gaeke ed9917b3f8 Remove support for printing values from a module by name, only used
w/ interactive keyboard entry of names.
With that, Support.cpp is history.

llvm-svn: 8360
2003-09-05 05:04:32 +00:00
Brian Gaeke 8421765778 Remove support for interactive (step finish next) instructions.
Remove printCurrentInstruction, printStackFrame and infoValue
 (only used interactively) and other unused methods of Interpreter.
Fold UserInput.cpp containing only callMainFunction() into Interpreter.cpp.
Remove unused Profile flag.

llvm-svn: 8359
2003-09-05 04:46:26 +00:00
Brian Gaeke 411281cc82 Remove support for breakpoints (not used).
Remove some dead code and whitespace.

llvm-svn: 8346
2003-09-04 23:15:40 +00:00
Brian Gaeke 92f8b30d24 Move EE dtor where it belongs
llvm-svn: 8345
2003-09-04 22:57:27 +00:00
Brian Gaeke e80e5ba7f8 Interpreter cleanups:
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
 which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().

llvm-svn: 8344
2003-09-04 22:21:24 +00:00
Brian Gaeke 4bd3bd5b5a ExecutionEngine.cpp: Move execution engine creation stuff into a new
static method here.
 Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.

Make creation method for each type of EE into a static method of its
own subclass.

Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
 Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.

llvm-svn: 8343
2003-09-03 20:34:19 +00:00
Chris Lattner e722930efd Preselection is now integrated into the Sparc target library
llvm-svn: 8305
2003-09-01 20:30:17 +00:00
Chris Lattner c7f87d30ab Sparc peephole optimizer moved out of post-opts library into Sparc target library
llvm-svn: 8302
2003-09-01 20:26:14 +00:00
Chris Lattner 69cab0dd52 Consult the target data, not the module, about how large the current pointer
size is.  This ensures that if the module has no specified pointer size that
things will work correctly.

llvm-svn: 8136
2003-08-24 19:55:26 +00:00
Chris Lattner 4d4f424f0c Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags

llvm-svn: 8134
2003-08-24 19:50:53 +00:00
Chris Lattner 479854091a Add preliminary support for "any" pointersize/endianness. This will need
to change soon though.

llvm-svn: 8123
2003-08-24 14:02:47 +00:00
Chris Lattner abca19d2b3 Minor cleanups: wrap at 80 lines. Convert file comment to doxygen format and
llvm style

llvm-svn: 8024
2003-08-21 21:32:12 +00:00
John Criswell 71c3e6236f The JIT now passes the environment pointer to the main() function when it
starts a program.  This allows the GNU env program to compile and JIT under
LLVM.

llvm-svn: 8022
2003-08-21 21:12:30 +00:00
Chris Lattner 8e69339879 no really, implement it!
llvm-svn: 7955
2003-08-18 17:33:15 +00:00
Chris Lattner 0627a96e7e Add support for casting any pointer to any integer type
llvm-svn: 7953
2003-08-18 17:23:40 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner 6ae402fd2c rename selection library to selectiondag
llvm-svn: 7878
2003-08-15 04:56:09 +00:00
Chris Lattner f26be8427d Implement a _REAL_ memory manager for the code generated by the JIT. This
speeds up program execution by 15% pretty consistently for large programs

llvm-svn: 7845
2003-08-14 18:35:27 +00:00
Brian Gaeke aa58664639 Deconstify parameter to getPointerToFunction().
llvm-svn: 7822
2003-08-13 18:17:54 +00:00
Brian Gaeke 2b804a2797 Deconstify parameter to getPointerToFunction().
Use a FunctionPassManager instead of a PassManager.

llvm-svn: 7820
2003-08-13 18:16:50 +00:00
Brian Gaeke 5896956ff0 Deconstify parameter to getPointerToFunction().
Run passes on single function (hey, just-in-time compilation!)
 instead of the entire module that contains it.

llvm-svn: 7819
2003-08-13 18:16:34 +00:00
Brian Gaeke 1678e859b0 In ExecutionEngine::getPointerToGlobal(), throw away const qualifier
on Function * when passing it to getPointerToFunction().

llvm-svn: 7818
2003-08-13 18:16:14 +00:00
Chris Lattner 32fdf188e7 Incorporate mapping library into the sparc library
llvm-svn: 7800
2003-08-13 02:28:20 +00:00
Chris Lattner f458b7dd3b Include the new selection library for the X86 target
llvm-svn: 7720
2003-08-11 14:59:53 +00:00
Chris Lattner ee937c80ed Specify DEBUG_TYPE's for the JIT debug messages
llvm-svn: 7604
2003-08-05 17:00:32 +00:00
Chris Lattner f0c6964470 DEBUG got moved to Debug.h
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Misha Brukman e47f069855 * Stop hard-coding a value for beginning of emitted code on Sparc since we can
now handle far calls (i.e., beyond the 30-bit limit in call instructions).
* As a side-effect, this allows us to unify and clean up the mmap() call and
  code around it.

llvm-svn: 7381
2003-07-29 16:57:16 +00:00
Misha Brukman c0ae1cd93e Add rationale for the MAP_ANONYMOUS vs. MAP_ANON flags.
llvm-svn: 7368
2003-07-28 19:26:19 +00:00
Misha Brukman 057f460053 Add ability for external C code to get pointers to functions given their name.
This us used by bugpoint -- when code is compiled to a shared object to be
JITted, it must use the JIT's lazy resolution method to find function addresses,
because some functions will not be available at .so load time, as they are in
the bytecode file.

llvm-svn: 7363
2003-07-28 19:09:06 +00:00
Misha Brukman ee79899ce5 Clean up code dealing with RTLD_SELF differences on Sparc and X86.
llvm-svn: 7362
2003-07-28 19:07:30 +00:00
Misha Brukman d9a9276fe3 Fix reference to architecture.
llvm-svn: 7361
2003-07-28 19:06:50 +00:00
Misha Brukman c69f4a575c Add in support to load shared objects (-load is provided by Support library).
llvm-svn: 7360
2003-07-28 19:06:19 +00:00
Chris Lattner 1442020798 Fix space
llvm-svn: 7273
2003-07-23 20:21:06 +00:00
Chris Lattner 625eef3e41 Remove redundant const qualifier
llvm-svn: 7254
2003-07-23 15:30:32 +00:00
Misha Brukman 1f6feb7bf4 Cleaned up the code which chooses the appropriate value for the file descriptor
to pass to dlsym() -- Linux/x86 wants 0 while Sparc/Solaris wants RTLD_SELF,
which is not zero. Thanks to Chris for the suggestion.

llvm-svn: 7204
2003-07-18 18:33:38 +00:00
Misha Brukman 528a37621b Clean up my last checkin: code is easier to read and explains the differences in
usage of the special file handle RTLD_SELF on Sparc/Solaris vs. 0 on Linux/x86.

llvm-svn: 7177
2003-07-15 15:58:26 +00:00
Misha Brukman 7225461edf On Sparc/Solaris, the special handle RTLD_SELF is used as a handle referring to
the program's executing image, not 0 as it is on Linux/x86 and possibly other
systems.

llvm-svn: 7176
2003-07-15 15:55:32 +00:00
Misha Brukman 7dee443c1c * If compiling on X86 or Sparc, automagically enable the JIT for that arch
* Setting ENABLE_X86_JIT or ENABLE_SPARC_JIT on the `make' command-line will
  force the inclusion of that JIT on a different architecture
* If neither JIT is enabled (e.g., compiling on a different architecture), the
  -march option will not be available to LLI.
* As a side effect of the $ARCH variable, the Sparc LLI can now link just a bit
  faster by not including the x86 library.

llvm-svn: 7070
2003-07-02 17:53:19 +00:00
John Criswell 3ef61afb76 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Brian Gaeke eba22eb59d Get rid of the duplicate '0x' in debug mode.
llvm-svn: 7012
2003-06-30 18:06:20 +00:00
Brian Gaeke fcd72643fa Include <cmath> instead of <math.h>
Remove isnan; it's too unportable to handle cleanly at this point.

llvm-svn: 6866
2003-06-23 19:41:55 +00:00
Brian Gaeke a7cf81bc75 Add #ifdef hack for MAP_ANONYMOUS being spelled MAP_ANON on some platforms.
(We're already talking about autoconf'ing this, so I'm assuming this hack
will be short-lived...I just don't want it to get lost in my working files.)

llvm-svn: 6761
2003-06-17 23:14:06 +00:00
Brian Gaeke e38c7d9f2d Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms where
it is needed.

llvm-svn: 6753
2003-06-17 20:09:18 +00:00
Brian Gaeke 44a4adfad2 Use std::isnan instead of isnan. Brought back to you from the
future, by the reconciliation of the C++ and C99 standards. Someday.

llvm-svn: 6751
2003-06-17 19:59:17 +00:00
Chris Lattner dcd6bcb71d Life is too short. Link in too much stuff on Linux to make building on sun easier
llvm-svn: 6748
2003-06-17 19:14:59 +00:00
Chris Lattner eba0e9930d The never-ending odyssey trying to get sparc to link
llvm-svn: 6747
2003-06-17 18:19:52 +00:00
Chris Lattner f9f0005af7 Make sure to get the value of ARCH before we use it
llvm-svn: 6746
2003-06-17 17:53:35 +00:00
Chris Lattner d9cc372613 Do not link in the Sparc JIT when building on X86. Eventually the sparc will not
link in the X86 JIT either, but this makes testing easier.

For some reason, the sparc JIT was breaking the X86 JIT when it was linked in. :(

llvm-svn: 6745
2003-06-17 15:54:52 +00:00
Chris Lattner cf48150098 Apparently "sparc" is a macro on sparcs. Ugh. :)
llvm-svn: 6744
2003-06-17 15:54:02 +00:00
Chris Lattner 66e018bb80 Whoops, didn't mean to check that in :(
llvm-svn: 6743
2003-06-17 15:46:34 +00:00
Chris Lattner d9e6bfae0e Use more structured command line option processing
llvm-svn: 6742
2003-06-17 15:43:13 +00:00
Chris Lattner a5741aca3a #ifdef out code that only applies when the HOSTARCH = sparc
llvm-svn: 6741
2003-06-17 15:32:38 +00:00
Chris Lattner 569358416f Add #include for older GCC's
llvm-svn: 6670
2003-06-08 06:43:57 +00:00
Misha Brukman 0ccdecbdaa ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT :::
The JIT is designed to code-generate a function at-a-time. That means that any
pass can only make local changes to its function. Period.

Because the Sparc PreSelection pass claims to be a BasicBlock pass while adding
globals to the Module, it cannot be run with the other passes, because by this
time, the globals have been output already by the JIT, and the addresses of any
globals appearing AFTER this point are not recognized.

However, the PreSelection pass is a requirement for correctness in the Sparc
codegen path, so it MUST be run.

::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT ::: HACK ALERT :::

llvm-svn: 6650
2003-06-06 06:59:55 +00:00
Misha Brukman a2b55253c6 Output function address as hex.
llvm-svn: 6649
2003-06-06 06:52:35 +00:00
Misha Brukman 6940c8644e Removed debug print statement.
llvm-svn: 6641
2003-06-06 00:00:54 +00:00
Misha Brukman 1d443d1250 * Institute a hack for the Sparc call to mmap() to get our generated code to be
laid out closer to the VM so that calls to library functions (e.g. puts()) and
  callback (e.g.  JITResolver::CompilationCallback) fit into 30 bits of the call
  instruction.
* Abort if architecture is not yet supported (not X86 or Sparc) because it
  likely requires a different set of parameters to mmap() .
* Stop using hard-coded values for page size; use sysconf(_SC_PAGESIZE) instead.

llvm-svn: 6610
2003-06-04 19:45:25 +00:00
Misha Brukman 905496e94f Sparc's dlsym() requires the special operand RTLD_SELF to find a symbol in the
currently-running process.

llvm-svn: 6592
2003-06-04 01:57:22 +00:00
Misha Brukman 6ac7fe7dc0 * Removed SparcEmitter.cpp; rolled into lib/Target/Sparc/SparcV9CodeEmitter.cpp
* No more createX86Emitter() vs. createSparcEmitter() -- there can be only one
* As a result, the memory management semantics must be handled according to
  platform -- the parameters to mmap() are particularly sensitive to the host
  architecture.

llvm-svn: 6527
2003-06-02 03:23:16 +00:00
Brian Gaeke 78e8ade959 The flag modifications weren't picking up the old values of the
flags before. Save them in a temporary variable, then restore them from the
temporary after creating the new constant.

llvm-svn: 6520
2003-06-02 02:10:31 +00:00
Chris Lattner cd0a9fa5b4 Remove obsolete code
llvm-svn: 6518
2003-06-02 00:09:00 +00:00
Chris Lattner 6b689e3ad4 Move target specific code to target files. The new MachineCodeEmitter
class is actually target independent!

llvm-svn: 6517
2003-06-01 23:24:36 +00:00
Brian Gaeke 101ed907f4 Fix induction variable name clash in for loops, in finishFunction().
Modify new MachineOperand so that its flags match the old MachineOperand's
 flags, for the flags that matter.

llvm-svn: 6513
2003-06-01 22:08:29 +00:00
Misha Brukman d2b29c8a9e Fixed rewriting of branches -- they now work forward and backward.
llvm-svn: 6463
2003-05-31 06:26:48 +00:00
Misha Brukman d137d6ba65 Since malloc is no longer used, no need to free() memory.
Fixed BasicBlock patching by supplying correct type for the displacement.

llvm-svn: 6453
2003-05-30 20:39:37 +00:00
Brian Gaeke a0967e52e9 Fix call to mmap, so that it can be used on sparc.
llvm-svn: 6424
2003-05-30 03:37:13 +00:00
Misha Brukman 7297199aeb mmap() seems to be failing on Sparc, so just use malloc()/free() .
llvm-svn: 6387
2003-05-28 18:44:38 +00:00
Misha Brukman 80f0eb3a82 Link in Sparc libs for the JIT, even on X86 to be able to support debugging
of Sparc JIT (printing out instrs) on X86. Con: this increases linking time.

llvm-svn: 6361
2003-05-27 21:42:05 +00:00
Misha Brukman 56d27325c0 Allow for specification of which JIT to run on the commandline.
`lli -march=x86' or `lli -march=sparc' will forcefully select the JIT even on a
different platform. Running lli without the -march option will select the JIT
for the platform that it's currently running on.

Pro: can test Sparc JIT (debug printing mode) on X86 -- faster to compile/link
LLVM source base to test changes.
Con: Linking lli on x86 now pulls in all the Sparc libs -> longer link time
(but X86 can bear it, right?)

In the future, perhaps this should be a ./configure option to enable/disable
target JITting...

llvm-svn: 6360
2003-05-27 21:40:39 +00:00
Chris Lattner 3b3276be20 Fix typeos
llvm-svn: 6204
2003-05-14 17:53:49 +00:00
Chris Lattner 68cbcc3e66 Add support for more constant expressions
llvm-svn: 6203
2003-05-14 17:51:49 +00:00
Chris Lattner 4a5bb95729 Add support for atexit function, remove support for __main function
llvm-svn: 6194
2003-05-14 14:21:30 +00:00
Chris Lattner 2537ca318a Add support for atexit handlers to the JIT, fixing 2003-05-14-AtExit.c
llvm-svn: 6193
2003-05-14 13:53:40 +00:00
Chris Lattner c67e340327 Fix compilation problems with previous checking *blush*
llvm-svn: 6191
2003-05-14 13:27:36 +00:00
Chris Lattner 5a9ea75e6b Add a framework for intercepting system calls
llvm-svn: 6190
2003-05-14 13:26:47 +00:00
Chris Lattner 09e2b44f84 Clean up cast
llvm-svn: 6174
2003-05-13 20:29:17 +00:00
Chris Lattner b78244f9e1 Make sure that globals are emitted AFTER the passmanager is set up for the JIT,
because the globals may refer to functions that need to be compiled!

llvm-svn: 6105
2003-05-12 02:14:34 +00:00
Chris Lattner 185045c494 switch main LLI core execution to use an InstVisitor instead of a switch statement
llvm-svn: 6081
2003-05-10 21:22:39 +00:00
Chris Lattner bd6771cb25 Fix testcase: SingleSource/UnitTests/2003-05-02-DependantPHI.c
llvm-svn: 6074
2003-05-10 20:21:16 +00:00
Chris Lattner fdbd98b67f Add support for function stubs, which allow calling functions which need to
have an address available, but have not yet been code generated.

llvm-svn: 6059
2003-05-09 03:30:07 +00:00
Chris Lattner 037f1e58bd Minor speedup by avoiding callbacks to functions already generated
llvm-svn: 6052
2003-05-08 21:44:21 +00:00
Chris Lattner d340dbdb5d Improve efficiency of JIT by having it use direct function calls instead of
signals to regain control from the executing code

llvm-svn: 6051
2003-05-08 21:34:11 +00:00
Chris Lattner 974e1d8ec2 assert early instead of late for unimplemented feature
llvm-svn: 6050
2003-05-08 21:08:43 +00:00
Chris Lattner 525e251c4e Implement varargs support for LLI!
llvm-svn: 6043
2003-05-08 16:52:43 +00:00
Chris Lattner 7f389e8cf9 Add a pointersize/endianness safe load routine to match the store routine
llvm-svn: 6042
2003-05-08 16:52:16 +00:00
Chris Lattner 470754e3ca A large number of simple changes:
* s/Method/Function
  * Kill some obsolete (external) functions that used to be to support tracing

llvm-svn: 6041
2003-05-08 16:18:31 +00:00
Chris Lattner 22e90434f3 Add support for recording arguments passed through the ... of a varargs function
llvm-svn: 6040
2003-05-08 16:06:52 +00:00
Chris Lattner 0f38d5dc4d Fix bug: Jello/2003-05-07-ArgumentTest.llx
Also fixes yacr2/ks benchmarks

llvm-svn: 6017
2003-05-07 20:31:37 +00:00
Chris Lattner 4f6cdbdf81 Remove two fields from TargetData which are target specific.
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner 01971e1267 Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
llvm-svn: 5942
2003-04-25 18:28:44 +00:00
Chris Lattner 4c5245b144 Add __strdup
llvm-svn: 5941
2003-04-25 18:23:38 +00:00
Chris Lattner 6fac66e2cc MAke sure that LLI properly configures align_of(double)
llvm-svn: 5938
2003-04-25 06:15:05 +00:00
Chris Lattner ba90675054 Fix problem where we would read 64 bits worth of pointer information, even on 32 bit targets!
llvm-svn: 5930
2003-04-25 04:21:19 +00:00
Chris Lattner b348952d63 Fix bug where pointers were assumed to always be 64 bits in size!
llvm-svn: 5890
2003-04-23 20:41:01 +00:00
Chris Lattner 487bb80496 Add memcpy
llvm-svn: 5887
2003-04-23 20:23:16 +00:00
Chris Lattner ed27f84ed9 Fix a problem with setcc instructions and pointers
llvm-svn: 5886
2003-04-23 19:55:35 +00:00
Chris Lattner 93f4ff73a6 Implement a bunch of new external functions
llvm-svn: 5885
2003-04-23 19:55:24 +00:00
Chris Lattner 7881fc8704 Implement &|^ on bool values
llvm-svn: 5884
2003-04-23 19:21:00 +00:00
Chris Lattner 26a4a1f5ca Add support for _IO_getc function used on linux
llvm-svn: 5883
2003-04-23 19:20:50 +00:00
Chris Lattner 9de0d14dec * Implement access to external variables in LLI
* Implement GetElementPtr constant expressions when initializing global variables

llvm-svn: 5880
2003-04-23 19:01:49 +00:00
Chris Lattner 7d4c04c99a We now need to link libscalar to get the switch lowering pass
llvm-svn: 5874
2003-04-23 16:43:02 +00:00
Chris Lattner aee56b8d34 Kill using declarations
Kill code for invalid operations on pointers

llvm-svn: 5856
2003-04-22 21:22:33 +00:00
Chris Lattner bbd1157f71 Implement cast to bool
llvm-svn: 5855
2003-04-22 21:15:56 +00:00
Chris Lattner fa5fc55f83 Get rid of extraneous arguments to implementation functions
llvm-svn: 5852
2003-04-22 20:37:39 +00:00
Chris Lattner d215af03a3 Add support to LLI for switch instruction
llvm-svn: 5851
2003-04-22 20:34:47 +00:00
Chris Lattner 9a3ccdbdfb Make stderr, stdout, stdin work with LLI
llvm-svn: 5832
2003-04-21 22:44:36 +00:00
Chris Lattner f11d8a35ab Fix wierd idiom
llvm-svn: 5831
2003-04-21 22:43:32 +00:00
Chris Lattner 1610666ea5 fprintf CAN take exactly 2 args
llvm-svn: 5830
2003-04-21 22:43:20 +00:00
Chris Lattner d31837154d Implement scanf and fix sscanf to actually endian swap the results correctly
llvm-svn: 5763
2003-03-31 22:12:37 +00:00
Chris Lattner 13b3e5bdab Fix typeo
llvm-svn: 5624
2003-02-25 21:14:59 +00:00
Chris Lattner 75f7f8d906 Fix warnings on sparc
llvm-svn: 5427
2003-01-29 18:02:02 +00:00
Chris Lattner 3fef999fcb Fix didn't fix the race condition in the makefiles
llvm-svn: 5394
2003-01-22 15:41:10 +00:00
Chris Lattner cff8ebe6a3 Fix race condition in Makefile
llvm-svn: 5380
2003-01-21 15:20:50 +00:00
Chris Lattner 4bc4b67eed Add support for named functions
llvm-svn: 5258
2003-01-13 01:00:48 +00:00
Chris Lattner 2e8815833a Dead file
llvm-svn: 5257
2003-01-13 01:00:28 +00:00
Chris Lattner 4ba3bbb8d4 Add support for new types of values
llvm-svn: 5256
2003-01-13 01:00:12 +00:00
Chris Lattner 5bebd807a3 Bad segvs actually cause a segv now
llvm-svn: 5255
2003-01-13 01:00:02 +00:00
Chris Lattner d49518c534 * Wrap at 80 columns
* Fix a ton of warnings
* Implement puts

llvm-svn: 5254
2003-01-13 00:59:47 +00:00
Chris Lattner 4e7aa44644 Handle value promotion properly to work with tracing better
llvm-svn: 5253
2003-01-13 00:58:52 +00:00
Chris Lattner 93fbc67720 No longer need scalaropts lib
llvm-svn: 5252
2003-01-13 00:58:18 +00:00
Chris Lattner 510e8ba6f3 Add fixme
llvm-svn: 5251
2003-01-13 00:58:06 +00:00
Chris Lattner 3685f65f1b Add diagnostic output
llvm-svn: 5157
2002-12-28 20:00:15 +00:00
Chris Lattner 5aa5663353 Fixes to compile with GCC 3.2
llvm-svn: 5134
2002-12-24 00:39:16 +00:00
Chris Lattner e6761db961 Initial checkin
llvm-svn: 5127
2002-12-24 00:01:22 +00:00
Chris Lattner 996fe01028 Initial checkin of new LLI with JIT compiler
llvm-svn: 5126
2002-12-24 00:01:05 +00:00
Chris Lattner a0d7b084ef Substantial changes to refactor LLI to incorporate both the Jello JIT and
the traditional LLI interpreter

llvm-svn: 5125
2002-12-23 23:59:41 +00:00
Chris Lattner 677671d1af Add support for isnan
llvm-svn: 5111
2002-12-20 04:18:13 +00:00
Chris Lattner 3552d79ac1 Namespacify more
llvm-svn: 4956
2002-12-08 06:01:34 +00:00
Chris Lattner 4f96aa450e Add support to count the number of dynamic instructions executed by LLI
llvm-svn: 4955
2002-12-08 05:51:08 +00:00
Chris Lattner 98cf1f5d64 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.

llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner 7a1da7c850 Implement feof
llvm-svn: 4627
2002-11-08 19:10:26 +00:00
Chris Lattner a41a195374 Implement freopen for burg
llvm-svn: 4606
2002-11-07 19:33:50 +00:00
Chris Lattner a2b4c6cc49 Make command line arguments setup be endian correct!!
llvm-svn: 4605
2002-11-07 19:29:31 +00:00
Chris Lattner c3a84099a9 Implement fprintf
llvm-svn: 4585
2002-11-06 23:05:03 +00:00
Chris Lattner 8529020770 Implement fputc and ungetc to allow burg to run in lli
llvm-svn: 4584
2002-11-06 22:59:28 +00:00
Chris Lattner a416ad30df No need to explicitly inclue ExportSymbols now
llvm-svn: 4543
2002-11-04 20:50:57 +00:00
Chris Lattner 61596ad266 Fix two problems:
* Load Implementation can cause unaligned memory accesses, which caused
    problems for sparc.
  * cast from pointer to pointer would zero the upper 32 bits of the pointer
    which obviously causes problems on 64 bit hosts.

llvm-svn: 4454
2002-10-30 21:47:57 +00:00
Chris Lattner 7fe1f7c931 Fix a major bug in lli
llvm-svn: 4289
2002-10-26 01:57:15 +00:00
Chris Lattner 6a1a65f9de - Fix LLI so that it simulates the endianness of the target machine
correctly, despite the fact that the host machine might not be the same.

llvm-svn: 4180
2002-10-15 20:34:05 +00:00
Chris Lattner 0313db6b02 * Implement the getc() function
* Support usage of stdin, stdout & stderr correctly in LLI!

llvm-svn: 4022
2002-10-02 21:12:13 +00:00
Chris Lattner 8b952fa7ae Cleanup #includes, expose module
llvm-svn: 4021
2002-10-02 21:11:16 +00:00
Chris Lattner dabbf17b47 Expose TD to ExternalFunctions.cpp
llvm-svn: 4020
2002-10-02 21:10:48 +00:00
Chris Lattner bd0d2eab64 * Fix a bug that was causing lli to misrun:
test/Regression/Transforms/DecomposeMultiDimRefs/mixedindices.c
* Eliminate unneccesary #include

llvm-svn: 3712
2002-09-13 23:30:42 +00:00
Chris Lattner 6ba47f6d5b Export symbols for linux
llvm-svn: 3707
2002-09-13 22:20:19 +00:00
Chris Lattner f78e050e93 Another portability patch graciously provided by Casey Carter
llvm-svn: 3698
2002-09-13 14:41:38 +00:00