1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

3148 Commits

Author SHA1 Message Date
Cameron Zwarich
02f45a268f Try to fix the MC/AsmParser/section.s failure on the llvm-x86_64-linux-vg_leak
bot. I am not sure if this is valid Valgrind exclusion file syntax, but the
Internet seems to think so.

llvm-svn: 126051
2011-02-19 21:44:35 +00:00
Oscar Fuentes
704198a74e CMake: updated list of tblgen source files.
llvm-svn: 125969
2011-02-18 22:06:23 +00:00
Owen Anderson
a2d2de33c5 Add FixedLenDecoderEmitter, the skeleton of a new disassembler emitter for fixed-length instruction encodings.
A major part of its (eventual) goal is to support a much cleaner separation between disassembly callbacks
provided by the target and the disassembler emitter itself, i.e. not requiring hardcoding of knowledge in tblgen
like the existing disassembly emitters do.

The hope is that some day this will allow us to replace the existing non-Thumb ARM disassembler and remove
some of the hacks the old one introduced to tblgen.

llvm-svn: 125966
2011-02-18 21:51:29 +00:00
Joerg Sonnenberger
adef15e109 Check that MnemonicAlias doesn't map back to the same string.
llvm-svn: 125792
2011-02-17 23:22:19 +00:00
NAKAMURA Takumi
f9affc1dc9 lit/TestingConfig.py: Add the environment variable PRINTF_EXPONENT_DIGITS as workaround [PR6745] for mingw's tests. Danil Malyshev suggested this.
FIXME: It does not improve MSVC's issue.

[Danil Malyshev] Defining PRINTF_EXPONENT_DIGITS env is the suggested way to make MinGW ANSI/POSIX compatible. This is not only about the case we are discussing, but in general, I'd like to have explicitly defined compatibility mode for all the tests running on MinGW.

llvm-svn: 125725
2011-02-17 05:56:41 +00:00
Alexis Hunt
be0782975d Add serialization for Expr* arguments for attributes to clang tablegen files.
Patch thanks to Zach Anderson.

llvm-svn: 125721
2011-02-17 03:30:09 +00:00
Argyrios Kyrtzidis
f19978df28 When tablegen'ing the clang analyzer checkers:
-Use the tablegen class name for the checker class name.
-Mark checker packages as hidden/not hidden.

llvm-svn: 125558
2011-02-15 07:42:16 +00:00
Argyrios Kyrtzidis
c5c3ca71c0 Add the ClangSACheckersEmitter tablegen backend which will be used for the clang static analyzer.
llvm-svn: 125493
2011-02-14 17:58:52 +00:00
Bruno Cardoso Lopes
e65a98b127 Fix encoding and add parsing support for the arm/thumb CPS instruction:
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.

llvm-svn: 125489
2011-02-14 13:09:44 +00:00
Argyrios Kyrtzidis
aded28619c Wrap the struct in an anonymous namespace.
llvm-svn: 125452
2011-02-13 07:51:19 +00:00
Jim Grosbach
c359122d78 AsmMatcher custom operand parser failure enhancements.
Teach the AsmMatcher handling to distinguish between an error custom-parsing
an operand and a failure to match. The former should propogate the error
upwards, while the latter should continue attempting to parse with
alternative matchers.

Update the ARM asm parser accordingly.

llvm-svn: 125426
2011-02-12 01:34:40 +00:00
Jim Grosbach
1ba77f9624 Tidy out asm matcher .inc output.
llvm-svn: 125408
2011-02-11 21:31:55 +00:00
NAKAMURA Takumi
80343d0f2a lit/TestFormats.py: Unittests may be found with suffix .exe also on Cygwin.
llvm-svn: 125273
2011-02-10 09:11:57 +00:00
NAKAMURA Takumi
ce0e9c3c13 lit/Util.py: On Cygwin, 'PATHEXT' may exist but it should not be used.
llvm-svn: 125272
2011-02-10 09:11:48 +00:00
Bill Wendling
bbb31e6663 Don't return before calling the post-processing function(s).
llvm-svn: 125256
2011-02-10 01:28:26 +00:00
Jim Grosbach
48e8554772 Do AsmMatcher operand classification per-opcode.
When matching operands for a candidate opcode match in the auto-generated
AsmMatcher, check each operand against the expected operand match class.
Previously, operands were classified independently of the opcode being
handled, which led to difficulties when operand match classes were
more complicated than simple subclass relationships.

llvm-svn: 125245
2011-02-10 00:08:28 +00:00
Chris Lattner
d24d190214 emit a specific error when the input file is empty. This fixes
an annoyance of mine when working on tests: if the input .ll file
is broken, opt outputs an error and generates an empty file.  FileCheck
then emits its "ooh I couldn't find the first CHECK line, scanning
from ..." which obfuscates the actual problem.

