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

6516 Commits

Author SHA1 Message Date
Brian Gaeke
f5697cf56c JMPL has a delay slot.
llvm-svn: 14227
2004-06-18 08:18:54 +00:00
Brian Gaeke
2a5dec63a6 Clean up the commented-out F3_3 stuff.
Replace it with a working class for FP instrs.

llvm-svn: 14226
2004-06-18 06:28:21 +00:00
Brian Gaeke
01309de73d Fix jmpl.
Add some FP moves.

llvm-svn: 14225
2004-06-18 06:28:10 +00:00
Brian Gaeke
c045f38dcb Support printing base+offset pairs where the offset is a register.
Use this for printing the jmpl indirect-call instruction.

llvm-svn: 14224
2004-06-18 06:27:59 +00:00
Brian Gaeke
92a3e14ac4 Support intrinsic calls (although no particular intrinsics are supported yet).
Support indirect calls.
Support returning a float value.

llvm-svn: 14223
2004-06-18 06:27:48 +00:00
Chris Lattner
91b27e01b3 Implement Transforms/InstCombine/and.ll:test17, a common case that
occurs due to unordered comparison macros in math.h

llvm-svn: 14221
2004-06-18 06:07:51 +00:00
Chris Lattner
8f9fb1d2ea Do not function resolve intrinsics. This prevents warnings and possible bad
things from happening due to

declare bool %llvm.isunordered(double, double)
declare bool %llvm.isunordered(float, float)

llvm-svn: 14219
2004-06-18 05:50:48 +00:00
Brian Gaeke
c5f1146e62 Add load instructions for floating-point registers.
llvm-svn: 14217
2004-06-18 05:19:27 +00:00
Brian Gaeke
7a618842f1 Support alloca instructions.
Support copying floating-point constants to registers.
Add assertion to visitCallInst to abort if we hit a NULL calledFunction, for now.

llvm-svn: 14216
2004-06-18 05:19:16 +00:00
Chris Lattner
3c61b2dd70 Fix printing of Argument objects, problem found by Patrick Meredith
llvm-svn: 14215
2004-06-18 04:07:20 +00:00
Chris Lattner
9e1bbe86ba Codegen sub C, X a little bit better for register pressure. Instead of
mov REG, C
sub REG, X

generate:

neg X
add X, C

which uses one less reg

llvm-svn: 14213
2004-06-18 00:50:37 +00:00
Chris Lattner
a5750b975a Fold setcc instructions into select and branches that are not in the same BB as
the setcc.

llvm-svn: 14212
2004-06-18 00:29:22 +00:00
Brian Gaeke
b824469b44 Make storeRegToStackSlot slightly shorter.
Make copyRegToReg return 1 instead of -1.
Edit a comment in emitPrologue().

llvm-svn: 14211
2004-06-17 22:34:48 +00:00
Brian Gaeke
9a0dc64af6 Set the isBranch and isTerminator flags on branch instructions correctly.
Add a FIXME about the (currently unused) JMPL instructions.

llvm-svn: 14210
2004-06-17 22:34:29 +00:00
Brian Gaeke
c82f209e72 Emit stores correctly; don't fail an assertion.
llvm-svn: 14209
2004-06-17 22:34:19 +00:00
Brian Gaeke
d084a534a2 Support generating machine instructions for Phi nodes (based on x86, but with
modifications for 1 LLVM BB --> many MBBs).
Fix store operand order: make it always be Base, Offset, SrcReg (think
"[ Base + Offset ] = SrcReg").
Rewrite visitBranchInst() to be even dumber (but working) -- give up on
the branch fallthrough trick, for the time being.
Make visitSetCondInst() work.

llvm-svn: 14208
2004-06-17 22:34:08 +00:00
Brian Gaeke
af2408a4ee Recognize more branches.
llvm-svn: 14207
2004-06-17 22:33:57 +00:00
Brian Gaeke
4a904bfdcc I love the smell of a freshly broken PowerPC build in the morning.
llvm-svn: 14206
2004-06-17 22:27:04 +00:00
Brian Gaeke
6f6eb93de3 Make debugging dumps w/ multiple MachineBBs for a given LLVM BB readable.
llvm-svn: 14205
2004-06-17 22:26:53 +00:00
Chris Lattner
f815117481 Do not fold loads into instructions if it is used more than once. In particular
we do not want to fold the load in cases like this:

  X = load
    = add A, X
    = add B, X

llvm-svn: 14204
2004-06-17 22:15:25 +00:00
Chris Lattner
13cea4ef6f Fix compilation problem on freebsd. Problem noted by Vladimir Merzliakov in
PR371

llvm-svn: 14203
2004-06-17 21:20:52 +00:00
Brian Gaeke
7d711d517b Use addGlobalAddress and addMBB for call & branch targets instead of addPCDisp.
Abort if we see a PCRelativeDisp MachineOperand, to be safe. This matches
the X86 backend.

llvm-svn: 14202
2004-06-17 19:39:23 +00:00
Chris Lattner
0cd29ae2cd Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
00b0a866dd Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
Delete two functions that are now methods on the Type class

