opcodes/mips-opc.c has wrong opcodes for the following INSN_LOONGSON_2F / IL2F instructions: madd.ps msub.ps nmadd.ps nmsub.ps The format field (25:21) should be 22 instead of 11. This is probably caused by a documentation error in Loongson2FUserGuide (http://dev.lemote.com/files/resource/documents/Loongson/ls2f/). The table in page 96 shows the format for paired-single is 11, while the table in the page 157 tells it's 22. Based on tests on 2F HW, 22 is the correct one. The bug was originally discovered by Mark H Weaver and reported here: https://groups.google.com/forum/?fromgroups=#!topic/loongson-dev/VZ1yR9Tsr7o
CVSROOT: /cvs/src Module name: src Changes by: rsandifo@sourceware.org 2013-07-25 19:11:39 Modified files: opcodes : mips-opc.c ChangeLog gas/testsuite/gas/mips: loongson-2f.d gas/testsuite : ChangeLog Log message: opcodes/ 2013-07-25 Aaro Koskinen <aaro.koskinen@iki.fi> PR gas/15220 * mips-opc.c (mips_builtin_opcodes): Fix wrong opcodes for Loongson 2F madd.ps, msub.ps, nmadd.ps and nmsub.ps. gas/testsuite/ * gas/mips/loongson-2f.d: Fix expected output for madd.ps, msub.ps, nmadd.ps and nmsub.ps. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/opcodes/mips-opc.c.diff?cvsroot=src&r1=1.107&r2=1.108 http://sourceware.org/cgi-bin/cvsweb.cgi/src/opcodes/ChangeLog.diff?cvsroot=src&r1=1.1998&r2=1.1999 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/mips/loongson-2f.d.diff?cvsroot=src&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2278&r2=1.2279
Patch applied a few months ago, but I forgot to close this.