llvm-svn: 125193
2011-02-09 16:46:02 +00:00
NAKAMURA Takumi
658e08c7e9 lit/LitConfig.py: Add the new method getToolsPath(dir,paths,tools).
It seeks tools(eg. [cmp, grep, sed]) in same directory, to be sane.

It seeks "bash" only in the directory found at last time. Or bash would be insane (against other tools).

llvm-svn: 125175
2011-02-09 04:19:15 +00:00
NAKAMURA Takumi
1235bd96fb lit/Util.py: Add two functions, checkToolsPath(dir,tools) and whichTools(tools,paths).
checkToolsPath(dir,tools):
return True if "dir" contains all "tools".

whichTools(tools,paths):
return a directory that contains all "tools" in "paths".
Or return None when all "tools" were not met.

llvm-svn: 125174
2011-02-09 04:19:06 +00:00
NAKAMURA Takumi
5f6161ad2c llvm-lit may be available with CMake.
llvm-svn: 125168
2011-02-09 04:18:02 +00:00
NAKAMURA Takumi
7edb109ae3 llvm-lit may be able to invoke clang tests.
llvm-svn: 125167
2011-02-09 04:17:54 +00:00
Bruno Cardoso Lopes
6ad8313c84 Implement support for custom target specific asm parsing of operands.
Motivation: Improve the parsing of not usual (different from registers or
immediates) operand forms.

This commit implements only the generic support. The ARM specific modifications
will come next.

A table like the one below is autogenerated for every instruction
containing a 'ParserMethod' in its AsmOperandClass

