[PATCH] [mips][microMIPS] Implement LWSP and SWSP instructions

Sasa Stankovic Sasa.Stankovic at imgtec.com
Fri Nov 28 04:39:08 PST 2014


================
Comment at: test/MC/Mips/micromips-16-bit-instructions.s:70
@@ -67,1 +69,3 @@
 # CHECK-EB: sw16    $zero, 4($17)   # encoding: [0xe8,0x11]
+# CHECK-EB: lwsp    $3, 32($sp)     # encoding: [0x48,0x68]
+# CHECK-EB: swsp    $4, 124($sp)    # encoding: [0xc8,0x9f]
----------------
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)
sw $4, 124($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.

http://reviews.llvm.org/D6416






More information about the llvm-commits mailing list