1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

275 Commits

Author SHA1 Message Date
Misha Brukman
35c8db23b6 Revert the patch that adds Function* for each 64-bit libc div/mul/rem that we
want to do; instead, we can use MachineInstr::addExternalSymbol(char*, bool) and
thus we don't have to modify the Module as we are code generating for it

llvm-svn: 18025
2004-11-20 00:10:20 +00:00
Misha Brukman
9430a3fcb4 Fix grammar
llvm-svn: 18023
2004-11-19 23:09:40 +00:00
Misha Brukman
87bfc8b09c Add protoypes for 64-bit long/ulong div, mul, and rem functions
llvm-svn: 18019
2004-11-19 22:14:35 +00:00
Misha Brukman
dd7ba48322 Handle GhostLinkage case for completeness (should not be seen by the asm writer)
llvm-svn: 18015
2004-11-19 21:49:19 +00:00
Brian Gaeke
89f96e4c7c Add VANext and VAArg stubs.
llvm-svn: 18012
2004-11-19 21:08:18 +00:00
Brian Gaeke
6224830c11 Implement va_start.
llvm-svn: 18011
2004-11-19 20:57:24 +00:00
Brian Gaeke
e88367016a First part of varargs support: getting all varargs which could possibly
be in registers into memory.

llvm-svn: 18006
2004-11-19 20:31:08 +00:00
Brian Gaeke
9c9427b62b va_end can safely be codegen'd to nothing on v8.
llvm-svn: 18004
2004-11-19 19:21:34 +00:00
Brian Gaeke
7027432624 A very sorry stub implementation of varargs intrinsics...
llvm-svn: 18003
2004-11-19 18:53:59 +00:00
Brian Gaeke
42b684e550 Update list of expected test failures.
llvm-svn: 18002
2004-11-19 18:48:29 +00:00
Brian Gaeke
5de5da7603 Fix bug in casting to long/ulong.
llvm-svn: 18001
2004-11-19 18:48:10 +00:00
Brian Gaeke
23969d8817 Rewrite LoadArgumentsToVirtualRegs, making it match almost exactly how
visitCallInst works.  Support cast of byte/short/int to long.

llvm-svn: 17949
2004-11-18 07:43:33 +00:00
Brian Gaeke
b01ef957b9 Update current expected failures list - expand it to include all of
SingleSource. Update to-do list (open-coding refers to binary operations on
longs, not to passing them into functions, which we already support.)

llvm-svn: 17948
2004-11-18 07:43:32 +00:00
Brian Gaeke
77ddfa2495 Allocate fewer registers and tighten up alignment restrictions.
llvm-svn: 17929
2004-11-18 00:25:20 +00:00
Brian Gaeke
cc4074987b Update to-do list.
llvm-svn: 17927
2004-11-17 22:33:55 +00:00
Brian Gaeke
0963d035c6 Update list of failing SingleSource Benchmarks
llvm-svn: 17926
2004-11-17 22:33:28 +00:00
Brian Gaeke
70a111317a We were (somehow) getting the wrong branch opcode for setcc float instrs.
llvm-svn: 17925
2004-11-17 22:06:56 +00:00
Brian Gaeke
c68a1fb6b9 Update list of failing benchmarks
llvm-svn: 17895
2004-11-16 07:32:58 +00:00
Brian Gaeke
effc63fac5 Correct the implicit-defs information for indirect and direct calls.
You can't have implicit defs that overlap explicit defs, or implicit
defs that alias one another.

llvm-svn: 17894
2004-11-16 07:32:09 +00:00
Brian Gaeke
56da74bd11 Update list of failing Benchmarks.
llvm-svn: 17823
2004-11-15 05:57:26 +00:00
Brian Gaeke
075be51e61 Expand Defs to encompass all the possibly-call-clobbered regs.
llvm-svn: 17822
2004-11-15 05:56:53 +00:00
Brian Gaeke
f9ec4c8ee2 Fix problem with insertion point for ADJCALLSTACKDOWN.
llvm-svn: 17733
2004-11-14 06:32:08 +00:00
Brian Gaeke
0e77dab4e8 Update lists of failing unit tests.
Exclude bigfib, so that we effectively exclude all C++ benchmarks.
Update to-do list: mention va_start.

llvm-svn: 17732
2004-11-14 06:32:07 +00:00
Brian Gaeke
ab60855423 Fix NotTest - round up extraStack to the nearest doubleword, if it is
not zero.

