Commit Graph

549 Commits

Author SHA1 Message Date
Vikram S. Adve
3eb60f8775 Add methods print<TYPE> for String, Pointer, and each primitive type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@994 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 20:52:27 +00:00
Ruchira Sasanka
20c82b12c9 Added support for spilling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@992 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 18:15:12 +00:00
Ruchira Sasanka
174bded6ce Added spill code support; moved insertCallerSaving to SparRegInfo since
we need to handle %ccr reg in a special way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@990 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 18:12:02 +00:00
Chris Lattner
43e3f7c962 Implement a -trace command line option and a trace option in the interpreter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@989 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 08:43:52 +00:00
Chris Lattner
c259316730 * Make pointer values work better by treating them uniformly as 64 bit values.
This causes code that is generated by gcc to work better.
* Implement mul & div
* Export malloc, free, and pow
* add strtol, atoi, and atol to the runtime library


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@988 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 08:28:11 +00:00
Chris Lattner
204eec3f57 Provide argv for commands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@987 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 05:54:31 +00:00
Chris Lattner
caccd761a6 Provide option to enable eating of all arguments following a specific one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@986 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 05:54:17 +00:00
Chris Lattner
e43db88b2d * Implement exit() builtin function
* Implement linked in runtime library with puts(char*) in it
* implement builtin putchar(int) function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@985 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-27 04:15:57 +00:00
Ruchira Sasanka
7dcd61209a Fixed load syntax in EmitAssembly
Fixed cpReg2Mem (store) operand oreder in SparcRegInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@984 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 22:05:34 +00:00
Chris Lattner
4a82271451 Add support for building a runtime library for LLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@983 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 19:52:41 +00:00
Ruchira Sasanka
c74a720204 Fixed logic for checking whether a LR received the correct color.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@976 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 15:56:58 +00:00
Chris Lattner
f038acbee2 Clean up error handling a bit. Add / as a seperator for command line arguments. This is just a big old ugly hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@974 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 06:21:56 +00:00
Chris Lattner
7eadfa1db8 Frivolous cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@973 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 06:21:22 +00:00
Chris Lattner
f608608878 Dang it, do NOT check in code that enables debugging. Bad chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@972 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 05:14:35 +00:00
Chris Lattner
008f906afd Two things:
1. Forward propogate a loaded constant to make debugging slightly less annoying
2. Fix an extremely nasty hard to find bug that really irritated me for the better
   part of 6 hours and was causing linking to die and bizarre and mysterious ways.
   Things should be much more stable now that this one liner has been fixed. GRR


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@971 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 05:12:04 +00:00
Chris Lattner
d6b65255fe Changes to get some meaningful feedback from the bytecode reader. At some point this stuff should all be exception driven, but for now it is not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@970 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 01:15:12 +00:00
Ruchira Sasanka
88dedc1544 Corrected a bug in SparcRegInfo.cpp - to add inserted instructions before a return
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@969 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 21:40:39 +00:00
Ruchira Sasanka
f7434f0e1d added support to move "added instructions" after the delay slot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@968 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 21:38:42 +00:00
Ruchira Sasanka
251d8db133 Added support to move "added instructions" after the delay slot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@967 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 21:38:00 +00:00
Chris Lattner
c2d774b6c1 Fix problem linking in a method prototype when a method body exists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@965 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 20:43:42 +00:00
Chris Lattner
2172ca1bab Remove unnamed prototypes that are created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@964 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 15:30:18 +00:00
Chris Lattner
90ebc114c6 Negative FP constants... whodathunkit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@963 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 04:13:01 +00:00
Chris Lattner
b0f20d72b1 Oops, didn't mean to check in enabled debugging support. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@962 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 03:21:42 +00:00
Chris Lattner
2b9f6004df Fixed a LONG standing, SCARY problem with bytecode encoding. It turns out to be an endian problem that only shows up with type 0 instructions in LARGE programs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@961 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 03:21:10 +00:00
Chris Lattner
e638c10cb0 More symbol table bugfixes that are impossible to track down. Goody
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@960 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 02:32:45 +00:00
Chris Lattner
5855f0db2a Allow unresolved/opaque types to be read and written to bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@959 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 01:53:22 +00:00
Chris Lattner
d48d6c74ad Fix another annoying bug that took forever to track down. This one involves abstract type resolution at a bad time that broke symbol tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@958 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 01:53:01 +00:00
Vikram S. Adve
7db933d513 Delete MachineCodeInfoForMethod object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@956 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 22:32:11 +00:00
Chris Lattner
c895294762 Fix a problem occuring with type unification of symbol table entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@955 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 21:59:46 +00:00
Vikram S. Adve
a7edb1888c Added function IsLeafMethod to identify leaf methods.
This will use the CallGraph only if one is provided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@950 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:55:46 +00:00
Vikram S. Adve
ac0ec47957 Added MachineCodeForMethod object in class Method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@949 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:52:47 +00:00
Vikram S. Adve
c023be29a4 Use class MachineCodeForMethod to print machine code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@948 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:52:03 +00:00
Vikram S. Adve
1d6158f98f Added class MachineCodeForMethod.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@947 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:51:33 +00:00
Vikram S. Adve
7ad1046065 Cosmetic changes only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@946 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:51:09 +00:00
Vikram S. Adve
fb8c0533b4 Modify code that processes delay slots so that it preserves any
useful instructions already inserted into delay slots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@945 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:49:27 +00:00
Vikram S. Adve
c5d0322d98 UNUSED.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@944 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:46:38 +00:00
Vikram S. Adve
578f99c74d Split JMPL into JMPLCALL and JMPLRET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@943 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:44:53 +00:00
Vikram S. Adve
9db43184ca Added a frame layout class, and code to insert prolog/epilog code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@942 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:44:23 +00:00
Vikram S. Adve
a1ca7b9d79 Reordered registers slightly to simplify a new check.
Added a function to map between the caller's and callee's register windows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@941 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:43:08 +00:00
Vikram S. Adve
53fec86ffd Split JMPL into JMPLCALL and JMPLRET so that IsCall and IsReturn can
be used to distinguish those uses of the `jmpl' instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@940 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:41:12 +00:00
Vikram S. Adve
fb36112c8d Added functions to generate prolog and epilog code.
Use JMPLRET instead of RETURN for method returns so that


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@939 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:36:31 +00:00
Vikram S. Adve
1d86cc06dc Added SAVE and RESTORE. Duplicated JMPL into JMPLCALL and JMPLRET,
which have the same opcode and operands but different flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@938 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:32:55 +00:00
Vikram S. Adve
c152163eb4 Reordered a couple of registers to simplify some new checks.
Added code to map between caller's and callee's register windows.
Added frame layout class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@937 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:31:53 +00:00
Chris Lattner
822695901f Remove ugly subclass of Opaque type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@936 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 06:01:08 +00:00
Chris Lattner
4a42e909cd Fix bug with
%list = type {%list *}
%list = type {%list *}

not being accepted (broken testmisc.ll)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@935 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 05:56:09 +00:00
Chris Lattner
9245fc75a4 Fix bug exposed by this testcase:
declare int "call_operand"      (%rtx_def*, int)        ;; Prototype for: call_operand
declare int "restore_operand"   (%rtx_def*, int)        ;; Prototype for: restore_operand

%rtx_def = type opaque
%rtx_def = type int
implementation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@934 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 04:55:44 +00:00
Chris Lattner
c9a21b51a1 Two changes:
1. Delete type handle regardless of whether a collision occured
2. Remove a MAJOR pessimization of runtime performance (thought be be an optimization at the time).

This second one was causing a 105k llvm file (from gcc) to parse in 58 seconds... without the
'optimization' it now parses in 3.64 seconds.  I suck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@933 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-21 23:02:41 +00:00
Chris Lattner
bfabd8877d Fix erroneous assertion failure on the following code:
declare int "malloc"(...)

...

%reg112 = call int (...) * %malloc( uint %cast1007 )


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@932 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-21 21:54:51 +00:00
Chris Lattner
23192ebe95 Fix bug caused by:
%list = type opaque
%list = type %list


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@931 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-21 21:43:25 +00:00
Ruchira Sasanka
b3b6f5338c Added support for both call/jmpl instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@930 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-21 16:43:41 +00:00