1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/TableGen
Petr Pavlu 4f9907e752 [TableGen] Improve decoding options for non-orthogonal instructions
When FixedLenDecoder matches an input bitpattern of form [01]+ with an
instruction bitpattern of form [01?]+ (where 0/1 are static bits and ? are
mixed/variable bits) it passes the input bitpattern to a specific instruction
decoder method which then makes a final decision whether the bitpattern is a
valid instruction or not. This means the decoder must handle all possible
values of the variable bits which sometimes leads to opcode rewrites in the
decoder method when the instructions are not fully orthogonal.

The patch provides a way for the decoder method to say that when it returns
Fail it does not necessarily mean the bitpattern is invalid, but rather that
the bitpattern is definitely not an instruction that is recognized by the
decoder method. The decoder can then try to match the input bitpattern with
other possible instruction bitpatterns.

For example, this allows to solve a situation on AArch64 where the `MSR
(immediate)` instruction has form:
1101 0101 0000 0??? 0100 ???? ???1 1111
but not all values of the ? bits are allowed. The rejected values should be
handled by the `extended MSR (register)` instruction:
1101 0101 000? ???? ???? ???? ???? ????

The decoder will first try to decode an input bitpattern that matches both
bitpatterns as `MSR (immediate)` but currently this puts the decoder method of
`MSR (immediate)` into a situation when it must be able to decode all possible
values of the ? bits, i.e. it would need to rewrite the instruction to `MSR
(register)` when it is not `MSR (immediate)`.

The patch allows to specify that the decoder method cannot determine if the
instruction is valid for all variable values. The decoder method can simply
return Fail when it knows it is definitely not `MSR (immediate)`. The decoder
will then backtrack the decoding and find that it can match the input
bitpattern with the more generic `MSR (register)` bitpattern too.

Differential Revision: http://reviews.llvm.org/D7174

llvm-svn: 242274
2015-07-15 08:04:27 +00:00
..
2003-08-03-PassCode.td Remove 6 of XFAIL(s) in llvm/test/TableGen, since r193736. They have been XPASSing. 2013-11-10 14:25:44 +00:00
2006-09-18-LargeInt.td
2010-03-24-PrematureDefaults.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
AnonDefinitionOnDemand.td
AsmPredicateCondsEmission.td Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
BitOffsetDecoder.td Update test case to match minor formatting change introduced in r218563. 2014-09-27 05:36:53 +00:00
BitsInit.td Tablegen fixes for new syntax when initializing bits from variables. 2014-08-29 19:41:04 +00:00
BitsInitOverflow.td
cast.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
ClassInstanceValue.td [TableGen] Fully resolve class-instance values before defs in multiclasses 2014-09-16 17:14:13 +00:00
CStyleComment.td
Dag.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
defmclass.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
DefmInherit.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
DefmInsideMultiClass.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
eq.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
eqbit.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
FieldAccess.td
foreach.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
ForeachList.td llvm/test/TableGen/*Foreach*.td: Remove XFAIL:vg_leak. They have not been failing since r215176. 2014-08-12 14:06:21 +00:00
ForeachLoop.td llvm/test/TableGen/*Foreach*.td: Remove XFAIL:vg_leak. They have not been failing since r215176. 2014-08-12 14:06:21 +00:00
ForwardRef.td
GeneralList.td test/TableGen: Remove XFAIL:vg_leak out of 3 tests corresponding to r208293. 2014-05-09 08:18:33 +00:00
if-empty-list-arg.td Fix error in tablegen when either operand of !if is an empty list. 2014-06-10 20:10:08 +00:00
if.td Change BitsInit to inherit from TypedInit. 2014-08-07 05:47:04 +00:00
ifbit.td Update BitRecTy::convertValue to allow if expressions with bit values on both sides of the if 2014-08-07 05:47:10 +00:00
Include.inc Regression is gone, don't try to find it on clean target. 2007-01-17 07:59:14 +00:00
Include.td Remove 6 of XFAIL(s) in llvm/test/TableGen, since r193736. They have been XPASSing. 2013-11-10 14:25:44 +00:00
IntBitInit.td
intrinsic-long-name.td [TABLEGEN] Do not crash on intrinsics with names longer than 40 characters 2014-07-17 11:23:29 +00:00
intrinsic-order.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
intrinsic-varargs.td Add support for v1i128 type. 2015-04-17 16:11:05 +00:00
LazyChange.td
LetInsideMultiClasses.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
lisp.td test/TableGen: Remove XFAIL:vg_leak out of 3 tests corresponding to r208293. 2014-05-09 08:18:33 +00:00
list-element-bitref.td Change BitsInit to inherit from TypedInit. 2014-08-07 05:47:04 +00:00
ListArgs.td
ListArgsSimple.td
listconcat.td test/TableGen: Remove XFAIL:vg_leak out of 3 tests corresponding to r208293. 2014-05-09 08:18:33 +00:00
ListConversion.td
ListManip.td
ListOfList.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
ListSlices.td
lit.local.cfg
LoLoL.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
math.td Allow binary and for tblgen math. 2014-08-05 09:43:25 +00:00
MultiClass.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
MultiClassDefName.td [TableGen] Resolve complex def names inside multiclasses 2015-05-21 04:32:56 +00:00
MultiClassInherit.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
MultiPat.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
nested-comment.td
NestedForeach.td llvm/test/TableGen/*Foreach*.td: Remove XFAIL:vg_leak. They have not been failing since r215176. 2014-08-12 14:06:21 +00:00
Paste.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
pr8330.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
SetTheory.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
SiblingForeach.td llvm/test/TableGen/*Foreach*.td: Remove XFAIL:vg_leak. They have not been failing since r215176. 2014-08-12 14:06:21 +00:00
Slice.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
strconcat.td [tablegen] !strconcat accepts more than two arguments but this wasn't documented or tested. 2014-05-02 19:25:52 +00:00
String.td
subst2.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
subst.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
SuperSubclassSameName.td
TargetInstrInfo.td
TargetInstrSpec.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
TemplateArgRename.td
Tree.td s/tblgen/llvm-tblgen/g in a few missed places, including the tests 2011-10-06 13:39:59 +00:00
TreeNames.td
trydecode-emission2.td [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
trydecode-emission3.td [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
trydecode-emission.td [TableGen] Improve decoding options for non-orthogonal instructions 2015-07-15 08:04:27 +00:00
TwoLevelName.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
UnsetBitInit.td
UnterminatedComment.td
usevalname.td Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
ValidIdentifiers.td FileCheckize r197869 2013-12-22 03:43:58 +00:00