llvm-svn: 17728
2004-11-14 05:19:00 +00:00
Brian Gaeke
79f5f96a60 Update failing Benchmarks; point out that I'm skipping Shootout-C++.
llvm-svn: 17725
2004-11-14 04:43:12 +00:00
Brian Gaeke
505a9ee73d Update expected UnitTests failures.
llvm-svn: 17723
2004-11-14 03:22:08 +00:00
Brian Gaeke
1b3d701769 Rewrite outgoing arg handling to handle more weird corner cases.
llvm-svn: 17722
2004-11-14 03:22:07 +00:00
Brian Gaeke
294af88a7a Support UndefValue emission.
llvm-svn: 17721
2004-11-14 03:22:05 +00:00
Brian Gaeke
85e7df8097 Handle "call" operands of type long/ulong passed in registers.
llvm-svn: 17464
2004-11-04 00:27:04 +00:00
Brian Gaeke
c66a1d540b Change name of target lib to conform to new naming scheme.
llvm-svn: 17347
2004-10-29 21:57:16 +00:00
Brian Gaeke
db07ac46f0 Remove dependency on MRegisterInfo::getRegClass
llvm-svn: 17346
2004-10-29 21:42:27 +00:00
Misha Brukman
2493cb2a2a Adjust rules for building .inc files due to Reid's changes of Makefile.rules
llvm-svn: 17169
2004-10-22 22:16:24 +00:00
Misha Brukman
9113553178 * Add baseline structural JIT code, but disable the JIT to allow llvm-gcc builds
- Support added for functions, basic blocks, constant pool, constants,
    registers, and some basic support for globals, all untested
* Turn assert()s into abort()s so that unimplemented functions fail in release

llvm-svn: 17143
2004-10-19 19:49:42 +00:00
Chris Lattner
bb5b3f0b2f Add support for unreachable and undef
llvm-svn: 17074
2004-10-17 02:42:42 +00:00
Misha Brukman
e05e5f0655 The field is called imm22', not simply imm'
llvm-svn: 17003
2004-10-14 22:33:32 +00:00
Misha Brukman
4932cb0e94 Synthetic instructions RET and RETL need to have all 3 parameters specified
llvm-svn: 17002
2004-10-14 22:32:49 +00:00
Misha Brukman
7b29a7bc80 Class F2_1 already inherits the imm22 field from class F2
llvm-svn: 17001
2004-10-14 22:32:24 +00:00
Misha Brukman
4e691d2adb Generate the SparcV8 code emitter from .td files
llvm-svn: 17000
2004-10-14 21:57:19 +00:00
Misha Brukman
5bc4009783 * In the F3_1 class, default asi to 0 because it's not currently used
* In the F3_3 class, remove mention of asi because it's not part of the format

llvm-svn: 16999
2004-10-14 21:53:39 +00:00
Brian Gaeke
ce6dcb0713 Add FSTOI, FDTOI (fp to integer cast) instructions.
llvm-svn: 16996
2004-10-14 19:39:35 +00:00
Brian Gaeke
ba65401a4d Rewrite emitCastOperation, refactoring parts of it into emitIntegerCast, and
adding emitFPToIntegerCast.

llvm-svn: 16995
2004-10-14 19:39:34 +00:00
Brian Gaeke
31fa12ece7 Add list of libc procedures we'll use, at some point.
Update list of currently failing tests.
ADJCALLSTACK* support is done.

llvm-svn: 16994
2004-10-14 19:39:33 +00:00
Brian Gaeke
26b353ebd6 Fix assertion failure when calling or returning from a function which
returns 'bool' type.

llvm-svn: 16884
2004-10-10 20:34:17 +00:00
Brian Gaeke
3af0547680 Implement eliminateCallFramePseudoInstr().
Wrap a long comment line.

