Commit Graph

37129 Commits

Author SHA1 Message Date
Daniel Dunbar
0180daee02 MC/X86: Rename alternate spellings of {ADD64,CMP64} and mark as "code gen only" so they don't get selected by the asm matcher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98972 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 18:07:48 +00:00
Johnny Chen
81f04d59f6 Renumber LdStExFrm from 28 to 11 and shift the existing format values to make
room for it.  This is in preparation for another patch which is adding NEON
subformats to facilitate disassembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 17:39:00 +00:00
Gabor Greif
cc52ed0c4f back out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 13:50:02 +00:00
Gabor Greif
f4f10e3779 Recommit r80858 again (which has been backed out in r80871).
This time I did a self-hosted bootstrap on Linux x86-64,
with no problems. Let's see how darwin 64-bit self-hosting
goes. At the first sign of failure I'll back this out.

Maybe the valgrind bots give me a hint of what may be wrong
(it at all).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 11:55:53 +00:00
Daniel Dunbar
1a9158c301 MC: Add TargetAsmBackend::createObjectWriter.
- MCAssembler is now object-file independent, although we will surely need more work to fully support ELF/COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98955 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 10:43:26 +00:00
Daniel Dunbar
b36052f0e4 MCCodeEmitter: Add target independent fixup flag for is-pc-relative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 10:43:23 +00:00
Daniel Dunbar
cf871e5abf MC: Sink code emitter into MCAssembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98953 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 10:43:18 +00:00
Daniel Dunbar
2df4ceba15 MC/Mach-O: Move to MachObjectWriter.{h,cpp}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98952 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 10:43:15 +00:00
Daniel Dunbar
cc5b84c6fb MC: Add TargetAsmBackend::isVirtualSection hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98950 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 09:29:03 +00:00
Daniel Dunbar
53b2338a1d MC: Split MCObjectWriter out of MCAssembler.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 09:28:59 +00:00
Daniel Dunbar
bdd9281f35 MCAssembler: Pull out MCObjectWriter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 09:28:55 +00:00
Daniel Dunbar
87190c473c MCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target specific not object writer specific task.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98947 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 09:28:12 +00:00
Daniel Dunbar
b1e98945e4 MC/Mach-O: Lift the fixup evaluation and application up (to the same place), and eliminate MCAsmFixup::FixedValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98944 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 07:09:47 +00:00
Daniel Dunbar
bacba99778 MC/Mach-O: Factor out ExecutePostLayoutBinding, to separate the post-layout changes the object writer may need to make to the assembler from the actual .o writing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98943 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 07:09:33 +00:00
Daniel Dunbar
17a0650641 MC/Mach-O: Lift relocation emission logic a bit higher to separate evaluation / relocation handling from the actual .o writing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98942 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 07:09:18 +00:00
Jeffrey Yasskin
509bcb134d Remove a memory leak from the CBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 07:06:46 +00:00
Chris Lattner
4c42a6de9f fix an MCInstPrinter leak that jyasskin pointed out:
createAsmStreamer now takes ownership of the instprinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98939 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 05:48:53 +00:00
Chris Lattner
60e9eac357 set SDNPVariadic on nodes throughout the rest of the targets that
need them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98937 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 05:33:51 +00:00
Jeffrey Yasskin
c3e45f1ee2 Remove a memory leak from ThumbTargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 05:25:28 +00:00
Chris Lattner
e8cabf3c2e add a new SDNPVariadic SDNP node flag, and use it in
dag isel gen instead of instruction properties.  This
allows the oh-so-useful behavior of matching a variadic
non-root node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 05:07:09 +00:00
Chris Lattner
e9eda0f85d remove some damaged sign extend patterns that can never match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 04:53:47 +00:00
Chris Lattner
2356ae9179 disable some illegal blackfin patterns. sext from i32 to i32 can never
match.  Jakob, please take a look when you get a chance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98931 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 04:53:21 +00:00
Chris Lattner
1d7dbd1716 comment out a bunch of parallel store patterns that apparently
can't match or just have no testcases.  Will remove after 
confirmation from dan that they really are dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 04:14:21 +00:00
Daniel Dunbar
6b7c2cf5d4 Fix -Asserts warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 03:18:23 +00:00
Daniel Dunbar
034843ac8b MC/Mach-O: Add isScatteredFixupFullyResolved, which implements the correct algorithm (used on x86_64) for determining whether an evaluated fixup is fully resolved (doesn't need relocation).
- Test cases will follow, once we have x86_64 relocation support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98926 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 03:18:18 +00:00
Daniel Dunbar
8ad0dccbf2 MC/Mach-O/x86_64: Add getAtom[ForAddress].
- These find the defining symbol which identifies the containing atom for a symbol or address. They are currently very slow, but will be eliminated eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 03:18:15 +00:00
Daniel Dunbar
939f8d7ca2 MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix some corner cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98924 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 03:18:12 +00:00
Daniel Dunbar
2386985663 MC/Mach-O: Factor out isSymbolLinkerVisible method; "linker visible" is a made up term to refer to non-temporary labels + temporary labels in sections-which-require symbols. For Darwin, it corresponds to symbols which effectively define an atom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98923 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 03:18:09 +00:00
Mon P Wang
c1e5d491a0 Fixed a widening bug where we were not using the correct size for the load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98920 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 01:19:52 +00:00
Daniel Dunbar
c28c7689fc X86: Fix encoding for TEST64rr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 01:15:03 +00:00
Anton Korobeynikov
faa75f6e47 FP16 constfolding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98911 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 00:36:35 +00:00
Chris Lattner
e3486a4c9a Now that tblgen can handle matching implicit defs of instructions
to input patterns, we can fix X86ISD::CMP and X86ISD::BT as taking
two inputs (which have to be the same type) and *returning an i32*.
This is how the SDNodes get made in the graph, but we weren't able
to model it this way due to deficiencies in the pattern language.

Now we can change things like this:

 def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP,
-                  [(X86cmp RFP80:$lhs, RFP80:$rhs),
-                   (implicit EFLAGS)]>; // CC = ST(0) cmp ST(i)
+                  [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>;

and fix terrible crimes like this:

-def : Pat<(parallel (X86cmp GR8:$src1, 0), (implicit EFLAGS)),
+def : Pat<(X86cmp GR8:$src1, 0),
           (TEST8rr GR8:$src1, GR8:$src1)>;

This relies on matching the result of TEST8rr (which is EFLAGS, which is
an implicit def) to the result of X86cmp, an i32.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98903 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 00:01:11 +00:00
Bob Wilson
50622ce8cf Update comment to refer to the right filename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98902 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 23:57:57 +00:00
Chris Lattner
de3e05fe33 tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 23:57:57 +00:00
Anton Korobeynikov
341ab138fb Get rid of target-specific fp <-> int nodes when still I'm here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 22:35:45 +00:00
Anton Korobeynikov
f0d500768d Get rid of target-specific nodes for fp16 <-> fp32 conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 22:35:37 +00:00
Anton Korobeynikov
6755d97a62 Refactor Reg-Reg copy emission routine for ARM. This makes cross-regclass copies weirdness more straightforward. Also, add GPR <-> SPR copy support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 22:35:02 +00:00
Eric Christopher
88dee30a6e Couple of changes that Dan mentioned for llvm.stackprotector fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98881 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 21:58:33 +00:00
Daniel Dunbar
9fdac902d4 X86MCCodeEmitter: Fix two minor issues with reloc_riprel_4byte_movq_load, we
were missing it on some movq instructions and were not including the appropriate
PCrel bias.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98880 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 21:53:54 +00:00
Chris Lattner
b7d5226a4e fix some buggy ops concatentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 21:06:54 +00:00
Chris Lattner
6784bdf863 use ins/outs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98866 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 20:55:18 +00:00
Chris Lattner
34b8a8857c outs come before ins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 20:50:06 +00:00
Eric Christopher
07754c2a1b Make fast-isel understand llvm.stackprotector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 20:27:26 +00:00
Bob Wilson
95808328b4 Refactor NEON ld/st instructions to hardcode class arguments that are constants.
No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 20:18:39 +00:00
Daniel Dunbar
f98bc6320b MC/X86/AsmMatcher: Use the new instruction cleanup routine to implement a
temporary workaround for matching inc/dec on x86_64 to the correct instruction.
 - This hack will eventually be replaced with a robust mechanism for handling
   matching instructions based on the available target features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 20:06:02 +00:00
Chris Lattner
618d0ed4bc fix an x86-64 encoding bug Daniel found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 20:04:36 +00:00
Dan Gohman
40b037ef61 Simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98853 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 19:34:33 +00:00
Dan Gohman
9553188fcc Define placement new wrappers for BumpPtrAllocator and
RecyclingAllocator to allow client code to be simpler, and
simplify several clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98847 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 18:49:47 +00:00
Bob Wilson
d1ec31dca5 Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() to
always create a new jump table.  The intention was to avoid merging jump
tables in SelectionDAGBuilder, and to wait for the branch folding pass to
merge tables.  Unfortunately, the same getJumpTableIndex() method is also
used to merge tables in branch folding, so as a result of this change
branch tables are never merged.  Worse, the branch folding code is expecting
getJumpTableIndex to always return the index of an existing table, but with
this change, it never does so.  In at least some cases, e.g., pr6543, this
creates references to non-existent tables.

I've fixed the problem by adding a new createJumpTableIndex function, which
will always create a new table, and I've changed getJumpTableIndex to only
look at existing tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98845 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 18:42:41 +00:00
Chris Lattner
0f53cf2236 add a special relocation type for movq loads for object
files that produce special relocation types where the 
linker changes movq's into lea's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98839 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 18:10:56 +00:00