Commit Graph

36025 Commits

Author SHA1 Message Date
Daniel Dunbar
6b71653c82 llvm-mc: Add --show-fixups option, for displaying the instruction fixup information in the asm comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 23:00:14 +00:00
Daniel Dunbar
869fe12cc0 MC/X86: Add a dummy implementation of MCFixup generation for hacky X86 MCCodeEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 23:00:03 +00:00
Daniel Dunbar
73c557458c MC: First cut at MCFixup, for getting fixup/relocation information out of an MCCodeEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 22:59:55 +00:00
Bill Wendling
1f8075d7d2 Improve comments in the LSDA somewhat. They can be improved much more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95707 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 22:49:16 +00:00
Johnny Chen
c9745049e6 Added VMRS/VMSR for disassembly only.
A8.6.335 & A8.6.336


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 22:35:38 +00:00
Chris Lattner
a8168ec732 port encoder enhancements over to the new encoder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 21:57:34 +00:00
Chris Lattner
9e8528fc5c fix X86 encoder to output [disp] only addresses with no SIB byte
in X86-32 mode.  This is still required in x86-64 mode to avoid
forming [disp+rip] encoding.  Rewrite the SIB byte decision logic
to be actually understandable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95693 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 21:47:19 +00:00
Eric Christopher
415326b4ed Move Intrinsic::objectsize lowering back to InstCombineCalls and
enable constant 0 offset lowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95691 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 21:24:27 +00:00
Chris Lattner
32f9a2c54e revert r95689: getX86RegNum(BaseReg) != N86::ESP is
a confusing idiom to check for ESP or RSP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 21:21:26 +00:00
Chris Lattner
203efab2a5 simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95689 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 21:00:12 +00:00
Chris Lattner
518bb53485 move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the 
codebase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 19:54:29 +00:00
Jim Grosbach
4152778605 Radar 7417921
tMOVCCi pattern only valid for low registers, as the Thumb1 mov immediate to
register instruction only works with low registers. Allowing high registers
for the instruction resulted in the assembler choosing the wide (32-bit)
encoding for the mov, but LLVM though the instruction was only 16 bits wide,
so offset calculations for constant pools became incorrect, leading to
out of range constant pool entries.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 19:51:37 +00:00
Eric Christopher
d2592ff69b Pull these back out, they're a little too aggressive and time
consuming for a simple optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 17:29:18 +00:00
Johnny Chen
2d658df873 Added vcvtb/vcvtt (between half-precision and single-precision, VFP).
For disassembly only.

A8.6.300


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95669 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 17:21:56 +00:00
Jakob Stoklund Olesen
00350dbd71 Remember to update live-in lists when coalescing physregs.
Patch by M Wahab!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95668 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 17:20:11 +00:00
Chris Lattner
97dce2a9aa move PR3462 to here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95650 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 05:55:14 +00:00
Chris Lattner
1728472726 add a note from PR6194
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 05:45:29 +00:00
Dale Johannesen
d94998f525 Skip DEBUG_VALUE in some places where it was affecting codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 02:01:46 +00:00
Devang Patel
8581e0147c Add declaration attribute to a variable DIE, if there is a separate DIE for the definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:58:33 +00:00
Chris Lattner
e576f292ee simplify this code, duh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:14:06 +00:00
Chris Lattner
e538db4fb0 fix PR6193, only considering sign extensions *from i1* for this
xform.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:12:41 +00:00
Eric Christopher
940ab54755 Add file in here too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:11:03 +00:00
Chris Lattner
30d9a644d5 make -show-inst be formatted a bit nicer. Before:
movl	$3735928559, a          ## inst: <MCInst 1273 <MCOperand Reg:0> <MCOperand Imm:1> <MCOperand Reg:0> <MCOperand Expr:(a)> <MCOperand Reg:0> <MCOperand Expr:(3735928559)>>

after:

	movl	$3735928559, a          ## <MCInst #1273
                                        ##   <MCOperand Reg:0>
                                        ##   <MCOperand Imm:1>
                                        ##   <MCOperand Reg:0>
                                        ##   <MCOperand Expr:(a)>
                                        ##   <MCOperand Reg:0>
                                        ##   <MCOperand Expr:(3735928559)>>





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:54:51 +00:00
Lang Hames
0b23dc0cc8 Fixed a bug in the PBQP allocator's findCoalesces method.
Previously spill registers, whose def indexes are not defined, would sometimes be improperly marked as coalescable with conflicting registers. The new findCoalesces routine conservatively assumes that any register with at least one undefined def is not coalescable with any register it interferes with.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95636 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:50:27 +00:00
Chris Lattner
e16b0fc3cb Implement x86 asm parsing support for %st and %st(4)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:49:22 +00:00
Lang Hames
ddea94a819 Added copy sensible construction & assignment to PBQP graphs and fixed a memory access bug in the heuristic solver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95633 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:45:48 +00:00
Eric Christopher
1926b648e1 Add a new pass to do llvm.objsize lowering using SCEV.
Initial skeleton and SCEVUnknown lowering implemented,
the rest should come relatively quickly.  Move testcase
to new directory.