static const OperandMatchEntry OperandMatchTable[20] = {
 /* Mnemonic, Operand List Mask, Operand Class, Features */
 { "cdp", 29 /* 0, 2, 3, 4 */, MCK_Coproc, Feature_IsThumb|Feature_HasV6 },
 { "cdp", 58 /* 1, 3, 4, 5 */, MCK_Coproc, Feature_IsARM },

A matcher function very similar (but lot more naive) to
MatchInstructionImpl scans the table. After the mnemonic match, the
features are checked and if the "to be parsed" operand index is
present in the mask, there's a real match. Then, a switch like the one
below dispatch the parsing to the custom method provided in
'ParseMethod':

 case MCK_Coproc:
   return TryParseCoprocessorOperandName(Operands);

llvm-svn: 125030
2011-02-07 19:38:32 +00:00
Daniel Dunbar
5fb9f9c756 MC/AsmMatcher: Sink ConvertToMCInst into the TargetAsmParser instance, which
implicitly allows custom conversions to be member functions.

llvm-svn: 124908
2011-02-04 23:17:40 +00:00
Jason W Kim
10c1a81736 Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
(yes, this is different from R_ARM_CALL)

- Adds a new method getARMBranchTargetOpValue() which handles the
  necessary distinction between the conditional and unconditional br/bl
  needed for ARM/ELF

At least for ARM mode, the needed fixup for conditional versus unconditional
br/bl is identical, but the ARM docs and existing ARM tools expect this
reloc type...

Added a few FIXME's for future naming fixups in ARMInstrInfo.td

llvm-svn: 124895
2011-02-04 19:47:15 +00:00
Daniel Dunbar
622bb34af8 MC/AsmParser: Add support for allowing the conversion process to fail (via
custom conversion functions).

llvm-svn: 124872
2011-02-04 17:12:23 +00:00
Daniel Dunbar
c89a150d94 MC/AsmMatcher: Add support for custom conversion functions.
llvm-svn: 124870
2011-02-04 17:12:15 +00:00
David Greene
21bfdb7527 Silence uninitialized value warnings.
llvm-svn: 124869
2011-02-04 17:01:53 +00:00
NAKAMURA Takumi
872c15ce42 Make Win32's header file name lower for cross build on case-sensitive filesystem.
llvm-svn: 124864
2011-02-04 12:53:04 +00:00
Jim Grosbach
431e5539ed Tidy up a bit.
llvm-svn: 124832
2011-02-03 23:26:36 +00:00
Oscar Fuentes
51a072b7d8 Changes for building Clang and others using LLVM as an external
library.

Installs tblgen (required by Clang).

Translates handling of user settings and platform-dependant options to
its own file, where it can included by another project.

Installs the .cmake files required by projects like Clang.

llvm-svn: 124816
2011-02-03 20:57:36 +00:00
Kevin Enderby
6c73ff04e4 Changed the TableGen created MatchInstructionImpl() setting of ErrorInfo.
The algorithm for identifying which operand is invalid will now always point to
some operand and not the mnemonic sometimes.  The change is now that ErrorInfo
is the index of the highest operand that does not match for any of the matching
mnemonics records.  And no longer the ~0U value when the mnemonic matches and
not every record with a matching mnemonic has the same mismatching operand
index.

llvm-svn: 124734
2011-02-02 18:20:55 +00:00
Devang Patel
ee65f3c2c3 Update to match changes in lldb interface.
llvm-svn: 124687
2011-02-01 21:47:35 +00:00
David Greene
e563b14e41 [AVX] Implement EnforceSmallerThan for mixed int/fp type lists. This
makes type checking for extract_subvector and insert_subvector more
robust and will allow stricter typechecking of more patterns in the
future.

This change handles int and fp as disjoint sets so that it will
enforce integer types to be smaller than the largest integer type and
fp types to be smaller than the largest fp type.  There is no attempt
to check type sizes across the int/fp sets.

llvm-svn: 124672
2011-02-01 19:12:32 +00:00
Devang Patel
3ff5f6ad2d Tidy up.
llvm-svn: 124605
2011-01-31 21:16:37 +00:00
Devang Patel
bf57c32e2e Focus on arguments for now.
llvm-svn: 124604
2011-01-31 21:15:39 +00:00
Bob Wilson
0b0692bd8d Fix a comment typo.
llvm-svn: 124450
2011-01-27 23:08:52 +00:00
Douglas Gregor
8d44712818 Clang: separate the access-control diagnostics from other diagnostics that do not have SFINAE behavior.
llvm-svn: 124440
2011-01-27 21:06:17 +00:00
Bob Wilson
e93c1add9e Add a MnemonicIsValid method to the asm matcher.
Patch by Bill Wendling.

llvm-svn: 124328
2011-01-26 21:43:46 +00:00
Bob Wilson
6675dea05d Fix spelling of CouldMatchAmbiguouslyWith method name.
llvm-svn: 124324
2011-01-26 21:26:21 +00:00
Bob Wilson
397316f33a Whitespace and 80-column fixes.
llvm-svn: 124323
2011-01-26 21:26:19 +00:00
Bob Wilson
6850ea9790 Improve the AsmMatcher's ability to handle suboperands.
When an operand class is defined with MIOperandInfo set to a list of
suboperands, the AsmMatcher has so far required that operand to also define
a custom ParserMatchClass, and InstAlias patterns have not been able to
set the individual suboperands separately.  This patch removes both of those
restrictions.  If a "compound" operand does not override the default
ParserMatchClass, then the AsmMatcher will now parse its suboperands
separately.  If an InstAlias operand has the same class as the corresponding
compound operand, then it will be handled as before; but if that check fails,
TableGen will now try to match up a sequence of InstAlias operands with the
corresponding suboperands.

llvm-svn: 124314
2011-01-26 19:44:55 +00:00
Devang Patel
fab4616981 - Do not try to print nameless variable's info.
- Print a summary of breakpoints in the beginning.

llvm-svn: 124308
2011-01-26 19:14:14 +00:00
NAKAMURA Takumi
a2cf7854a1 TableGen: PointerLikeRegClass can be accepted to operand.
llvm-svn: 124271
2011-01-26 02:03:48 +00:00
NAKAMURA Takumi
066378440a Fix whitespace.
llvm-svn: 124270
2011-01-26 02:03:37 +00:00
Daniel Dunbar
c07888ef8d tblgen/AsmMatcherEmitter: Fix alias handling to honor -match-prefix.
llvm-svn: 124154
2011-01-24 23:26:31 +00:00
David Greene
1c4fa5e643 [AVX] Add type checking support for vector/subvector type constraints.
This will be used to check patterns referencing a forthcoming
INSERT_SUBVECTOR SDNode.  INSERT_SUBVECTOR in turn is very useful for
matching to VINSERTF128 instructions and complements the already
existing EXTRACT_SUBVECTOR SDNode.

llvm-svn: 124145
2011-01-24 20:53:18 +00:00
Bill Wendling
85fb50d56c ARM uses '.' in their tokens. Give it a name instead of a numeric value.
llvm-svn: 124026
2011-01-22 09:44:32 +00:00
Peter Collingbourne
0f816f75d0 tblgen: Add support for non-inheritable attributes
This patch makes the necessary changes to TableGen to support
non-inheritable attributes.

llvm-svn: 123958
2011-01-21 02:08:26 +00:00
Bob Wilson
959aad8197 Move InstAlias check of argument types to a separate loop.
llvm-svn: 123934
2011-01-20 18:38:10 +00:00
Bob Wilson
7c1ca31c1d Tidy comment.
llvm-svn: 123933
2011-01-20 18:38:07 +00:00