[Mips][Disassembler]When disassembler meets load/store from coprocessor 2 instructions for mips r6 it crashes as the access to operands array is out of range. This patch adds dedicated decoder method that properly handles decoding of these instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226652 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vladimir Medic
2015-01-21 10:47:36 +00:00
parent 74670deb21
commit cde587f359
8 changed files with 39 additions and 8 deletions

View File

@@ -138,3 +138,7 @@
0x33 0xfe 0x1d 0x02 # CHECK: tltu $16, $sp, 1016
0x36 0x00 0xd1 0x00 # CHECK: tne $6, $17
0x76 0xdd 0xe8 0x00 # CHECK: tne $7, $8, 885
0x43 0x0d 0xc8 0x49 # CHECK: ldc2 $8, -701($1)
0xb7 0x34 0x52 0x49 # CHECK: lwc2 $18, -841($6)
0x75 0x92 0xf4 0x49 # CHECK: sdc2 $20, 629($18)
0x30 0x81 0x79 0x49 # CHECK: swc2 $25, 304($16)

View File

@@ -138,3 +138,7 @@
0x02 0x1d 0xfe 0x33 # CHECK: tltu $16, $sp, 1016
0x00 0xd1 0x00 0x36 # CHECK: tne $6, $17
0x00 0xe8 0xdd 0x76 # CHECK: tne $7, $8, 885
0x49 0xc8 0x0d 0x43 # CHECK: ldc2 $8, -701($1)
0x49 0x52 0x34 0xb7 # CHECK: lwc2 $18, -841($6)
0x49 0xf4 0x92 0x75 # CHECK: sdc2 $20, 629($18)
0x49 0x79 0x81 0x30 # CHECK: swc2 $25, 304($16)

View File

@@ -17,7 +17,3 @@
0xf8 0x05 0x01 0x00 # CHECK: jialc $5, 256
0xd8 0x05 0x01 0x00 # CHECK: jic $5, 256
0x7c 0xa1 0x04 0x35 # CHECK: pref 1, 8($5)
0x49 0xc8 0x0d 0x43 # CHECK: ldc2 $8, -701($1)
0x49 0x52 0x34 0xb7 # CHECK: lwc2 $18, -841($6)
0x49 0xf4 0x92 0x75 # CHECK: sdc2 $20, 629($18)
0x49 0x79 0x81 0x30 # CHECK: swc2 $25, 304($16)