Move pass to right before SimplifyLibCalls - which is
moved down a bit so we can take advantage of a few opts.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:35:38 +00:00
Chris Lattner
b8d6e98e56 pass stringref by value instead of by const&
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:34:28 +00:00
Chris Lattner
cf031f6d66 move PR6212 to this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:11:10 +00:00
Dan Gohman
5938a3e681 Implement AsmPrinter support for several more operators which have
direct MCExpr equivalents. Don't use MCExpr::Shr because it isn't
consistent between targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 00:02:37 +00:00
Dan Gohman
036c130e90 Document that MCExpr::Mod is actually remainder.
Document that MCExpr::Div, Mod, and the comparison operators are all
signed operators.

Document that the comparison operators' results are target-dependent.

Document that the behavior of shr is target-dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95619 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:58:47 +00:00
Chris Lattner
8609fda0f7 fix some problems handling large vectors reported in PR6230
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:56:03 +00:00
Chris Lattner
c133457269 this is done, tested by CodeGen/ARM/iabs.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:48:10 +00:00
Jim Grosbach
a87ded2695 tighten up eh.setjmp sequence a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95603 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:22:00 +00:00
Chris Lattner
9517554458 now that @GOTOFF is no longer represented as a suffix on a
MCSymbol, we can remove the 'suffix' argument of 
GetBlockAddressSymbol.  Do so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:10:08 +00:00
Chris Lattner
3484110c67 unify the paths for external symbols and global variables:
2 files changed, 48 insertions(+), 83 deletions(-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95599 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:03:41 +00:00
Chris Lattner
8fb2e233a0 switch the rest of the "@ concatentation" logic in the X86
backend to use X86MCTargetExpr, simplifying a bunch of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:52:47 +00:00
Sean Callanan
3bdbdd06c8 Fixed the AT&T AsmLexer to report the proper strings
for register tokens.  Before, if it encountered
'%al,' it would report 'al,' as the token.  Now it
correctly reports '%al'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:50:23 +00:00
Chris Lattner
017ec35e28 switch ELF @GOTOFF references to use X86MCTargetExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95593 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:33:55 +00:00
Dan Gohman
54e72eca0c ConstantFoldConstantExpression can theoretically return the original
expression; don't go into an infinite loop if it does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95591 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:19:11 +00:00
Chris Lattner
25ceb5f317 add an x86 implementation of MCTargetExpr for
representing @GOT and friends.  Use it for
personality references as a first use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95588 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:09:08 +00:00
Chris Lattner
df9c4380ee don't make hte dtor private or we can't construct the class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95587 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:07:36 +00:00
Johnny Chen
15b423f772 Add VCVTR (between floating-point and integer, VFP) for disassembly purpose.
The 'R' suffix means the to-integer operations use the rounding mode specified
by the FPSCR, encoded as Inst{7} = 0.

A8.6.295


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:02:41 +00:00
Dan Gohman
618f17702d When CodeGen'ing unoptimized code, there may be unfolded constant expressions
in global initializers. Instead of aborting, attempt to fold them on the
spot. If folding succeeds, emit the folded expression instead.

This fixes PR6255.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:02:38 +00:00
Dan Gohman
baf0c67988 Add const qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 22:00:06 +00:00
Dale Johannesen
8ac38f2a61 Apply the 95471 fix to SelectionDAGBuilder as well;
we can get in here if FastISel gives up in a block.
(Actually the two copies of this need to be unified.  Later.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95579 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 21:53:27 +00:00
Dan Gohman
c2e93b255e In guaranteed tailcall mode, don't decline the tailcall optimization
for blocks ending in "unreachable".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95565 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 20:34:14 +00:00
Dan Gohman
1797ed50f4 Rename the PerformTailCallOpt variable to GuaranteedTailCallOpt to reflect
its current purpose.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95564 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 20:27:50 +00:00
Johnny Chen
7edd8e38c4 Add VCMP (VFP floating-point compare without 'E' bit set) for disassembly purpose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 19:41:48 +00:00
Chris Lattner
5d917a8952 add scaffolding for target-specific MCExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 19:41:07 +00:00