diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-10-10 18:30:16 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-10-10 18:30:16 +0000 |
commit | a0ed0c0fcdd8b94f741f296a67669da3180fb42c (patch) | |
tree | 177fec1666ed1b0f302cac767893d7cb61f481bf /utils | |
parent | eba564ceace5861a321c230acf5df32e55ed9be5 (diff) |
Insert dummy ED table entries for pseudo-instructions.
The table is indexed by opcode, so simply removing pseudo-instructions
creates a wrong mapping from opcode to table entry.
Add a test case for xorps which has a very high opcode that exposes this
problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/EDEmitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/TableGen/EDEmitter.cpp b/utils/TableGen/EDEmitter.cpp index fa7058c897..6c048dae48 100644 --- a/utils/TableGen/EDEmitter.cpp +++ b/utils/TableGen/EDEmitter.cpp @@ -802,14 +802,14 @@ static void populateInstInfo(CompoundConstantEmitter &infoArray, for (index = 0; index < numInstructions; ++index) { const CodeGenInstruction& inst = *numberedInstructions[index]; + CompoundConstantEmitter *infoStruct = new CompoundConstantEmitter; + infoArray.addEntry(infoStruct); + // We don't need to do anything for pseudo-instructions, as we'll never // see them here. We'll only see real instructions. if (inst.isPseudo) continue; - CompoundConstantEmitter *infoStruct = new CompoundConstantEmitter; - infoArray.addEntry(infoStruct); - LiteralConstantEmitter *instType = new LiteralConstantEmitter; infoStruct->addEntry(instType); |