1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

155 Commits

Author SHA1 Message Date
Duraid Madina
00fbe7a7e4 we don't feed our call instructions extra operands
llvm-svn: 25009
2005-12-25 14:07:01 +00:00
Chris Lattner
73f38507d9 remove dead code
llvm-svn: 24965
2005-12-22 21:16:08 +00:00
Duraid Madina
e009e40008 this is a hack, which may or may not hang around. In short:
whimper out of doing things the Right Way, and hack up a generic
'BRCALL' instruction, that gets generated when calls are lowered.
This gets selected by hand in the DAG isel, where it gets turned
into real (i.e. in tablegen) br.call instructions.

BUG: this dies on void calls, but seems to work otherwise?
llvm-svn: 24952
2005-12-22 13:29:14 +00:00
Duraid Madina
325c2cc07b we can't do this directly in lowering, so we need this case
llvm-svn: 24951
2005-12-22 07:14:45 +00:00
Duraid Madina
bf2a5de0d5 oops, back this out
llvm-svn: 24950
2005-12-22 07:13:51 +00:00
Duraid Madina
d87738a097 we can't all have brains now, can we
llvm-svn: 24948
2005-12-22 06:41:39 +00:00
Duraid Madina
b43dc0ff5b this should take care of calls to varadic functions, but it doesn.,t
BUG: calling printf(string, float) will load the float into the wrong
register, completely forget about loading the string, etce

llvm-svn: 24947
2005-12-22 06:39:57 +00:00
Duraid Madina
d1c9d5ae4d we need to emit the getf.d instruction in lowering, so add it
to IA64ISD

llvm-svn: 24946
2005-12-22 06:38:38 +00:00
Duraid Madina
47cd4eeab0 I shoulda done this a *long* time ago (tm): implement calls properly,
i.e. r1/r12/rp are saved/restored regardless of scheduling/luck

TODO: calls to external symbols, indirect (function descriptor) calls,
      performance (we're being paranoid right now)

BUG: the code for handling calls to vararg functions breaks if FP
args are passed (this will make printf() go haywire so a bunch of
tests will fail)

BUG: this seems to trigger some legalize nastiness
llvm-svn: 24942
2005-12-22 04:07:40 +00:00
Duraid Madina
22eb8a3fb4 kill SelectCALL() in the DAG isel, we handle this in lowering now, like
SPARCv8. (we copy sparcv8's workaround for tablegen not being nice about
ISD::CALL/TAILCALL)

llvm-svn: 24941
2005-12-22 03:58:17 +00:00
Duraid Madina
2c940da498 update tablegen files - nothing to see here
llvm-svn: 24939
2005-12-22 03:56:03 +00:00
Jim Laskey
d82881490c Disengage DEBUG_LOC from non-PPC targets.
llvm-svn: 24919
2005-12-21 20:51:37 +00:00
Chris Lattner
487742bf85 Add some explicit type casts so that tblgen knows the type of the shiftamount, which is not necessarily the same as the type being shifted.
llvm-svn: 24595
2005-12-05 02:34:29 +00:00
Chris Lattner
b86aeb6db6 IA64 doesn't support the LOCATION node, and for some reason the ISelPattern
stuff isn't using ISelLowering.cpp

llvm-svn: 24567
2005-12-01 18:19:53 +00:00
Nate Begeman
811a41a87c Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.

llvm-svn: 24563
2005-12-01 04:51:06 +00:00
Chris Lattner
a7d31504f9 Pay attn to the node returned by SelectNodeTo
llvm-svn: 24551
2005-11-30 23:02:08 +00:00
Nate Begeman
84be54b731 No longer track value types for asm printer operands, and remove them as
an argument to every operand printing function.  Requires some slight
tweaks to x86, the only user.

llvm-svn: 24541
2005-11-30 18:54:35 +00:00
Chris Lattner
47feb1ecbb No targets support line number info yet.
llvm-svn: 24513
2005-11-29 06:16:21 +00:00
Duraid Madina
9c2283e7c7 add support for dynamic_stackalloc to the dag isel (thanks andrew ;)
next up: support argument passing in memory, not just registers

llvm-svn: 24490
2005-11-25 07:49:25 +00:00
Duraid Madina
5fe9d39b8d add support for div/rem to the dag->dag isel. yay.
llvm-svn: 24472
2005-11-21 14:14:54 +00:00
Chris Lattner
f4b9a79b79 Eliminate unneeded intermediate class. Move doFinalizeMethod to bottom of
file.

llvm-svn: 24470
2005-11-21 08:40:17 +00:00
Chris Lattner
b24983c574 Start using shared asmprinter Constant Pool emitter, use shorter cpi names.
llvm-svn: 24469
2005-11-21 08:38:26 +00:00
Chris Lattner
3e2c6c1d15 Adjust to capitalized AsmPrinter method names
llvm-svn: 24456
2005-11-21 07:51:23 +00:00
Chris Lattner
a0905b348a Use PrivateGlobalPrefix for basic block labels
llvm-svn: 24452
2005-11-21 07:39:22 +00:00
Chris Lattner
b273e59ae8 Start using SwitchSection, allowing globals and functions to be emitted
to specific sections.  Delete some dead functions copied from the X86 backend.

llvm-svn: 24449
2005-11-21 07:26:04 +00:00
Chris Lattner
e5d0064a9d Rename SwitchSection -> switchSection to avoid conflicting with a future
change.

llvm-svn: 24443
2005-11-21 06:55:27 +00:00
Chris Lattner
07ea769304 Start using PrivateGlobalPrefix correctly
llvm-svn: 24442
2005-11-21 06:51:52 +00:00
Duraid Madina
a60348b6b2 add FP select. next up - divide!
llvm-svn: 24346
2005-11-14 01:17:30 +00:00
Chris Lattner
3fdc97d460 Add a new option to indicate we want the code generator to emit code quickly,not spending tons of time microoptimizing it. This is useful for an -O0style of build.
llvm-svn: 24233
2005-11-08 02:11:51 +00:00
Duraid Madina
fb806bb309 add support for storing and returning bools
llvm-svn: 24228
2005-11-07 03:11:02 +00:00
Duraid Madina
f0469f0376 just some random hacking - calls (particularly indirect) need a lot of
love (especially with -sched=simple)

llvm-svn: 24225
2005-11-06 13:43:30 +00:00
Duraid Madina
cf11aefc91 ask for 16-byte aligned jmpbufs. This should unbreak C++ on IA64 (and
a bunch of other things) but is currently ignored by the code
generator.

llvm-svn: 24206
2005-11-06 04:29:30 +00:00
Duraid Madina
c2c2e353ee oops, forgot to load GP for indirect calls, though the old code now commented
out failed (e.g. methcall) - now the code compiles, though it's not quite
right just yet (tm) ;)

