llvm-6502/utils
Ulrich Weigand d999062f31 Handle tied sub-operands in AsmMatcherEmitter
The problem this patch addresses is the handling of register tie
constraints in AsmMatcherEmitter, where one operand is tied to a
sub-operand of another operand.  The typical scenario for this to
happen is the tie between the "write-back" register of a pre-inc
instruction, and the base register sub-operand of the memory address
operand of that instruction.

The current AsmMatcherEmitter code attempts to handle tied
operands by emitting the operand as usual first, and emitting
a CVT_Tied node when handling the second (tied) operand.  However,
this really only works correctly if the tied operand does not
have sub-operands (and isn't a sub-operand itself).  Under those
circumstances, a wrong MC operand list is generated.

In discussions with Jim Grosbach, it turned out that the MC operand
list really ought not to contain tied operands in the first place;
instead, it ought to consist of exactly those operands that are
named in the AsmString.  However, getting there requires significant
rework of (some) targets.

This patch fixes the immediate problem, and at the same time makes
one (small) step in the direction of the long-term solution, by
implementing two changes:

1. Restricts the AsmMatcherEmitter handling of tied operands to
   apply solely to simple operands (not complex operands or
   sub-operand of such).

This means that at least we don't get silently corrupt MC operand
lists as output.  However, if we do have tied sub-operands, they
would now no longer be handled at all, except for:

2. If we have an operand that does not occur in the AsmString,
   and also isn't handled as tied operand, simply emit a dummy
   MC operand (constant 0).

This works as long as target code never attempts to access
MC operands that do no not occur in the AsmString (and are
not tied simple operands), which happens to be the case for
all targets where this situation can occur (ARM and PowerPC).

[ Note that this change means that many of the ARM custom
  converters are now superfluous, since the implement the
  same "hack" now performed already by common code. ]

Longer term, we ought to fix targets to never access *any*
MC operand that does not occur in the AsmString (including
tied simple operands), and then finally completely remove
all such operands from the MC operand list.

Patch approved by Jim Grosbach.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180677 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 18:48:23 +00:00
..
bugpoint
buildit Preprocess Apple llvmCore headers to reflect NDEBUG setting. <rdar://12568983> 2013-02-05 22:59:42 +00:00
count
crosstool
emacs
FileCheck Remove SMLoc paired with CHECK-NOT patterns. Not functionality change. 2013-04-25 21:31:34 +00:00
FileUpdate Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
fpcmp
git [utils] Update find-rev utility to take a branch argument (name of the git-svn 2013-01-17 18:57:21 +00:00
git-svn Use 'git svn find-rev' in git-svnrevert instead of shell script fu. 2013-04-26 03:27:39 +00:00
jedit
kate Add the IR attribute 'sspstrong'. 2013-01-23 06:41:41 +00:00
KillTheDoctor Fix grammar-o. 2012-12-11 00:23:07 +00:00
lint
lit lit: Fix infinite recursion when an out-of-tree test root is located inside the source test root. 2013-04-12 19:09:09 +00:00
llvm-build Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
llvm-lit [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests. 2013-01-27 12:20:50 +00:00
Misc
not
PerfectShuffle Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
release
TableGen Handle tied sub-operands in AsmMatcherEmitter 2013-04-27 18:48:23 +00:00
Target/ARM
testgen [MC] bundle alignment: prevent padding instructions from crossing bundle boundaries 2013-01-31 17:00:03 +00:00
textmate Add highlighting for "int" keyword 2013-01-08 16:23:02 +00:00
unittest 'Hexadecimal' has two 'a's and only one 'i'. 2013-02-25 18:11:18 +00:00
valgrind llvm/utils/valgrind/x86_64-pc-linux-gnu.supp: Add /usr/bin/cmp. 2013-01-20 15:30:29 +00:00
vim Enable syntax highlighting for reStructuredText files. 2013-02-28 06:43:24 +00:00
yaml-bench Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
check-each-file
clang-parse-diagnostics-file [utils] Tweak utils/clang-parse-diagnostics-file to ignore autoconf diagnostics. 2012-12-22 00:47:06 +00:00
codegen-diff
countloc.sh
DSAclean.py
DSAextract.py
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
GetRepositoryPath
GetSourceVersion
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check Avoid Unnecessary Builds 2013-01-28 22:05:50 +00:00
llvm-native-gcc
llvm-native-gxx
llvm.grm Unify clang/llvm attributes for asan/tsan/msan (LLVM part) 2013-02-26 06:58:09 +00:00
llvm.natvis A port of the Visual Studio 2012 debugger visualizers for common LLVM and clang datatypes. Patch thanks to Nico Rieck! 2013-01-25 23:37:25 +00:00
LLVMBuild.txt
llvmdo
llvmgrep
Makefile Move yaml2obj to tools too. 2013-04-05 20:00:35 +00:00
makellvm
profile.pl
sort_includes.py Teach sort_includes.py to drop duplicated includes. 2012-12-21 18:00:08 +00:00
test_debuginfo.pl
UpdateCMakeLists.pl
wciia.py