llvm-svn: 16883
2004-10-10 19:57:21 +00:00
Brian Gaeke
b6239cd5ed Model calls as *both* using *and* killing O0..O5, because callees use the
argument values passed in (so they're not dead until *after* the call),
and callees are free to modify those registers.

llvm-svn: 16882
2004-10-10 19:57:20 +00:00
Brian Gaeke
245a073aa6 Fix whitespace and wrap some long lines.
Deal with allocating stack space for outgoing args and copying them into the
correct stack slots (at least, we can copy <=32-bit int args).
We now correctly generate ADJCALLSTACK* instructions.

llvm-svn: 16881
2004-10-10 19:57:18 +00:00
Brian Gaeke
ba13791a01 update according to tonight's info
llvm-svn: 16866
2004-10-09 05:58:27 +00:00
Brian Gaeke
3abdd11420 Implement getModuleMatchQuality and getJITMatchQuality so that v8 will be the
default 32/BE target on sparc hosts, and ppc will continue to be the default
on other hosts.

llvm-svn: 16865
2004-10-09 05:57:01 +00:00
Brian Gaeke
c667e351ed I think this will handle double args.
llvm-svn: 16618
2004-09-30 19:44:32 +00:00
Brian Gaeke
0d4d060dbd Mark the instructions that have delay slots with the hasDelaySlot flag.
Add some comments.

llvm-svn: 16611
2004-09-30 04:04:48 +00:00
Brian Gaeke
738005408e Use TargetMachine::hasDelaySlot() instead of our old switch statement
to find instrs that have delay slots.

llvm-svn: 16610
2004-09-30 04:04:47 +00:00
Brian Gaeke
ee2dab29f9 Update list of shootout programs that should be working.
llvm-svn: 16595
2004-09-29 20:45:06 +00:00
Brian Gaeke
d4c38d8c4b Tell the target description that calls clobber registers O0...O5.
llvm-svn: 16594
2004-09-29 20:45:05 +00:00
Brian Gaeke
5bca3b8e5f FITOD is spelled "fitod", not "fitos". Ouch.
llvm-svn: 16591
2004-09-29 19:59:07 +00:00
Brian Gaeke
e9aabee09d Don't use .quad to output double constants. The assembler must have a bug or
something, because the wrong bit patterns get output.

llvm-svn: 16590
2004-09-29 19:59:06 +00:00
Brian Gaeke
b8237dfbb9 Recognize FpMOVD as a move.
llvm-svn: 16586
2004-09-29 16:45:47 +00:00
Brian Gaeke
25154c9580 add results
llvm-svn: 16579
2004-09-29 03:48:55 +00:00
Brian Gaeke
bad755c1d1 Simplify copyConstantToRegister() for longs, using a pair of recursive calls.
Copy constant-pool entries' addresses into registers before loading out of them,
to avoid errors from the assembler.
Handle loading call args past the 6th one off the stack.
Add IMPLICIT_DEF pseudo-instrs for double and long arguments passed in register
pairs.
Use FpMOVD to copy doubles around instead of the horrible store-load thing we
were doing before.
Handle 'ret double' and 'ret long'.
Fix a bug in handling 'and/or/xor long'.

llvm-svn: 16577
2004-09-29 03:34:41 +00:00
Brian Gaeke
279e98a3b4 Fix bug recognizing moves: isMoveInstr should only treat ORs with %g0 as
moves, not all ORs.

llvm-svn: 16576
2004-09-29 03:28:15 +00:00
Brian Gaeke
86aaed6a34 Use FpMOVD pseudo-instruction to move doubles around.
llvm-svn: 16575
2004-09-29 03:27:30 +00:00
Brian Gaeke
02c3d2f588 Add new FpMOVD pseudo-instruction, used to move doubles around.
llvm-svn: 16574
2004-09-29 03:27:29 +00:00
Brian Gaeke
42a0b9a05c Fix double and long alignment.
Call the FPMover pass after register allocation.

llvm-svn: 16573
2004-09-29 03:26:27 +00:00
Brian Gaeke
ab7ac780bb Put quotes around argument to .section directive.
llvm-svn: 16572
2004-09-29 03:25:40 +00:00
Brian Gaeke
8d39e108a5 Add createSparcV8FPMoverPass().
llvm-svn: 16571
2004-09-29 03:25:39 +00:00
Brian Gaeke
81597f52ff Pass which converts FpMOVD (double move pseudoinstructions) to pairs
of FMOVS instrs.

llvm-svn: 16570
2004-09-29 03:24:34 +00:00
Misha Brukman
88a1e0aba4 SparcV8 int regs are not only 32-bits in width, but they are 32-bit aligned!
llvm-svn: 16526
2004-09-27 18:22:18 +00:00
Misha Brukman
84e238e5ed Fix the copy-pasto that Brian noticed: V8 int regs are 32-bits wide, not 64.
llvm-svn: 16518
2004-09-26 21:07:43 +00:00
Misha Brukman
a59d95f2ed Use the V8/V9 shared register file description
llvm-svn: 16485
2004-09-22 21:48:50 +00:00
Misha Brukman
72c0988b77 Combine the F2 and F3 instruction classes into one file for simplicity
llvm-svn: 16484
2004-09-22 21:38:42 +00:00
Misha Brukman
5290581b39 Fix file header path
llvm-svn: 16483
2004-09-22 21:29:12 +00:00
Misha Brukman
3f8390a72f Prettify formatting of the file, adjust paths to making V8 a subdir of Sparc
llvm-svn: 16482
2004-09-22 20:09:29 +00:00
Misha Brukman
f8a2aee058 V8 is now a subdirectory of Sparc; adjust paths accordingly
llvm-svn: 16481
2004-09-22 20:08:52 +00:00
Chris Lattner
3cfb801817 Changes to make this work with Jason's patch. I checked this by hand, but
would appreciate if others would also look at this to make sure I didn't
botch something obvious

llvm-svn: 16312
2004-09-13 21:32:03 +00:00
Misha Brukman
587a924177 Renamed file to SparcV8ISelSimple.cpp
llvm-svn: 16267
2004-09-10 18:51:12 +00:00
Brian Gaeke
3229885493 This file does not need <iostream>, I think.
llvm-svn: 16245
2004-09-08 04:10:52 +00:00
Brian Gaeke
79802222d1 Back to compiling land for v8
llvm-svn: 16138
2004-09-02 02:37:43 +00:00
Chris Lattner
484126d8f8 Convert bytes to bits in alignment
llvm-svn: 15971
2004-08-21 20:09:46 +00:00
Chris Lattner
59e19bf141 V8 never used the instrselectorgenerator
llvm-svn: 15791
2004-08-15 23:07:40 +00:00
Chris Lattner
555a585fd8 Code insertion methods now return void instead of an int.
llvm-svn: 15780
2004-08-15 22:15:11 +00:00
Chris Lattner
e58190f5f6 These methods no longer take a TargetRegisterClass* operand.
llvm-svn: 15774
2004-08-15 21:56:44 +00:00
Chris Lattner
dd041ad575 Update to no longer take MF as an argument
llvm-svn: 15748
2004-08-14 22:57:22 +00:00
Misha Brukman
65afbbca70 Remove ClassPrefix variable as it's no longer used.
llvm-svn: 15586
2004-08-09 19:13:29 +00:00
Misha Brukman
4ebd3108a2 The (future) SparcV8 JIT would do well to have a class prefix.
llvm-svn: 15583
2004-08-09 18:13:09 +00:00
Brian Gaeke
fc1529b335 Update the To-Do list according to my notes + assertions
llvm-svn: 15535
2004-08-06 04:38:13 +00:00
Chris Lattner
f499378d6e getValues is gone
llvm-svn: 15494
2004-08-04 17:27:27 +00:00
Chris Lattner
c21741420c I'm pretty sure that ba is branch always, which is a barrier. Brg should
check this :)

