Implement microMIPS 16-bit LWSP and SWSP instructions.
|70 ↗||(On Diff #16704)|
This is another case where there is a difference between microMIPS reference documentation and gas. gas doesn't support lwsp and swsp mnemonics. gas emits these two encodings (0x4868 and 0xc89f ) when assembling following two instructions
lw $3, 32($sp)
I suggest that you (at least for now) print these instructions using the mnemonics that gas supports, and add a comment in the patch that this problem exists.
This patch doesn't correctly handle the case when (offset % 4) != 0. For example, for the following instruction
instead of emitting 32-bit "lw v1,123(sp)" the patch emits 16-bit "lw v1,120(sp)"
Please include this instruction in the tests.