Commit Graph

12452 Commits

Author SHA1 Message Date
Brian Gaeke
9d2427c074 .zero doesn't work in the Solaris assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14231 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 08:59:16 +00:00
Brian Gaeke
a3c57624c0 Get rid of selects the easy way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 08:46:15 +00:00
Brian Gaeke
cfaf22445c Make visitAllocaInst() look more like its X86 counterpart.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14229 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 08:45:52 +00:00
Brian Gaeke
4f217fdd10 Mess around with allocation order. In particular, I think we ought to be
using the local & in regs first because they are not clobbered by calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14228 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 08:19:08 +00:00
Brian Gaeke
fbaae01269 JMPL has a delay slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14227 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 08:18:54 +00:00
Brian Gaeke
0735920173 Clean up the commented-out F3_3 stuff.
Replace it with a working class for FP instrs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14226 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 06:28:21 +00:00
Brian Gaeke
f89cc655ab Fix jmpl.
Add some FP moves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14225 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 06:28:10 +00:00
Brian Gaeke
ceb224148e Support printing base+offset pairs where the offset is a register.
Use this for printing the jmpl indirect-call instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14224 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 06:27:59 +00:00
Brian Gaeke
9d67ea0b61 Support intrinsic calls (although no particular intrinsics are supported yet).
Support indirect calls.
Support returning a float value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14223 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 06:27:48 +00:00
Chris Lattner
ceebeb64a6 Calls to __builtin_isunordered and friends no longer cause llvmgcc to ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14222 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 06:26:29 +00:00
Chris Lattner
5b62aa743d Implement Transforms/InstCombine/and.ll:test17, a common case that
occurs due to unordered comparison macros in math.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14221 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 06:07:51 +00:00
Chris Lattner
b80e3ada7b New test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14220 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 06:07:17 +00:00
Chris Lattner
e5ad50b2e8 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)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14219 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 05:50:48 +00:00
Chris Lattner
eaf10c8242 Test that C99 unordered comparison functions are not being turned into libc calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14218 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 05:42:50 +00:00
Brian Gaeke
562d5b0f6d Add load instructions for floating-point registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14217 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 05:19:27 +00:00
Brian Gaeke
c93a75223d Support alloca instructions.
Support copying floating-point constants to registers.
Add assertion to visitCallInst to abort if we hit a NULL calledFunction, for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14216 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 05:19:16 +00:00
Chris Lattner
a8abee2136 Fix printing of Argument objects, problem found by Patrick Meredith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14215 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 04:07:20 +00:00
Chris Lattner
cb37056996 New testcase for GCC unordered comparison builtins
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14214 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 03:39:56 +00:00
Chris Lattner
667ea024b5 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14213 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 00:50:37 +00:00
Chris Lattner
a6f9fe6dbc Fold setcc instructions into select and branches that are not in the same BB as
the setcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14212 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18 00:29:22 +00:00
Brian Gaeke
6713d988a4 Make storeRegToStackSlot slightly shorter.
Make copyRegToReg return 1 instead of -1.
Edit a comment in emitPrologue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14211 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:34:48 +00:00
Brian Gaeke
070bb4a8da Set the isBranch and isTerminator flags on branch instructions correctly.
Add a FIXME about the (currently unused) JMPL instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14210 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:34:29 +00:00
Brian Gaeke
8308d04dbc Emit stores correctly; don't fail an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14209 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:34:19 +00:00
Brian Gaeke
6c868a4c17 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14208 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:34:08 +00:00
Brian Gaeke
fc7fa31211 Recognize more branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14207 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:33:57 +00:00
Brian Gaeke
afe16e1742 I love the smell of a freshly broken PowerPC build in the morning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14206 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:27:04 +00:00
Brian Gaeke
988b7ba5ba Make debugging dumps w/ multiple MachineBBs for a given LLVM BB readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14205 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:26:53 +00:00
Chris Lattner
ccd9796a46 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14204 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 22:15:25 +00:00
Chris Lattner
5253f05709 Fix compilation problem on freebsd. Problem noted by Vladimir Merzliakov in
PR371


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14203 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 21:20:52 +00:00
Brian Gaeke
09c1309814 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 19:39:23 +00:00
Chris Lattner
f70c22b019 Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 18:19:28 +00:00
Chris Lattner
5dd04027c7 Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
Delete two functions that are now methods on the Type class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14200 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 18:16:02 +00:00
Chris Lattner
c2616625a3 Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14199 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 17:56:54 +00:00
Misha Brukman
0603079719 Make header comment fit within 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14198 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 15:49:36 +00:00
Misha Brukman
b5a2e40dd8 Since the Great LLVM Tool Renaming(tm), we no longer have collisions between our
assembler/linker and the system equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14197 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 15:39:58 +00:00
Brian Gaeke
802daf8b7d Fix typo in DEBUG printout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14196 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 07:26:52 +00:00
Chris Lattner
aebcce8404 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14195 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-16 06:57:29 +00:00
Brian Gaeke
59108d3d40 Add int ferror(FILE *)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14194 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-16 02:56:40 +00:00
Brian Gaeke
694ffc0850 I'm afraid this doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14193 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-16 00:26:45 +00:00
Brian Gaeke
83a7049270 Um, did someone make a typo or something?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14192 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 23:09:50 +00:00
Chris Lattner
4ee623de0b isnan is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:52:58 +00:00
Chris Lattner
ee98bf5477 llvm.isnan is dead, long live llvm.isunordered!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14190 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:50:46 +00:00
Chris Lattner
4adf066f99 Remove support for llvm.isnan. Alkis wins :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14189 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:48:07 +00:00
Chris Lattner
85a14bb586 This testcase is a bit silly now, but oh well :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:46:16 +00:00
Chris Lattner
be78ac4422 Remove isnan support, correct isunordered support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:42:23 +00:00
Chris Lattner
c45ef6d395 Remove support for the isnan intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14186 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:37:54 +00:00
Chris Lattner
dc5724478e Add basic support for the isunordered intrinsic. The isnan stuff still needs to go
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14185 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:36:44 +00:00
Chris Lattner
5e9a7ca75a Right, stop being silly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14184 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:29:40 +00:00
Chris Lattner
6c07f30dbe Add a nan, stop testing isnan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14183 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:29:01 +00:00
Brian Gaeke
d6a1053745 Fix thinko in visitor... ShiftInsts should currently be delegated
to visitBinaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14182 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:09:46 +00:00