Commit Graph

2867 Commits

Author SHA1 Message Date
Jim Grosbach dba47755a0 Teach PerfectShuffle to not generate files with embedded tab characters.
llvm-svn: 116458
2010-10-14 00:12:49 +00:00
Jim Grosbach 7e72ec6626 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.

llvm-svn: 116432
2010-10-13 21:00:04 +00:00
Jim Grosbach 1e7db68774 Add ARM mode encoding for [SU]XT[BH] and [SU]XTA[BH] instructions.
llvm-svn: 116421
2010-10-13 19:56:10 +00:00
Jim Grosbach 51a12eb11d 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.

llvm-svn: 116353
2010-10-12 22:21:57 +00:00
Michael J. Spencer 65c1c43c13 KillTheDoctor: Fix VS2008 build.
llvm-svn: 116330
2010-10-12 19:27:44 +00:00
Cameron Esfahani a48349f596 Fix spelling error.
llvm-svn: 116282
2010-10-12 00:21:05 +00:00
Jim Grosbach e61de930bc The assert() should reference to machine instr operand number, too.
llvm-svn: 116243
2010-10-11 21:41:31 +00:00
Jim Grosbach 11ced671be Make sure to use the machine instruction operand number. It doesn't always
map one-to-one with the CodeGenInstruction operand number.

llvm-svn: 116238
2010-10-11 21:31:22 +00:00
Michael J. Spencer 279362dd5a Add KillTheDoctor.
llvm-svn: 116216
2010-10-11 19:55:38 +00:00
Jim Grosbach 806b139bbc trailing whitespace cleanup
llvm-svn: 116215
2010-10-11 19:38:01 +00:00
Jim Grosbach 191ad7c473 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).

llvm-svn: 116211
2010-10-11 18:25:51 +00:00
Chris Lattner 1ef5e84c31 Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116190
2010-10-11 05:44:40 +00:00
Michael J. Spencer 9cc3fcc8ec syntax-highlighting: Fix module asm keyword.
llvm-svn: 116152
2010-10-09 15:44:36 +00:00
Michael J. Spencer 3431778a2b Add Kate syntax highlighting files.
llvm-svn: 116146
2010-10-09 07:11:04 +00:00
Jim Grosbach b75d0ca38e A few 80 column cleanups
llvm-svn: 116069
2010-10-08 18:13:57 +00:00
Jim Grosbach 2f0be8f404 trailing whitespace
llvm-svn: 116068
2010-10-08 18:09:59 +00:00
Daniel Dunbar ba66a81017 Fix -Asserts warning.
llvm-svn: 116030
2010-10-08 02:07:22 +00:00
Jim Grosbach a7b6d58f45 Make <target>CodeEmitter::getBinaryCodeForInstr() a const method.
llvm-svn: 116018
2010-10-08 00:21:28 +00:00
Jim Grosbach 33c1eb16e8 Move checking for t2MOVCCi16 to the right place.
llvm-svn: 115994
2010-10-07 22:14:01 +00:00
Nick Lewycky 1e00173d20 Fix typo in comment.
llvm-svn: 115986
2010-10-07 21:55:16 +00:00
Dan Gohman 0df7ea4c24 Move tool_output_file into its own file.
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
Michael J. Spencer d4b62765a7 gtest: Fix warnings on MinGW.
llvm-svn: 115945
2010-10-07 18:29:44 +00:00
Michael J. Spencer 33a390e2ca CMake: Fix warning in gtest.
llvm-svn: 115935
2010-10-07 18:12:54 +00:00
Jim Grosbach daab660fb1 trailing whitespace
llvm-svn: 115923
2010-10-07 16:56:28 +00:00
Jim Grosbach 5b255c2dd6 Allow use of the 16-bit literal move instruction in CMOVs for Thumb2 mode.
llvm-svn: 115890
2010-10-07 00:53:56 +00:00
Jim Grosbach 742adc328a Allow use of the 16-bit literal move instruction in CMOVs for ARM mode.
llvm-svn: 115884
2010-10-07 00:42:42 +00:00
Jim Grosbach b270f28c1a Now that VDUPfqf and VDUPfdfare properly pseudos, nuke the special handling.
llvm-svn: 115841
2010-10-06 21:17:07 +00:00
Chris Lattner 28f034c21a 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.

