Misha Brukman
170943a795
Stack space for argument passing is 32 regardless of 32- vs. 64-bit arch.
...
Thanks to Nate Begeman for pointing this out.
llvm-svn: 15930
2004-08-19 21:51:19 +00:00
Misha Brukman
f73c87b36c
LR needs to be saved at 16-byte offset on a 64-bit arch
...
llvm-svn: 15929
2004-08-19 21:36:14 +00:00
Misha Brukman
f35b35a926
On 64-bit PowerPC, pointers are 8 bytes, so parameter area offset is 48, not 24
...
llvm-svn: 15928
2004-08-19 21:34:05 +00:00
Misha Brukman
75e987d0b8
This PHI has 4 additional operands, not 2.
...
llvm-svn: 15926
2004-08-19 21:00:12 +00:00
Misha Brukman
a26a61aa18
Use the appropriate 64-bit register description file.
...
llvm-svn: 15922
2004-08-19 19:36:57 +00:00
Misha Brukman
a5543ac5fb
Fix more remaining 32-bit vestiges of PowerPC
...
llvm-svn: 15919
2004-08-19 18:49:58 +00:00
Misha Brukman
2ff719f74f
Fix another vestige of the 32-bit PowerPC backend.
...
llvm-svn: 15918
2004-08-19 16:50:30 +00:00
Misha Brukman
714d166c22
Correct character prepended to global symbols ('.'), use Mangler consistently
...
llvm-svn: 15917
2004-08-19 16:33:56 +00:00
Misha Brukman
0010ea3042
* Eliminate global base register, r2 is used for that on AIX/PowerPC
...
* Fix bug from 32-bit PowerPC days of 2-register long split
llvm-svn: 15916
2004-08-19 16:29:25 +00:00
Misha Brukman
6c4a085286
Wrap long lines.
...
llvm-svn: 15915
2004-08-19 16:28:30 +00:00
Nate Begeman
d5c6380015
Convert casts that will have no effect into move instructions.
...
llvm-svn: 15914
2004-08-19 08:07:50 +00:00
Nate Begeman
e4e6d92d1d
Clean up floating point instruction selection.
...
Change int->float cast code to put conversion constants in constant pool.
Shorten code sequence for constant pool fp loads.
Remove LOADLoDirect/LOADLoIndirect psuedo instructions and tweak asmwriter
llvm-svn: 15913
2004-08-19 05:20:54 +00:00
Brian Gaeke
1936ce708d
M_DUMMY_PHI_FLAG is no longer used to distinguish V9::PHI. Get rid of it and
...
its TargetInstrInfo accessor.
llvm-svn: 15907
2004-08-18 20:04:28 +00:00
Brian Gaeke
7593525fcd
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
llvm-svn: 15906
2004-08-18 20:04:24 +00:00
Brian Gaeke
de44bc018a
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
...
Also, squash a use of TargetInstrInfo::isNop().
llvm-svn: 15905
2004-08-18 20:04:21 +00:00
Chris Lattner
1ea6d207ce
Convert to the new MachineFunctionInfo interface
...
llvm-svn: 15904
2004-08-18 18:13:37 +00:00
Brian Gaeke
b8183ff647
The SparcV9 target no longer uses any pseudoinstructions (SETSW, SETUW,
...
SETX) or M_PSEUDO_FLAG.
llvm-svn: 15901
2004-08-18 17:44:16 +00:00
Brian Gaeke
2fbe85b1f3
The Create*Const methods don't need to pass around a TargetMachine reference.
...
Other minor cleanups.
llvm-svn: 15900
2004-08-18 17:44:15 +00:00
Brian Gaeke
c03556f67e
Doxygenify some comments.
...
Clean up cpReg2MemMI and cpMem2RegMI, and doxygenify comments.
Get rid of their uses of SETSW, which is a pseudoinstruction. We can't
JIT-compile pseudoinstructions at the moment. This was blowing up 252.eon/jit,
which has some HUGE stack frames.
Reduce the uses of constantFitsInImmedField().
Consolidate some assertions.
llvm-svn: 15899
2004-08-18 17:44:14 +00:00
Chris Lattner
12754fe6b3
Switch V9 over to using the AsmPrinter base class to do its constant printing
...
Massive thanks to the brg miester for doing the testing. :)
llvm-svn: 15898
2004-08-18 05:29:08 +00:00
Chris Lattner
10262ab3f1
Rename var
...
llvm-svn: 15897
2004-08-18 02:22:55 +00:00
Chris Lattner
ea75199996
Add support for targets without a .zero directive
...
llvm-svn: 15894
2004-08-17 21:38:40 +00:00
Misha Brukman
faa6e51d6e
This file is no longer used.
...
llvm-svn: 15893
2004-08-17 20:23:33 +00:00
Chris Lattner
2501f5852a
Start using alignment output routines from AsmPrinter.
...
Changes to make this more similar to the X86 asmprinter
Fix overalignment of globals.
llvm-svn: 15891
2004-08-17 19:26:03 +00:00
Chris Lattner
866b58d2ef
Start using alignment output routines from AsmPrinter.
...
Changes to make this more similar to the ppc asmprinter
llvm-svn: 15890
2004-08-17 19:25:42 +00:00
Chris Lattner
1d35c1673f
Add support for alignment
...
llvm-svn: 15888
2004-08-17 19:14:29 +00:00
Chris Lattner
0c2ab8a9d4
Add a new helper method to get log2(type alignment)
...
llvm-svn: 15887
2004-08-17 19:13:00 +00:00
Chris Lattner
caf3f3e970
Check constant expression validity more strictly
...
llvm-svn: 15883
2004-08-17 17:28:46 +00:00
Chris Lattner
fca2833838
Work around PR424 for old c/c++ frontends.
...
llvm-svn: 15882
2004-08-17 17:26:41 +00:00
Chris Lattner
cc21bfd809
Print comments with ;
...
llvm-svn: 15881
2004-08-17 16:27:26 +00:00
Chris Lattner
da6beac0ff
Use a designated comment character when printing comments.
...
llvm-svn: 15880
2004-08-17 16:27:05 +00:00
Reid Spencer
c3e436427b
Bytecode File Format Changes:
...
- File format version number bumped to 4
- Writer will now align nothing
- Reader now only expects alignment for version 3 or earlier
llvm-svn: 15875
2004-08-17 07:45:14 +00:00
Nate Begeman
0818541631
Re-fix hiding the Frame Pointer from the register allocator in functions
...
that have a frame pointer. This change fixes Burg. In addition, make
the necessary changes to floating point code gen and constant loading after
Chris Lattner's fixes to the asm writer. These changes fix MallocBench/gs
llvm-svn: 15873
2004-08-17 07:17:44 +00:00
Chris Lattner
b3739ceb6e
Use the AsmPrinter emitGlobalConstant.
...
llvm-svn: 15872
2004-08-17 06:48:55 +00:00
Chris Lattner
9fa0fc4d5e
Add support for targets that have .quad, drop extra tab inserted
...
llvm-svn: 15870
2004-08-17 06:48:16 +00:00
Chris Lattner
f97bce7214
Use the emitGlobalConstant defined in AsmPrinter
...
llvm-svn: 15869
2004-08-17 06:37:12 +00:00
Chris Lattner
8452a1f6df
Implement emitGlobalConstant
...
llvm-svn: 15868
2004-08-17 06:36:49 +00:00
Chris Lattner
ac253447d3
New, more general, interface.
...
llvm-svn: 15866
2004-08-17 06:07:43 +00:00
Chris Lattner
104bfb7576
Allow an arbitrary prefix
...
llvm-svn: 15865
2004-08-17 06:06:54 +00:00
Chris Lattner
6d42cbd71a
We now allow targets to use any prefix they want for global symbols. Lets
...
hear it for ".".
llvm-svn: 15863
2004-08-17 06:06:19 +00:00
Misha Brukman
9254441cdf
Rewrite targets/rules to generate files for just PowerPC or PPC{32,64}
...
llvm-svn: 15862
2004-08-17 05:11:54 +00:00
Misha Brukman
4eab7f3d5b
Register classes are target-dependent
...
llvm-svn: 15861
2004-08-17 05:10:31 +00:00
Misha Brukman
851a54656a
#include <map> is not necessary here
...
llvm-svn: 15860
2004-08-17 05:09:39 +00:00
Misha Brukman
fd2df5afab
`PowerPC' is no longer a real target
...
llvm-svn: 15859
2004-08-17 05:09:10 +00:00
Misha Brukman
38c61506a8
Move variables and methods which need PPC{32,64}* distinction to subclasses
...
llvm-svn: 15858
2004-08-17 05:08:44 +00:00
Misha Brukman
ba7fe16dbf
No need for an `is64bit' flag
...
llvm-svn: 15857
2004-08-17 05:06:47 +00:00
Misha Brukman
fe3e46a0b3
PowerPCInstrInfo and PowerPCRegisterInfo have gone away; they are replaced
...
by 32- and 64-bit customized files, named appropriately.
llvm-svn: 15856
2004-08-17 05:05:00 +00:00
Misha Brukman
de4fc10733
Consistently name passed with 32 or 64 in their name
...
llvm-svn: 15855
2004-08-17 05:02:58 +00:00
Misha Brukman
68ede7e9ba
PowerPCRegisterInfo no longer takes a bool to differentiate 32 vs 64 bits
...
llvm-svn: 15854
2004-08-17 05:02:18 +00:00
Misha Brukman
d61283f347
The PowerPCInstrInfo class has gone away.
...
llvm-svn: 15853
2004-08-17 05:00:46 +00:00
Misha Brukman
0674182457
PowerPCInstrInfo has gone away, PPC32 and PPC64 share opcodes.
...
llvm-svn: 15852
2004-08-17 04:58:50 +00:00
Misha Brukman
ac0ae7c215
PowerPC 32-/64-bit split: Part II, 64-bit customizations on PowerPC
...
llvm-svn: 15851
2004-08-17 04:57:37 +00:00
Misha Brukman
116f9277f6
PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC*
...
llvm-svn: 15850
2004-08-17 04:55:41 +00:00
Reid Spencer
f8a18099fb
Correct the comments in the symbol table writer to reflect reality.
...
llvm-svn: 15848
2004-08-17 02:59:02 +00:00
Chris Lattner
a8fbbc0ec3
Print float constants as 4 byte values.
...
Also, fix endianness problems when cross compiling from little-endian host.
llvm-svn: 15847
2004-08-17 02:48:44 +00:00
Chris Lattner
bc9372bf77
Make sure to put an _ prefix on all identifiers!
...
Also, add some (currently disabled) code to print float's as 32-bits.
llvm-svn: 15846
2004-08-17 02:29:00 +00:00
Chris Lattner
07e78f177a
Some asmwriters want an _ prefix
...
llvm-svn: 15845
2004-08-17 02:28:26 +00:00
Chris Lattner
5491774934
More changes to make PPC32 and X86 more similar
...
llvm-svn: 15842
2004-08-16 23:38:36 +00:00
Chris Lattner
b4f1f71bf0
Minor changes to make the diff be nothing against the X86 version
...
llvm-svn: 15841
2004-08-16 23:30:16 +00:00
Chris Lattner
0ced90583d
Finegrainify namespacification
...
Start using the AsmPrinter base class to factor out a bunch of code
llvm-svn: 15840
2004-08-16 23:25:21 +00:00
Chris Lattner
9cf46456cb
Start using the AsmPrinter to emit our first class constants. This also
...
drops our half-assed support for cygwin, which noone uses and doesn't work
anyway.
llvm-svn: 15839
2004-08-16 23:16:06 +00:00
Chris Lattner
6a8e0f511b
Initial implementation of the asmprinter base class
...
llvm-svn: 15838
2004-08-16 23:15:22 +00:00
Chris Lattner
7e3f28fcdf
Moved this file out of lib/CodeGen
...
llvm-svn: 15837
2004-08-16 22:38:02 +00:00
Chris Lattner
2cb145ceb5
Hacks to make the MachineFunction class be able to delete the MFI object
...
without knowing anything about it.
llvm-svn: 15836
2004-08-16 22:37:18 +00:00
Chris Lattner
95de5ddbbd
Code moved out of lib/CodeGen/MachineFunction.cpp
...
llvm-svn: 15835
2004-08-16 22:36:54 +00:00
Chris Lattner
a1d7802e3c
Move this code to lib/Target/SparcV9/MachineFunctionInfo.cpp
...
llvm-svn: 15834
2004-08-16 22:36:34 +00:00
Chris Lattner
bb9aa25a52
This file is moving to lib/Target/SparcV9
...
llvm-svn: 15833
2004-08-16 22:36:10 +00:00
Chris Lattner
9fb30a4257
Move MachineCodeForInstruction.h and MachineFunctionInfo.h into lib/Target/SparcV9
...
llvm-svn: 15830
2004-08-16 21:55:02 +00:00
Chris Lattner
491a52cf22
Nuke this file
...
llvm-svn: 15829
2004-08-16 21:36:40 +00:00
Chris Lattner
d75c0438a1
Fold MachineInstrAnnot.cpp into this file
...
llvm-svn: 15828
2004-08-16 21:36:31 +00:00
Misha Brukman
30cee49933
Move these files (which are dependent on VMCore) into VMCore
...
llvm-svn: 15825
2004-08-16 19:04:36 +00:00
Brian Gaeke
a7ae92436f
Update and consolidate comments. Remove some excess whitespace.
...
llvm-svn: 15824
2004-08-16 18:27:25 +00:00
Brian Gaeke
224704fc6f
Add a note that people shouldn't use MachineFunctionInfo.
...
llvm-svn: 15823
2004-08-16 18:27:24 +00:00
Reid Spencer
b0ac8c48a6
Fix PR422.
...
Ouch! Changes in the lazy initialization code caused each incorporated
function to reprocess the entire function on every lookup of a value's
slot number. This caused a horrible slowdown in all functions. This
fix made llvm-dis go from "longer than I care to wait" (minutes) on a large
test case to 0.53 seconds.
llvm-svn: 15818
2004-08-16 07:46:33 +00:00
Reid Spencer
bd2642e7e8
Remove lib/System contents until a satisfactory solution can be
...
provided.
llvm-svn: 15816
2004-08-16 07:08:38 +00:00
Chris Lattner
12324753f2
Fix a bug that caused the pass to go into infinite loops on trivial testcases.
...
This is fallout of the Bug 122 changes.
llvm-svn: 15811
2004-08-16 05:38:02 +00:00
Chris Lattner
f2e9ea2106
There is no need for a cast here
...
llvm-svn: 15810
2004-08-16 05:09:58 +00:00
Nate Begeman
ab6b08d937
Update the current state of the world
...
llvm-svn: 15809
2004-08-16 05:06:43 +00:00
Nate Begeman
a6808b8efc
Fix typo of the word 'implicit' I made resolving a CVS conflict. Whoops!
...
llvm-svn: 15808
2004-08-16 02:12:49 +00:00
Nate Begeman
dabf0a52c0
Fix frame pointer handling:
...
Reserve R0 in store/load from stack slot for building >32k offsets from SP
or FP. This also requires we use R11 rather than R0 for holding the LR
value we want to save or restore. Also, tell the register allocator not
to use R31 (our FP) in functions that have a frame pointer. These changes
fix Burg.
llvm-svn: 15807
2004-08-16 01:52:12 +00:00
Nate Begeman
8b44a07246
Fix mismatched adjust down/up of SP in functions that contain variable
...
sized allocas.
llvm-svn: 15806
2004-08-16 01:50:22 +00:00
Chris Lattner
3361c5da6f
Add a special case for argc,argv
...
llvm-svn: 15802
2004-08-16 01:07:04 +00:00
Chris Lattner
b1cad0b3bc
Don't pass too many arguments into runFunction
...
llvm-svn: 15801
2004-08-16 01:05:35 +00:00
Chris Lattner
3f9d4ed43d
Finally, add support for calling arbitrary non-varargs functions.
...
llvm-svn: 15799
2004-08-16 00:14:18 +00:00
Chris Lattner
58d0582548
Handle all nullary functions, of any valid return type.
...
llvm-svn: 15798
2004-08-15 23:53:06 +00:00
Chris Lattner
23f7c98016
Fine, go all of the way and check that the argument types are correct as well.
...
llvm-svn: 15797
2004-08-15 23:39:59 +00:00
Chris Lattner
8f8f72f21b
These only really work if returning int or void
...
llvm-svn: 15796
2004-08-15 23:34:48 +00:00
Chris Lattner
47380e3ba0
Handle zero arg function case
...
llvm-svn: 15794
2004-08-15 23:31:43 +00:00
Chris Lattner
a349c03347
Simplify code a bit, print error message always instead of asserting.
...
llvm-svn: 15793
2004-08-15 23:29:50 +00:00
Chris Lattner
26971f4bc2
V8 never used the instrselectorgenerator
...
llvm-svn: 15791
2004-08-15 23:07:40 +00:00
Chris Lattner
291de48b59
isdummyclass goes away
...
llvm-svn: 15790
2004-08-15 23:04:35 +00:00
Chris Lattner
aa6a8abc02
disable all of the pattern isel stuff
...
llvm-svn: 15788
2004-08-15 23:02:34 +00:00
Chris Lattner
1d088db15e
Disable the pattern isel
...
llvm-svn: 15787
2004-08-15 23:02:17 +00:00
Chris Lattner
5943c5078c
Reduce usage of MRegisterInfo::getRegClass
...
llvm-svn: 15784
2004-08-15 22:23:09 +00:00
Chris Lattner
48a3b942ae
Insertion methods now return void instead of #instrs inserted. Also, use
...
more powerful forms of BuildMI to concisify the code
llvm-svn: 15782
2004-08-15 22:15:56 +00:00
Chris Lattner
772f0d4106
Code insertion methods now return void instead of #instrs inserted
...
llvm-svn: 15781
2004-08-15 22:15:30 +00:00
Chris Lattner
a0b38d3cb1
Code insertion methods now return void instead of an int.
...
llvm-svn: 15780
2004-08-15 22:15:11 +00:00
Chris Lattner
6199899483
The insertion method returns void now
...
llvm-svn: 15779
2004-08-15 22:14:31 +00:00
Chris Lattner
afe8e34940
Nuke ifdef'd out code
...
llvm-svn: 15777
2004-08-15 22:03:57 +00:00
Chris Lattner
c66f27fd29
Stop using CreateStackObject(RegClass*)
...
llvm-svn: 15775
2004-08-15 22:02:22 +00:00