Commit Graph

220 Commits

Author SHA1 Message Date
Vikram S. Adve
29ff873c6c Fixed function getEscapedString to follow the Sparc assembly rules
for symbol names!  (And renamed it to getValidSymbolName).
Fixed format for float and other constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1195 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:12:37 +00:00
Vikram S. Adve
ff5a09ee44 Fix bugs in FITOS/D instruction generation.
The space for optional args in the stack frame is now being computed,
so finish the code generation for the variable `alloca'.
Finally, made a major overhaul of how stack frame is managed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1194 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:04:09 +00:00
Vikram S. Adve
b9c3863e08 Added new function UltraSparcInstrInfo::CreateCodeToCopyIntToFloat.
Also major overhaul of how stack frame is managed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1193 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:57:53 +00:00
Vikram S. Adve
1c0fba6e9c Removed class RegStackOffsets and used class MachineCodeForMethod
directly to manage stack frame.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1192 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:56:41 +00:00
Vikram S. Adve
7f37fe5187 Use MachineFrameInfo as base class of UltraSparcFrameInfo, and made
a major overhaul of this class and how stack frames are managed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1191 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:55:13 +00:00
Vikram S. Adve
38f5d46aff Added two minor methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1187 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:49:52 +00:00
Vikram S. Adve
12af164c87 Removed class RegStackOffsets and used class MachineCodeForMethod
directly to manage stack frame.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1186 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:48:50 +00:00
Vikram S. Adve
be49526193 Major overhaul of stack frame management.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1185 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:47:06 +00:00
Chris Lattner
8e5c0b473a Killing warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1175 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 14:01:59 +00:00
Chris Lattner
6dad506d81 Squelch warnings about not returning a value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1173 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 13:49:12 +00:00
Ruchira Sasanka
d1565abd68 Fixed bug - added code in pushUnconstrainedIGNodes() to check whether a node
is already pushed to stack by a previous call to the same method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1154 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 15:25:38 +00:00
Vikram S. Adve
04cc49be65 Bug fix: uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1147 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 05:11:05 +00:00
Vikram S. Adve
9576b15fcd Bug fix: Printing AdIBef and AdIAft outside the scope where they
were declared, and in some cases when they were unintialized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1146 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 05:01:54 +00:00
Vikram S. Adve
c352d2c530 Modified graph construction to use one pass to find all defs.
Avoids having to handle some special cases that cause complex interactions
with instr. selection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1138 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 04:04:23 +00:00
Vikram S. Adve
510eec7c89 Generate code for Rem instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1124 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 21:59:14 +00:00
Vikram S. Adve
b7f06f46a1 Fixed instruction information for RDCCR and WRCCR.
Fixed selection to create a TmpInstruction for each integer CC register
(since it is an implicit side-effect, unlike FP CC registers which are
explicit operands).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1120 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 19:34:49 +00:00
Chris Lattner
8e7f409169 Minor method rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1119 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 08:08:34 +00:00
Ruchira Sasanka
a9e45c8d66 Added an assertion since it seems like AdjList returns an errornous size in method
IGNode::pushOnStack().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1116 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 22:01:09 +00:00
Ruchira Sasanka
80b1a1a26a Added support for correct spilling of %ccr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1112 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 20:41:22 +00:00
Ruchira Sasanka
3839e6e309 Added code to support correct saving of %ccr across calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1111 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 19:59:59 +00:00
Ruchira Sasanka
51bc0e7994 Arranged stack frame - needs furhter organization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1108 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 17:14:44 +00:00
Ruchira Sasanka
ef1b0cb9a5 Arranged stack frame - needs furhter organization
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1106 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 17:13:27 +00:00
Chris Lattner
24d3a8b58d Check in to use moved stringizing code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1024 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-29 13:39:38 +00:00
Vikram S. Adve
53b44e1c32 Minor fix I omitted to check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1012 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 22:19:06 +00:00
Vikram S. Adve
94e40ef064 Record constants that need to be emitted in the assembly code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1010 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:46:23 +00:00
Vikram S. Adve
d0d79c01b4 Allow combinations of True/Anti/Output flags for each edge to
support, e.g., dependences on Call instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1009 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:45:02 +00:00
Vikram S. Adve
a93bbac606 Add edges between call instructions and (a) load/store instructions, and
(b) any instructions that use or set CC registers.  Whether or not the
latter are needed really should be machine-dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1008 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:43:33 +00:00
Vikram S. Adve
a2a7094662 Generate SETX for 64-bit integers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1007 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:41:46 +00:00
Vikram S. Adve
c7b2e5c81e Add SETX instruction for 64-bit constants.
Add M_CC_FLAG for many instructions that use int or fp CC registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1006 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:41:01 +00:00
Vikram S. Adve
0589b2c63f Need to subtract, not add, stack size in SAVE instruction!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1005 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:39:47 +00:00
Vikram S. Adve
953c83e1ee Major overhaul to print globals and constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1004 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:38:52 +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
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
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
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
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
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
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