Fix a bug where an incorrect bit mask would be generated if a target's last asm
string began at a power of 2 in the string index. For example, if "ret" started at position 16, the ret instruction would be assigned code 16, but the mask would be AsmChars[] + Code & 15, not Code & 31. llvm-svn: 49433
This commit is contained in:
parent
a7dfbc0366
commit
a6063118c6
|
@ -536,7 +536,7 @@ void AsmWriterEmitter::run(std::ostream &O) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Figure out how many bits we used for the string index.
|
// Figure out how many bits we used for the string index.
|
||||||
unsigned AsmStrBits = Log2_32_Ceil(MaxStringIdx);
|
unsigned AsmStrBits = Log2_32_Ceil(MaxStringIdx+1);
|
||||||
|
|
||||||
// To reduce code size, we compactify common instructions into a few bits
|
// To reduce code size, we compactify common instructions into a few bits
|
||||||
// in the opcode-indexed table.
|
// in the opcode-indexed table.
|
||||||
|
|
Loading…
Reference in New Issue