Vikram S. Adve
2f72cdd756
Generate SETX for 64-bit integers!
...
llvm-svn: 1007
2001-10-28 21:41:46 +00:00
Vikram S. Adve
a5619eb835
Add SETX instruction for 64-bit constants.
...
Add M_CC_FLAG for many instructions that use int or fp CC registers.
llvm-svn: 1006
2001-10-28 21:41:01 +00:00
Vikram S. Adve
b31f9c3ea6
Need to subtract, not add, stack size in SAVE instruction!
...
llvm-svn: 1005
2001-10-28 21:39:47 +00:00
Vikram S. Adve
71b265a848
Major overhaul to print globals and constants.
...
llvm-svn: 1004
2001-10-28 21:38:52 +00:00
Ruchira Sasanka
9c38dbc249
Added support for spilling
...
llvm-svn: 992
2001-10-28 18:15:12 +00:00
Ruchira Sasanka
0863c161e9
Fixed load syntax in EmitAssembly
...
Fixed cpReg2Mem (store) operand oreder in SparcRegInfo.cpp
llvm-svn: 984
2001-10-24 22:05:34 +00:00
Ruchira Sasanka
36bcd79050
Fixed logic for checking whether a LR received the correct color.
...
llvm-svn: 976
2001-10-24 15:56:58 +00:00
Ruchira Sasanka
6a7f02082b
Corrected a bug in SparcRegInfo.cpp - to add inserted instructions before a return
...
llvm-svn: 969
2001-10-23 21:40:39 +00:00
Vikram S. Adve
18a9e39214
UNUSED.
...
llvm-svn: 944
2001-10-22 13:46:38 +00:00
Vikram S. Adve
a0177cdca5
Split JMPL into JMPLCALL and JMPLRET.
...
llvm-svn: 943
2001-10-22 13:44:53 +00:00
Vikram S. Adve
9090b50ba9
Added a frame layout class, and code to insert prolog/epilog code.
...
llvm-svn: 942
2001-10-22 13:44:23 +00:00
Vikram S. Adve
5462dca9f1
Reordered registers slightly to simplify a new check.
...
Added a function to map between the caller's and callee's register windows.
llvm-svn: 941
2001-10-22 13:43:08 +00:00
Vikram S. Adve
8498277e77
Split JMPL into JMPLCALL and JMPLRET so that IsCall and IsReturn can
...
be used to distinguish those uses of the `jmpl' instruction.
llvm-svn: 940
2001-10-22 13:41:12 +00:00
Vikram S. Adve
52e41008e3
Added functions to generate prolog and epilog code.
...
Use JMPLRET instead of RETURN for method returns so that
llvm-svn: 939
2001-10-22 13:36:31 +00:00
Vikram S. Adve
6b492ddc15
Added SAVE and RESTORE. Duplicated JMPL into JMPLCALL and JMPLRET,
...
which have the same opcode and operands but different flags.
llvm-svn: 938
2001-10-22 13:32:55 +00:00
Vikram S. Adve
7c1a8d6d53
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.
llvm-svn: 937
2001-10-22 13:31:53 +00:00
Ruchira Sasanka
24729a34ce
Added support for both call/jmpl instructions
...
llvm-svn: 930
2001-10-21 16:43:41 +00:00
Vikram S. Adve
9bc488984f
Fixed printing of offset operand for RETURN instruction.
...
llvm-svn: 928
2001-10-20 21:33:50 +00:00
Vikram S. Adve
5731249137
Use CALL for direct function calls; JMPL for indirect ones.
...
llvm-svn: 927
2001-10-20 20:57:06 +00:00
Vikram S. Adve
72ebb454d0
Minor bug fix in printing operands of JMPL.
...
llvm-svn: 926
2001-10-20 20:56:40 +00:00
Ruchira Sasanka
6a073498ba
Added code so that colorIGNode does not unnecessarily reserve unusable
...
Suggested colors for neighbors.
llvm-svn: 921
2001-10-19 21:41:16 +00:00
Ruchira Sasanka
d77a1bbc2f
Corrected call interference bug - suggested color not allocated if
...
volatile and there are call interferences
llvm-svn: 918
2001-10-19 17:23:43 +00:00
Ruchira Sasanka
5f629318fa
Added support for condition code loading/stroing in methods cpReg2Reg etc.
...
llvm-svn: 911
2001-10-18 22:38:52 +00:00
Chris Lattner
ee6e199f0e
Change Sources specifier to ExtraSources
...
llvm-svn: 874
2001-10-18 01:48:09 +00:00
Vikram S. Adve
6c697526bf
1. Move most of the constant-fixup code into machine-independent file
...
InstrSelectionSupport.cpp. It now happens in a bottom-up pass on
each BURG tree after the original top-down selection pass on the tree.
2. Handle global values as constants (viz., constant addresses).
llvm-svn: 868
2001-10-18 00:26:20 +00:00
Vikram S. Adve
cc776df39c
Sparc-specific code shared between local files.
...
llvm-svn: 864
2001-10-18 00:03:20 +00:00
Vikram S. Adve
01e57a481e
Moved implementation of class UltraSparcInstrInfo to SparcInstrInfo.cpp.
...
llvm-svn: 863
2001-10-18 00:02:32 +00:00
Vikram S. Adve
505130cb30
Added virtual function to generate an instruction sequence to
...
load a constant into a register.
llvm-svn: 862
2001-10-18 00:02:06 +00:00
Vikram S. Adve
4cc2b3b155
Moved implementation of class UltraSparcInstrInfo here.
...
llvm-svn: 861
2001-10-18 00:01:48 +00:00
Vikram S. Adve
6b4ba47f31
Only list automatically generated .cpp files.
...
llvm-svn: 854
2001-10-17 12:34:26 +00:00
Ruchira Sasanka
5b8971f418
Added support for caller saving
...
llvm-svn: 847
2001-10-16 01:23:19 +00:00
Chris Lattner
3294e7c14b
Emit the proper .type declarations to tell the debugger what a function is
...
llvm-svn: 845
2001-10-15 19:34:17 +00:00
Chris Lattner
77d2c22d94
Handle abnormal jmpl syntax correctly
...
llvm-svn: 844
2001-10-15 19:21:31 +00:00
Chris Lattner
f3f1e452ea
Output to cerr rather than cout so that debug info doesn't mess up assembly generation
...
llvm-svn: 840
2001-10-15 18:15:27 +00:00
Ruchira Sasanka
086bf0fe3a
updated suggesting/coloring of call & return args & implicit operands
...
llvm-svn: 830
2001-10-15 16:25:28 +00:00
Chris Lattner
02b671388e
Be const correct
...
llvm-svn: 826
2001-10-15 15:54:43 +00:00
Vikram S. Adve
e6c611b990
Forward operands into implicit uses as well as explicit ones.
...
llvm-svn: 808
2001-10-14 23:28:43 +00:00
Vikram S. Adve
1679709b71
Two bug fixes that were suppressing some "load-constant-into-register" instrs.
...
llvm-svn: 795
2001-10-14 18:10:33 +00:00
Chris Lattner
b3368ac9db
Move the burg file to here. Add .in suffix to indicate that it gets
...
preprocessed before burg gets to it
llvm-svn: 794
2001-10-14 17:26:21 +00:00
Chris Lattner
1a176f15dc
Make the sparc.burg file be a little more flexible and rubust in the fact of
...
renumbering of instructions. It is still horribly broken and grossly dependant on the number of instructions, but now it is a least a little better.
Oh yeah it also works now.
llvm-svn: 793
2001-10-14 17:25:31 +00:00
Chris Lattner
8deb9e588e
Fix broken #endif
...
llvm-svn: 768
2001-10-13 06:54:54 +00:00
Chris Lattner
a742b6acf3
* Add #include
...
* Fix #endif problems
* Change to getCalledValue instead of getCalledMethod
llvm-svn: 767
2001-10-13 06:54:30 +00:00
Vikram S. Adve
8aeb09fcc7
Record implicitRefs for each machine instruction instead of
...
each VM instruction.
llvm-svn: 725
2001-10-11 04:23:19 +00:00
Vikram S. Adve
021d523b2f
Insert code to load constants used as Call or Return arguments.
...
Also, note return value of a Call as an "implicitUse".
llvm-svn: 720
2001-10-10 20:56:33 +00:00
Ruchira Sasanka
990d8fb3e8
--removed %g regs being allocated - fix later
...
llvm-svn: 714
2001-10-09 23:36:13 +00:00
Chris Lattner
7fac070215
* Both Method & GlobalVariable now subclass GlobalValue
...
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion
llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner
da55810666
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
3856934386
Convert more code to use new style casts
...
Eliminate old style casts from value.h
llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
8f19112923
Add more support for new style casts
...
Convert more code to use them
llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
4b717c0edc
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
0156ba6185
Fix emission of return instructions
...
llvm-svn: 688
2001-10-01 02:32:34 +00:00
Vikram S. Adve
3652ef7587
Several fixes:
...
(1) Avoid hard-coding some register numbers.
(2) Fix some incorrect branch opcodes.
(3) Don't try to move int register to float register!
(4) If an operand being forwarded is a constant and it doesn't fit
into the immed field of the copy machine instruction, then
generate a load-constant instead of a copy.
(5) Use (unsigned long) 0 for copying a pointer via "add 0, ptr -> ptr2".
llvm-svn: 683
2001-10-01 00:12:53 +00:00
Vikram S. Adve
40378e32cd
Change latency of setuw and setsw to 2 cycles.
...
llvm-svn: 681
2001-09-30 23:46:57 +00:00
Ruchira Sasanka
560b0ad482
added suggesting color support
...
llvm-svn: 673
2001-09-30 23:19:57 +00:00
Ruchira Sasanka
5867c7ae80
added support for suggesting colors
...
llvm-svn: 671
2001-09-30 23:16:47 +00:00
Chris Lattner
b021f68438
* Properly escape function names
...
* Ignore %xcc argument on conditional branches
llvm-svn: 663
2001-09-28 15:07:24 +00:00
Chris Lattner
c6635c9fa2
Check in bug fix for vadve
...
llvm-svn: 662
2001-09-28 15:06:55 +00:00
Ruchira Sasanka
ebd284dfe9
-- fixed a ret val bug
...
llvm-svn: 652
2001-09-19 22:40:51 +00:00
Chris Lattner
e86a0230aa
Seperate instruction definitions into new SparcInstr.def file
...
Move contents of SparcMachineInstrDesc[] out of SparcInternals.h
into Sparc.cpp
llvm-svn: 644
2001-09-19 15:56:23 +00:00
Chris Lattner
49726a21a5
Add EmitAssembly to mf
...
llvm-svn: 637
2001-09-19 13:48:18 +00:00
Chris Lattner
036a317f2a
First cut at assembly output
...
llvm-svn: 636
2001-09-19 13:47:27 +00:00
Chris Lattner
518da4f3cd
Add emitAssemblyMethod to TargetMachine
...
llvm-svn: 635
2001-09-19 13:47:12 +00:00
Ruchira Sasanka
dfc6c887da
-- ruchira
...
llvm-svn: 632
2001-09-18 22:52:44 +00:00
Chris Lattner
caa449cf5c
Remove extraneous #includes
...
llvm-svn: 627
2001-09-18 17:03:48 +00:00
Vikram S. Adve
4d86cc2842
Renamed files to match the primary classes they provide.
...
llvm-svn: 620
2001-09-18 13:10:05 +00:00
Vikram S. Adve
8dd5e310e0
Renamed a header file.
...
llvm-svn: 619
2001-09-18 13:04:53 +00:00
Vikram S. Adve
514180ed83
Make class TargetMachine the common interface to all target-dependent
...
information, including instr, sched, and reg information.
This allows us to allocate them all in one place and use them much
more uniformly.
llvm-svn: 618
2001-09-18 13:04:24 +00:00
Vikram S. Adve
78d50d0f7a
Allow pointer constants as well as integer and booleans.
...
Skip over list nodes in ForwardOperand.
llvm-svn: 617
2001-09-18 13:03:13 +00:00
Vikram S. Adve
49d908a419
Make class TargetMachine the common interface to all target-dependent
...
information, including instr, sched, and reg information.
Rename files to match the primary classes they provide.
Commented out call to register allocation until more tests run correctly.
llvm-svn: 616
2001-09-18 13:01:29 +00:00
Vikram S. Adve
6cefc7072d
Renamed files to match the main classes they provide.
...
Some other minor changes.
llvm-svn: 615
2001-09-18 12:58:33 +00:00
Ruchira Sasanka
970886e738
modified printing of debug messages
...
llvm-svn: 593
2001-09-15 19:11:31 +00:00
Ruchira Sasanka
7d144a8500
added register allocation code
...
llvm-svn: 585
2001-09-15 00:30:44 +00:00
Ruchira Sasanka
dfdab46dc1
*** empty log message ***
...
llvm-svn: 579
2001-09-14 20:31:39 +00:00
Chris Lattner
95c652b59b
Add support for loading and storing pointers...
...
llvm-svn: 575
2001-09-14 20:00:02 +00:00
Chris Lattner
ad2cbf0e18
Fix a bug that caused a crash if a setcc had zero uses.
...
llvm-svn: 574
2001-09-14 18:29:28 +00:00
Chris Lattner
8d44b99844
Chris seems fond of #include <vector>. Fix these. Also convert use list in
...
Value to a vector instead of a list.
Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling
llvm-svn: 572
2001-09-14 16:56:32 +00:00
Chris Lattner
1680fb1617
Add a comment
...
llvm-svn: 571
2001-09-14 16:08:12 +00:00
Chris Lattner
6875e9cc97
Break scheduling infrastructure out of TargetMachine.cpp into SchedInfo.cpp
...
llvm-svn: 569
2001-09-14 15:43:58 +00:00
Chris Lattner
87b3bf630b
Split Target/Machine.h into three files:
...
* Machine.h
* InstInfo.h
* SchedInfo.h
TODO: Split out reg info stuff
llvm-svn: 567
2001-09-14 06:08:03 +00:00
Chris Lattner
22a6a90511
Make a new llvm/Target #include directory.
...
Move files from lib/CodeGen/TargetMachine to lib/Target
Move TargetData.h and TargetMachine.h to Target/{Data.h|Machine.h}
Prepare to split TargetMachine.h into several smaller files
llvm-svn: 566
2001-09-14 05:34:53 +00:00
Chris Lattner
f8464e4b8d
Checkin changes to:
...
1. Clean up the TargetMachine structure. No more wierd pointers that have to
be cast around and taken care of by the target.
2. Instruction Scheduling now takes the schedinfo as an argument. The same
should be done with the instinfo, it just isn't now.
llvm-svn: 565
2001-09-14 04:32:55 +00:00
Chris Lattner
5fae0de330
Move files to new sparc directory
...
llvm-svn: 563
2001-09-14 03:56:45 +00:00
Chris Lattner
06028541ab
Move the sparc target to a new lib/Target directory
...
llvm-svn: 562
2001-09-14 03:55:11 +00:00
Chris Lattner
b0ddffaae3
Move files.
...
llvm-svn: 561
2001-09-14 03:47:57 +00:00