llvm-svn: 14200
2004-06-17 18:16:02 +00:00
Chris Lattner
18f8ae4e3e Minor cleanup
llvm-svn: 14199
2004-06-17 17:56:54 +00:00
Brian Gaeke
a46100448f Fix typo in DEBUG printout.
llvm-svn: 14196
2004-06-17 07:26:52 +00:00
Chris Lattner
1b8f37597d Fix a recent regression in Applications/sgefa that Alkis pointed out to me.
The vector may actually be empty if the register that we are marking as
recently used is not actually allocatable.  This happens for physical registers
that are not allocatable, like the ST(x) registers on X86.

llvm-svn: 14195
2004-06-16 06:57:29 +00:00
Brian Gaeke
19d2a396da Add int ferror(FILE *)
llvm-svn: 14194
2004-06-16 02:56:40 +00:00
Brian Gaeke
cf3cb8944a Um, did someone make a typo or something?
llvm-svn: 14192
2004-06-15 23:09:50 +00:00
Chris Lattner
7c3600a50e isnan is dead
llvm-svn: 14191
2004-06-15 21:52:58 +00:00
Chris Lattner
9bb0083d16 Remove support for llvm.isnan. Alkis wins :)
llvm-svn: 14189
2004-06-15 21:48:07 +00:00
Chris Lattner
c9a6116586 Remove isnan support, correct isunordered support
llvm-svn: 14187
2004-06-15 21:42:23 +00:00
Chris Lattner
1adcf0441d Remove support for the isnan intrinsic
llvm-svn: 14186
2004-06-15 21:37:54 +00:00
Chris Lattner
d11493d8c4 Add basic support for the isunordered intrinsic. The isnan stuff still needs to go
llvm-svn: 14185
2004-06-15 21:36:44 +00:00
Brian Gaeke
0a7b268b1a Fix thinko in visitor... ShiftInsts should currently be delegated
to visitBinaryOperator.

llvm-svn: 14182
2004-06-15 21:09:46 +00:00
Chris Lattner
8ca8002f88 Do not dereference end iterators. It's really bad for the asmwriter's health.
This possibly fixes PR370

llvm-svn: 14181
2004-06-15 21:07:32 +00:00
Brian Gaeke
5fe5e06bea I think we'll use the standard lowering passes for now.
llvm-svn: 14179
2004-06-15 20:37:12 +00:00
Brian Gaeke
d5f45ba4a1 Fix bug generating code for void call instructions: don't call
getReg() on void value.

llvm-svn: 14178
2004-06-15 20:06:32 +00:00
Brian Gaeke
79008f4648 Squash a warning from the Solaris assembler by aligning the stack
on a double-word boundary instead of a single-word boundary.

llvm-svn: 14177
2004-06-15 19:53:10 +00:00
Brian Gaeke
e02c780919 Allow special-casing of operand printing based on opcode. Print
non-register, non-immed. arguments to SETHI and OR using %hi() and
%lo() respectively.

llvm-svn: 14176
2004-06-15 19:52:59 +00:00
Brian Gaeke
b158cb6411 Support constant GEP expressions.
Support copying long constants to register pairs.
Support copying ConstantPointerNulls and ConstantPointerRefs to registers.

llvm-svn: 14175
2004-06-15 19:16:07 +00:00
Misha Brukman
130e02f232 Add file comment.
llvm-svn: 14172
2004-06-14 15:13:59 +00:00
Brian Gaeke
a4353cabab Quick hack to get this file compiling again on Mac OS X. The right thing to do
is write an autoconf macro that checks whether __isnan or isnan actually works
**using the C++ compiler after #include <cmath>**, instead of doing it the easy
way with AC_CHECK_FUNCS().

llvm-svn: 14171
2004-06-14 06:33:19 +00:00
Brian Gaeke
21e2dd53d8 Make -print-machineinstrs even stronger. You get to see the final code after
peepholing, and make it work the same way in the JIT as in LLC.

llvm-svn: 14170
2004-06-14 05:05:45 +00:00
Alkis Evlogimenos
dd550dc9cd Add constant folding capabilities to the isunordered intrinsic.
llvm-svn: 14168
2004-06-13 01:23:56 +00:00
Alkis Evlogimenos
173e9e832c Make assertions more consistent with the rest of the intrinsic
function verification and make it a requirement that both arguments to
llvm.isunordered are of the same type.

llvm-svn: 14165
2004-06-13 00:55:26 +00:00
Alkis Evlogimenos
9b28aef6cb Add the isunordered intrinsic.
llvm-svn: 14159
2004-06-12 19:19:14 +00:00
Reid Spencer
efdd7cd3ac Implement tracking of bytecode instruction size and the number of long
instructions generated.

llvm-svn: 14154
2004-06-11 15:10:38 +00:00
Chris Lattner
84269aa91e Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions
on X86.

llvm-svn: 14152
2004-06-11 06:37:11 +00:00
Chris Lattner
8dd2380de4 llvm.isnan doesn't access memory
llvm-svn: 14151
2004-06-11 06:17:13 +00:00