mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Fix case where identical cases were not detected across case #0, because
instructions not handled would have a case value of #0, throwing things off. This marginally shrinks the X86 asmprinter, but shrinks the sparc asmwriter by 25 lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29187 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
31e773147b
commit
195bb4a7b0
@ -332,7 +332,7 @@ void AsmWriterEmitter::
|
||||
FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
|
||||
std::vector<unsigned> &InstIdxs,
|
||||
std::vector<unsigned> &InstOpsUsed) const {
|
||||
InstIdxs.assign(NumberedInstructions.size(), 0);
|
||||
InstIdxs.assign(NumberedInstructions.size(), ~0U);
|
||||
|
||||
// This vector parallels UniqueOperandCommands, keeping track of which
|
||||
// instructions each case are used for. It is a comma separated string of
|
||||
@ -551,7 +551,8 @@ void AsmWriterEmitter::run(std::ostream &O) {
|
||||
// Otherwise, we can include this in the initial lookup table. Add it in.
|
||||
BitsLeft -= NumBits;
|
||||
for (unsigned i = 0, e = InstIdxs.size(); i != e; ++i)
|
||||
OpcodeInfo[i] |= InstIdxs[i] << (BitsLeft+AsmStrBits);
|
||||
if (InstIdxs[i] != ~0U)
|
||||
OpcodeInfo[i] |= InstIdxs[i] << (BitsLeft+AsmStrBits);
|
||||
|
||||
// Remove the info about this operand.
|
||||
for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user