llvm-svn: 115742
2010-10-06 04:55:48 +00:00
Chris Lattner e76cfcf8a8 cleanups
llvm-svn: 115739
2010-10-06 04:31:40 +00:00
Chris Lattner 9402633637 remove the !nameconcat tblgen feature. It "shorthand" and only used in 4 places
where !cast is just as short.

llvm-svn: 115722
2010-10-06 00:19:21 +00:00
Chris Lattner 61ea00b494 allow !strconcat to take more than two operands to eliminate
!strconcat(!strconcat(!strconcat(!strconcat

Simplify some x86 td files to use it.

llvm-svn: 115719
2010-10-05 23:58:18 +00:00
Chris Lattner b8ff8f0cb6 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.

llvm-svn: 115704
2010-10-05 22:59:29 +00:00
Chris Lattner 7538ed80a9 enhance tblgen to support anonymous defm's, use this to
simplify the X86 CMOVmr's.

llvm-svn: 115702
2010-10-05 22:51:56 +00:00
Jim Grosbach c1526595b3 trailing whitespace
llvm-svn: 115664
2010-10-05 20:35:57 +00:00
Sebastian Redl c4abc7036d Update attribute reading for the changed source location code.
llvm-svn: 115624
2010-10-05 15:59:36 +00:00
Douglas Gregor 9ddb678d45 Properly deserialize Clang types that are used as attribute arguments
llvm-svn: 115616
2010-10-05 14:51:48 +00:00
Sean Callanan 8d302b2e71 Fixed the disassembler to handle two new X86
instruction forms.  Now the ENTER instruction
disassembles correctly.

llvm-svn: 115573
2010-10-04 22:45:51 +00:00
Chris Lattner 50774e8fa7 remove reference to dead script.
llvm-svn: 115413
2010-10-02 18:49:27 +00:00
Chris Lattner 250ecf0e00 nuke an old script
llvm-svn: 115412
2010-10-02 18:44:23 +00:00
Francois Pichet 8cbc86e912 Fix MSVC release mode compilation error.
llvm-svn: 115407
2010-10-02 03:26:54 +00:00
Francois Pichet 77339c7c98 Fix typo
llvm-svn: 115348
2010-10-01 21:20:39 +00:00
Dale Johannesen dd224d2333 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.

llvm-svn: 115243
2010-09-30 23:57:10 +00:00
Jim Grosbach 4a57b76eea 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.

llvm-svn: 115126
2010-09-30 01:29:54 +00:00
Evan Cheng 4a010fd1ea Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMP
pipeline forwarding path.

llvm-svn: 115098
2010-09-29 22:42:35 +00:00
Jim Grosbach a5497345ad trailing whitespace
llvm-svn: 115096
2010-09-29 22:32:50 +00:00
Duncan Sands e9da6db67f Convert a bunch of uses of 'bytecode' into 'bitcode'. This
is not everything, but the remaining cases are less trivial.

llvm-svn: 115080
2010-09-29 20:09:55 +00:00
Daniel Dunbar 8211d31055 GetSourceVersion: Strip off svninfo extra markers, which aren't really part of the version.
llvm-svn: 115074
2010-09-29 19:30:17 +00:00
Daniel Dunbar afd363e65b utils: Add GetRepositoryPath script, patch by Jonathan Mulder!
- Also, fix indention in GetSourceVersion while in the area.

llvm-svn: 115048
2010-09-29 17:57:01 +00:00
Daniel Dunbar a9dd1998cc lit: Fix a subtle resource usage bug when executing tests using the internal
shell runner.

We would inadvertently end up holding on to handles to the temporary files
longer than we should have been. On Win32, where open handles lock some file
operations, this caused problems in tests which would try to move temporary
files around (as Clang does by default now).

Many thanks to Francois Pichet for the excellent detective work on this.

llvm-svn: 115040
2010-09-29 15:59:37 +00:00
Chris Lattner f60062fd55 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'

llvm-svn: 115019
2010-09-29 02:57:56 +00:00