Commit Graph

2078 Commits

Author SHA1 Message Date
Anders Carlsson
238777eb58 Add a way to emit StringSwitch of clang attribute spellings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116899 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20 01:21:53 +00:00
Oscar Fuentes
f0c55a9b97 Build with RTTI and exceptions disabled. Only in GCC for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-17 02:26:16 +00:00
Jim Grosbach
8abe32af38 ARM mode encoding information for UBFX and SBFX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116588 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-15 17:15:16 +00:00
Jim Grosbach
b3af5de2d9 Refactor the ARM 'setend' instruction pattern. Use a single instruction pattern
and handle the operand explicitly. Flesh out encoding information. Add an
explicit disassembler testcase for the instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 21:00:04 +00:00
Jim Grosbach
b35ad41fef Add ARM mode encoding for [SU]XT[BH] and [SU]XTA[BH] instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 19:56:10 +00:00
Jim Grosbach
5013f7469e Allow targets to optionally specify custom binary encoder functions for
operand values. This is useful for operands which require additional trickery
to encode into the instruction. For example, the ARM shifted immediate and
shifted register operands.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116353 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 22:21:57 +00:00
Cameron Esfahani
519c893c26 Fix spelling error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 00:21:05 +00:00
Jim Grosbach
a1e2194f03 The assert() should reference to machine instr operand number, too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116243 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:41:31 +00:00
Jim Grosbach
1a7233f9d0 Make sure to use the machine instruction operand number. It doesn't always
map one-to-one with the CodeGenInstruction operand number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116238 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:31:22 +00:00
Jim Grosbach
c4bd6fbf4b trailing whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116215 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 19:38:01 +00:00
Jim Grosbach
01855071e2 When figuring out which operands match which encoding fields in an instruction,
try to match them by name first. If there is no by-name match, fall back to
assuming they are in order (this was the previous behavior).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116211 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 18:25:51 +00:00
Jim Grosbach
bb16824dc3 A few 80 column cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116069 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 18:13:57 +00:00
Jim Grosbach
9ed2cee105 trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116068 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 18:09:59 +00:00
Daniel Dunbar
6aa526bf76 Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116030 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 02:07:22 +00:00
Jim Grosbach
bade37bb8b Make <target>CodeEmitter::getBinaryCodeForInstr() a const method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116018 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08 00:21:28 +00:00
Jim Grosbach
0e99219e03 Move checking for t2MOVCCi16 to the right place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115994 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 22:14:01 +00:00
Nick Lewycky
366b1e1f3f Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115986 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 21:55:16 +00:00
Dan Gohman
e4f1a9b8a2 Move tool_output_file into its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 20:32:40 +00:00
Jim Grosbach
8b892ae3d6 trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115923 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 16:56:28 +00:00
Jim Grosbach
a4257162be Allow use of the 16-bit literal move instruction in CMOVs for Thumb2 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115890 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 00:53:56 +00:00
Jim Grosbach
3bbdcea49a Allow use of the 16-bit literal move instruction in CMOVs for ARM mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 00:42:42 +00:00
Jim Grosbach
4fc92e02d7 Now that VDUPfqf and VDUPfdfare properly pseudos, nuke the special handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115841 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 21:17:07 +00:00
Chris Lattner
46f55527d8 Generalize tblgen's dag parsing logic to handle arbitrary expressions
as the operator of the dag.  Specifically, this allows parsing things
like (F.x 4) in addition to just (a 4).