would fix this but it's 3am! :O

llvm-svn: 24186
2005-11-04 17:55:53 +00:00
Duraid Madina
e8456a9175 kill redundant SP/GP/RP save/restores across calls
llvm-svn: 24183
2005-11-04 10:01:10 +00:00
Duraid Madina
1c632094d4 add support for loading bools
llvm-svn: 24182
2005-11-04 09:59:06 +00:00
Duraid Madina
f5824e4fa3 fun with predicates! (add TRUNC i64->i1, AND i1 i1, fix XOR i1 i1)
llvm-svn: 24175
2005-11-04 00:57:56 +00:00
Duraid Madina
4adb8143ce add pattern to load constant 0 into a predicate reg
llvm-svn: 24164
2005-11-03 10:09:32 +00:00
Chris Lattner
cfb7edb4ed Fix a bug that prevented this pattern from matching
llvm-svn: 24161
2005-11-03 05:45:34 +00:00
Duraid Madina
7975eea64d "fix" support for FP constants (this code asserts in the scheduler,
though)

llvm-svn: 24152
2005-11-02 07:32:59 +00:00
Duraid Madina
e89d6f5197 add F0 and F1 to the FP register class
llvm-svn: 24151
2005-11-02 07:30:39 +00:00
Chris Lattner
04749a46a0 This works now
llvm-svn: 24150
2005-11-02 06:49:37 +00:00
Duraid Madina
94dd783c92 add support for SELECT to TargetSelectionDAG.td, add support for
selecting ints to IA64, and a few other ia64 bits and pieces

llvm-svn: 24147
2005-11-02 02:37:18 +00:00
Duraid Madina
b743794294 add support for loading FP constants +0.0 and +1.0 to the dag isel,
stop pretending -0.0 and -1.0 are machine constants

llvm-svn: 24146
2005-11-02 02:35:04 +00:00
Duraid Madina
28dbc1f9d0 heh, scheduling was easy?
need to send chris, jim and sampo a box of fish each

llvm-svn: 24135
2005-11-01 05:49:08 +00:00
Duraid Madina
6314b5fc35 FORTRAN!!! :( and other similarly unfortunate things mean that on ia64
one sometimes needs to pass FP args in both FP *and* integer registers.

llvm-svn: 24134
2005-11-01 05:46:16 +00:00
Duraid Madina
7f2a0b1290 so tablegen was thinking I might want to convert FPs to predicates.
clever little tablegen!

llvm-svn: 24133
2005-11-01 03:32:15 +00:00
Duraid Madina
c754478fbe add support for int->FP and FP->int ops, and add ia64 patterns for these
llvm-svn: 24132
2005-11-01 03:07:25 +00:00
Duraid Madina
ba4b2d2a1b add zeroextend predicate->integer
llvm-svn: 24131
2005-11-01 01:29:55 +00:00
Duraid Madina
76abe0f46c add FP compares and implicit register defs to the dag isel
llvm-svn: 24118
2005-10-31 01:42:11 +00:00
Duraid Madina
5168a7dea5 fix some broken comparisons, this affected the Pattern isel too.
llvm-svn: 24109
2005-10-30 10:14:19 +00:00