llvm-svn: 15357
2004-07-31 02:24:37 +00:00
Chris Lattner
5196d002f9 I think that V8 should coallesce registers, don't you?
llvm-svn: 15192
2004-07-25 06:19:04 +00:00
Chris Lattner
b56b3b5eeb CPR fixes
llvm-svn: 14960
2004-07-18 07:26:17 +00:00
Brian Gaeke
b2af4f47b6 Add a class for pseudo-instructions. Use it.
Add IMPLICIT_USE and IMPLICIT_DEF, a la X86.

llvm-svn: 14884
2004-07-16 10:32:10 +00:00
Brian Gaeke
ec53196516 Add what will eventually be the TSFlags. Big switch(opcode) statements are bad.
llvm-svn: 14883
2004-07-16 10:31:59 +00:00
Brian Gaeke
0d262c839f Add special handling for pseudo-instructions (print them as comments).
llvm-svn: 14882
2004-07-16 10:31:47 +00:00
Brian Gaeke
11c7052fb5 Add to-do list.
llvm-svn: 14881
2004-07-16 10:31:36 +00:00
Brian Gaeke
53dc31efcd Do IMPLICIT_DEFs on incoming args' hard regs, to avoid confusing the regalloc.
Support single-fp incoming args.
Support single-fp outgoing args ('call' operands).
Support double-fp return values.

llvm-svn: 14880
2004-07-16 10:31:25 +00:00
Chris Lattner
6331eb6bbe Delete the allocate*TargetMachine function, which is now dead .
The shared command line options are now in a header that makes sense.

llvm-svn: 14756
2004-07-11 04:17:10 +00:00
Chris Lattner
b67e3b01bc Make these format a bit nicer
llvm-svn: 14747
2004-07-11 03:27:42 +00:00
Chris Lattner
2ada866a78 Auto-registrate target
llvm-svn: 14745
2004-07-11 02:48:49 +00:00
Brian Gaeke
0601002727 Support setcc on fp values.
llvm-svn: 14687
2004-07-08 09:08:35 +00:00
Brian Gaeke
23d171a9ed Add floating-point branches and compares. Compares don't complete
until the next cycle, and there's no interlock, so they effectively
have a delay slot.

llvm-svn: 14686
2004-07-08 09:08:22 +00:00
Brian Gaeke
99a4b4ecc6 Fix bug where SwitchSection would fail to change to ".bss" successfully.
llvm-svn: 14685
2004-07-08 08:08:23 +00:00
Brian Gaeke
79c41545a7 Fix bug involving bool arguments to binary operators.
Fix typo in comment.

llvm-svn: 14684
2004-07-08 08:08:10 +00:00