The bug was that the MIPS32R6/MIPS64R6/microMIPS32R6 versions of LSA and DLSA
(unlike the MSA version) failed to account for the off-by-one encoding of the
immediate. The range is actually 1..4 rather than 0..3.
Depends on D14013
Paths
| Differential D14015
[mips][ias] Range check uimm2 operands and fix a bug this revealed. ClosedPublic Authored by dsanders on Oct 23 2015, 2:45 AM.
Details Summary The bug was that the MIPS32R6/MIPS64R6/microMIPS32R6 versions of LSA and DLSA Depends on D14013
Diff Detail Event TimelineComment Actions Forgot to update the superclasses list for uimmz. The tests passed anyway but dsanders added a child revision: D14016: [mips][ias] Range check uimm3 operands..Oct 23 2015, 3:19 AM vkalintiris edited edge metadata. Comment ActionsLGTM, but make sure that you really want the 2nd assert in getUImmWithOffsetEncoding().
This revision is now accepted and ready to land.Oct 26 2015, 8:49 AM
Revision Contents
Diff 38223 lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/Mips/Disassembler/MipsDisassembler.cpp
lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h
lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
lib/Target/Mips/MicroMips32r6InstrInfo.td
lib/Target/Mips/Mips32r6InstrInfo.td
lib/Target/Mips/Mips64r6InstrInfo.td
lib/Target/Mips/MipsInstrInfo.td
lib/Target/Mips/MipsMSAInstrInfo.td
test/MC/Disassembler/Mips/micromips32r6/valid.txt
test/MC/Disassembler/Mips/mips32r6/valid-mips32r6-el.txt
test/MC/Disassembler/Mips/mips32r6/valid-mips32r6.txt
test/MC/Disassembler/Mips/mips64r6/valid-mips64r6-el.txt
test/MC/Disassembler/Mips/mips64r6/valid-mips64r6.txt
test/MC/Mips/micromips32r6/invalid.s
test/MC/Mips/micromips32r6/valid.s
test/MC/Mips/micromips64r6/invalid.s
test/MC/Mips/mips32r6/invalid.s
test/MC/Mips/mips32r6/valid.s
test/MC/Mips/mips64r6/invalid.s
test/MC/Mips/mips64r6/valid.s
test/MC/Mips/msa/invalid-64.s
test/MC/Mips/msa/invalid.s
|
Split the Error() lines as they are too big.