[llvm] r247698 - [mips][microMIPS] Fix an issue with disassembling lwm32 instruction
Zoran Jovanovic via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 08:21:27 PDT 2015
Author: zjovanovic
Date: Tue Sep 15 10:21:27 2015
New Revision: 247698
URL: http://llvm.org/viewvc/llvm-project?rev=247698&view=rev
Log:
[mips][microMIPS] Fix an issue with disassembling lwm32 instruction
Fixed microMIPS disassembler crash on test case generated by llvm-mc-fuzzer.
Differential Revision: http://reviews.llvm.org/D12881
Modified:
llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
llvm/trunk/test/MC/Disassembler/Mips/micromips.txt
llvm/trunk/test/MC/Disassembler/Mips/micromips_le.txt
Modified: llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp?rev=247698&r1=247697&r2=247698&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/Mips/Disassembler/MipsDisassembler.cpp Tue Sep 15 10:21:27 2015
@@ -1915,7 +1915,7 @@ static DecodeStatus DecodeRegListOperand
uint64_t Address,
const void *Decoder) {
unsigned Regs[] = {Mips::S0, Mips::S1, Mips::S2, Mips::S3, Mips::S4, Mips::S5,
- Mips::S6, Mips::FP};
+ Mips::S6, Mips::S7, Mips::FP};
unsigned RegNum;
unsigned RegLst = fieldFromInstruction(Insn, 21, 5);
Modified: llvm/trunk/test/MC/Disassembler/Mips/micromips.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/Mips/micromips.txt?rev=247698&r1=247697&r2=247698&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/Mips/micromips.txt (original)
+++ llvm/trunk/test/MC/Disassembler/Mips/micromips.txt Tue Sep 15 10:21:27 2015
@@ -241,6 +241,8 @@
0x20 0x44 0x50 0x08 # CHECK: lwm32 $16, $17, 8($4)
+0x21 0x3b 0x59 0x84 # CHECK: lwm32 $16, $17, $18, $19, $20, $21, $22, $23, $fp, -1660($27)
+
0x20 0x44 0xd0 0x08 # CHECK: swm32 $16, $17, 8($4)
0x22 0x04 0x90 0x08 # CHECK: swp $16, 8($4)
Modified: llvm/trunk/test/MC/Disassembler/Mips/micromips_le.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/Mips/micromips_le.txt?rev=247698&r1=247697&r2=247698&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/Mips/micromips_le.txt (original)
+++ llvm/trunk/test/MC/Disassembler/Mips/micromips_le.txt Tue Sep 15 10:21:27 2015
@@ -241,6 +241,8 @@
0x44 0x20 0x08 0x50 # CHECK: lwm32 $16, $17, 8($4)
+0x3b 0x21 0x84 0x59 # CHECK: lwm32 $16, $17, $18, $19, $20, $21, $22, $23, $fp, -1660($27)
+
0x44 0x20 0x08 0xd0 # CHECK: swm32 $16, $17, 8($4)
0x04 0x22 0x08 0x90 # CHECK: swp $16, 8($4)
More information about the llvm-commits
mailing list