Unfortunately, this runs afoul of an idiom being used by llvmc.  It
is using dags like (foo [1,2,3]) to represent a list of stuff being
passed into foo.  With this change, this is parsed as a [1,2,3] 
subscript on foo instead of being the first argument to the dag.
Cope with this in the short term by requiring a "-llvmc-temp-hack"
argument to tblgen to get the old parsing behavior.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115742 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 04:55:48 +00:00
Chris Lattner
578bcf0e48 cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 04:31:40 +00:00
Chris Lattner
c7252ce743 remove the !nameconcat tblgen feature. It "shorthand" and only used in 4 places
where !cast is just as short.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115722 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 00:19:21 +00:00
Chris Lattner
8d978a75b4 allow !strconcat to take more than two operands to eliminate
!strconcat(!strconcat(!strconcat(!strconcat

Simplify some x86 td files to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115719 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 23:58:18 +00:00
Chris Lattner
c2b0875b8d when david added support for #NAME# he didn't update the comments and
tried (but failed) to artificially constrain it to working with #NAME#.
Just allow any # in identifiers, and update the comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115704 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 22:59:29 +00:00
Chris Lattner
df72eaef3d enhance tblgen to support anonymous defm's, use this to
simplify the X86 CMOVmr's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115702 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 22:51:56 +00:00
Jim Grosbach
9c3aa4d4cd trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 20:35:57 +00:00
Sebastian Redl
2dc91642ec Update attribute reading for the changed source location code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 15:59:36 +00:00
Douglas Gregor
4a12f22773 Properly deserialize Clang types that are used as attribute arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-05 14:51:48 +00:00
Sean Callanan
6aeb2e32b7 Fixed the disassembler to handle two new X86
instruction forms.  Now the ENTER instruction
disassembles correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115573 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 22:45:51 +00:00
Francois Pichet
8ec055dbc8 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01 21:20:39 +00:00
Dale Johannesen
0488fb649a Massive rewrite of MMX:
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.

Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics. 

MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces.  Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.

The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115243 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30 23:57:10 +00:00
Jim Grosbach
ca96a86165 Let a target specify whether it wants an assembly printer to be the MC version
or not. TableGen needs to generate the printInstruction() function as taking
an MCInstr* or a MachineInstr*, depending. Default to the old non-MC
version so that everything not yet using MC continues to just work without
fidding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115126 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30 01:29:54 +00:00
Evan Cheng
3881cb7a5d Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMP
pipeline forwarding path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115098 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 22:42:35 +00:00
Jim Grosbach
9255b8d349 trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115096 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 22:32:50 +00:00
Chris Lattner
b2ef4c1235 add basic avx support to the disassembler, also teach it about ssmem/sdmem
operands.

With this done, we can remove the _Int suffixes from the round instructions
without the disassembler blowing up.  This allows the assembler to support
them, implementing rdar://8456376 - llvm-mc rejects 'roundss'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115019 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 02:57:56 +00:00
Evan Cheng
63d66eed16 Add support to model pipeline bypass / forwarding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115005 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-28 23:50:49 +00:00
Benjamin Kramer
d1e1703c39 Push twines deeper into SourceMgr's error handling methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114847 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 17:42:11 +00:00
Michael J. Spencer
1f40960543 Get rid of pop_macro warnings on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-24 19:48:47 +00:00
Owen Anderson
f523e476c2 Revert r114703 and r114702, removing the isConditionalMove flag from instructions. After further
reflection, this isn't going to achieve the purpose I intended it for.  Back to the drawing board!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23 23:45:25 +00:00
Owen Anderson
5716180b1a Add an TargetInstrDesc bit to indicate that a given instruction is a conditional move.
Not intended functionality change, as nothing uses this yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114702 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23 22:44:10 +00:00
Nate Begeman
8a6e7e1214 Revert r114596, it's breaking a few tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23 16:49:17 +00:00
Nate Begeman
e5cb26fab9 <rdar://problem/8228022> Wvector-conversions warnings in arm_neon.h
Explicitly cast arguments to the type the builtin expects, which is <vN x i8>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-22 22:28:42 +00:00
Chris Lattner
d847bc20b8 Rework passing parent pointers into complexpatterns, I forgot
that complex patterns are matched after the entire pattern has
a structural match, therefore the NodeStack isn't in a useful
state when the actual call to the matcher happens.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 22:00:25 +00:00
Chris Lattner
78d3af47f5 just like they can opt into getting the root of the pattern being
matched, allow ComplexPatterns to opt into getting the parent node
of the operand being matched.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114472 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 20:37:12 +00:00
Chris Lattner
52a261b3c1 fix a long standing wart: all the ComplexPattern's were being
passed the root of the match, even though only a few patterns
actually needed this (one in X86, several in ARM [which should
be refactored anyway], and some in CellSPU that I don't feel 
like detangling).   Instead of requiring all ComplexPatterns to
take the dead root, have targets opt into getting the root by
putting SDNPWantRoot on the ComplexPattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 20:31:19 +00:00
Mikhail Glushenkov
f41b75d85b Trailing whitespace, 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 14:59:50 +00:00
Mikhail Glushenkov
46aa524f0d llvmc: Allow multiple output languages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 14:59:42 +00:00