mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
d999062f31
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 |
||
---|---|---|
.. | ||
bugpoint | ||
buildit | ||
count | ||
crosstool | ||
emacs | ||
FileCheck | ||
FileUpdate | ||
fpcmp | ||
git | ||
git-svn | ||
jedit | ||
kate | ||
KillTheDoctor | ||
lint | ||
lit | ||
llvm-build | ||
llvm-lit | ||
Misc | ||
not | ||
PerfectShuffle | ||
release | ||
TableGen | ||
Target/ARM | ||
testgen | ||
textmate | ||
unittest | ||
valgrind | ||
vim | ||
yaml-bench | ||
check-each-file | ||
clang-parse-diagnostics-file | ||
codegen-diff | ||
countloc.sh | ||
DSAclean.py | ||
DSAextract.py | ||
findmisopt | ||
findoptdiff | ||
findsym.pl | ||
GenLibDeps.pl | ||
GetRepositoryPath | ||
GetSourceVersion | ||
getsrcs.sh | ||
lldbDataFormatters.py | ||
llvm-compilers-check | ||
llvm-native-gcc | ||
llvm-native-gxx | ||
llvm.grm | ||
llvm.natvis | ||
LLVMBuild.txt | ||
llvmdo | ||
llvmgrep | ||
Makefile | ||
makellvm | ||
profile.pl | ||
sort_includes.py | ||
test_debuginfo.pl | ||
UpdateCMakeLists.pl | ||
wciia.py |