Browse Source
Before commit:
commit 2438b771ee
Date: Wed Nov 2 15:53:43 2022 +0000
opcodes/mips: use .word/.short for undefined instructions
unknown 32-bit microMIPS instructions were disassembled as a raw
32-bit number with no '.word' directive. The above commit changed
this and added a '.word' directive before the 32-bit number.
It was pointed out on the mailing list, that for microMIPS it would be
better to display such 32-bit instructions using a '.short' directive
followed by two 16-bit values.
This commit updates the mips disassembler to do this, and adds a new
test that validates this output.
users/aburgess/try-core-file-pid0
6 changed files with 41 additions and 5 deletions
@ -0,0 +1,5 @@ |
|||
#PROG: objcopy |
|||
#objdump: -d --prefix-addresses --show-raw-insn |
|||
#name: microMIPS source file contains reserved encoding (n32) |
|||
#source: micromips-reserved-enc.s |
|||
#dump: micromips-reserved-enc-o32.d |
|||
@ -0,0 +1,5 @@ |
|||
#PROG: objcopy |
|||
#objdump: -d --prefix-addresses --show-raw-insn |
|||
#name: microMIPS source file contains reserved encoding (n64) |
|||
#source: micromips-reserved-enc.s |
|||
#dump: micromips-reserved-enc-o32.d |
|||
@ -0,0 +1,10 @@ |
|||
#PROG: objcopy |
|||
#objdump: -d --prefix-addresses --show-raw-insn |
|||
#name: microMIPS source file contains reserved encoding (o32) |
|||
#source: micromips-reserved-enc.s |
|||
|
|||
.*: +file format .*mips.* |
|||
|
|||
Disassembly of section \.text: |
|||
[0-9a-f]+ <[^>]*> 7f6e 5d4c \.short 0x7f6e, 0x5d4c |
|||
\.\.\. |
|||
@ -0,0 +1,9 @@ |
|||
.module mips64r3 |
|||
.module micromips |
|||
foo: |
|||
.insn |
|||
.short 0x7f6e, 0x5d4c |
|||
|
|||
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ... |
|||
.align 4, 0 |
|||
.space 16 |
|||
Loading…
Reference in new issue