aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMark Shinwell <shinwell@codesourcery.com>2007-11-29 12:23:44 +0000
committerMark Shinwell <shinwell@codesourcery.com>2007-11-29 12:23:44 +0000
commit350cc38db21f1cd651a6d46687542a0fce5e0303 (patch)
tree5de2f0d3f0c74b6dbd77e1033b12e091848a19d5 /gas
parent569502941afa825c5278b320ccedeefc82e8ed0e (diff)
downloadgdb-350cc38db21f1cd651a6d46687542a0fce5e0303.zip
gdb-350cc38db21f1cd651a6d46687542a0fce5e0303.tar.gz
gdb-350cc38db21f1cd651a6d46687542a0fce5e0303.tar.bz2
bfd/
* archures.c (bfd_mach_mips_loongson_2e): New. (bfd_mach_mips_loongson_2f): New. * bfd-in2.h (bfd_mach_mips_loongson_2e): New. (bfd_mach_mips_loongson_2f): New. * cpu-mips.c: Add I_loongson_2e and I_loongson_2f to anonymous enum. (arch_info_struct): Add Loongson-2E and Loongson-2F entries. * elfxx-mips.c (_bfd_elf_mips_mach): Handle Loongson-2E and Loongson-2F flags. (mips_set_isa_flags): Likewise. (mips_mach_extensions): Add Loongson-2E and Loongson-2F entries. binutils/ * readelf.c (get_machine_flags): Handle Loongson-2E and -2F flags. gas/ * config/tc-mips.c (mips_cpu_info_table): Add loongson2e and loongson2f entries. * doc/c-mips.texi: Document -march=loongson{2e,2f} options. gas/testsuite/ * gas/mips/mips.exp: Add loongson-2e and -2f tests. * gas/mips/loongson-2e.d: New. * gas/mips/loongson-2e.s: New. * gas/mips/loongson-2f.d: New. * gas/mips/loongson-2f.s: New. include/elf/ * mips.h (E_MIPS_MACH_LS2E): New. (E_MIPS_MACH_LS2F): New. include/opcode/ * mips.h (INSN_LOONGSON_2E): New. (INSN_LOONGSON_2F): New. (CPU_LOONGSON_2E): New. (CPU_LOONGSON_2F): New. (OPCODE_IS_MEMBER): Update for Loongson-2E and -2F flags. opcodes/ * mips-dis.c (mips_arch_choices): Add Loongson-2E and -2F entries. * mips-opc.c (IL2E): New. (IL2F): New. (mips_builtin_opcodes): Add Loongson-2E and -2F instructions. Allow movz and movn for Loongson-2E and -2F. Add movnz entry. Move coprocessor encodings to the end of the table. Allow certain MIPS V .ps instructions on the Loongson-2E and -2F.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c4
-rw-r--r--gas/doc/c-mips.texi4
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/mips/loongson-2e.d150
-rw-r--r--gas/testsuite/gas/mips/loongson-2e.s144
-rw-r--r--gas/testsuite/gas/mips/loongson-2f.d150
-rw-r--r--gas/testsuite/gas/mips/loongson-2f.s144
-rw-r--r--gas/testsuite/gas/mips/mips.exp3
9 files changed, 610 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9d32ba2..1750ea3 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-29 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-mips.c (mips_cpu_info_table): Add loongson2e
+ and loongson2f entries.
+ * doc/c-mips.texi: Document -march=loongson{2e,2f} options.
+
2007-11-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
* config/tc-s390.c (md_begin): If the -mesa option is specified
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index dfc1646..7a88608 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -14823,6 +14823,10 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
{ "sb1a", MIPS_CPU_ASE_MIPS3D | MIPS_CPU_ASE_MDMX,
ISA_MIPS64, CPU_SB1 },
+ /* ST Microelectronics Loongson 2E and 2F cores */
+ { "loongson2e", 0, ISA_MIPS3, CPU_LOONGSON_2E },
+ { "loongson2f", 0, ISA_MIPS3, CPU_LOONGSON_2F },
+
/* End marker */
{ NULL, 0, 0, 0 }
};
diff --git a/gas/doc/c-mips.texi b/gas/doc/c-mips.texi
index 9f19726..e6fe033 100644
--- a/gas/doc/c-mips.texi
+++ b/gas/doc/c-mips.texi
@@ -270,7 +270,9 @@ m4kp,
20kc,
25kf,
sb1,
-sb1a
+sb1a,
+loongson2e,
+loongson2f
@end quotation
For compatibility reasons, @samp{@var{n}x} and @samp{@var{b}fx} are
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 47dba46..266c88d 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-29 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-mips.c (mips_cpu_info_table): Add loongson2e
+ and loongson2f entries.
+ * doc/c-mips.texi: Document -march=loongson{2e,2f} options.
+
2007-11-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
* gas/s390/esa-z9-109.d: Add check for old version of sske.
diff --git a/gas/testsuite/gas/mips/loongson-2e.d b/gas/testsuite/gas/mips/loongson-2e.d
new file mode 100644
index 0000000..59bf099
--- /dev/null
+++ b/gas/testsuite/gas/mips/loongson-2e.d
@@ -0,0 +1,150 @@
+#as: -march=loongson2e -mabi=o64
+#objdump: -M reg-names=numeric -dr
+#name: ST Microelectronics Loongson-2E tests
+
+.*: file format .*
+
+Disassembly of section .text:
+
+[0-9a-f]+ <movz_insns>:
+.*: 0064100a movz \$2,\$3,\$4
+.*: 0064100b movn \$2,\$3,\$4
+.*: 0064100b movn \$2,\$3,\$4
+
+[0-9a-f]+ <integer_insns>:
+.*: 7c641018 mult.g \$2,\$3,\$4
+.*: 7cc72819 multu.g \$5,\$6,\$7
+.*: 7d2a401c dmult.g \$8,\$9,\$10
+.*: 7d8d581d dmultu.g \$11,\$12,\$13
+.*: 7df0701a div.g \$14,\$15,\$16
+.*: 7e53881b divu.g \$17,\$18,\$19
+.*: 7eb6a01e ddiv.g \$20,\$21,\$22
+.*: 7f19b81f ddivu.g \$23,\$24,\$25
+.*: 7f7cd022 mod.g \$26,\$27,\$28
+.*: 7fdfe823 modu.g \$29,\$30,\$31
+.*: 7c641026 dmod.g \$2,\$3,\$4
+.*: 7cc72827 dmodu.g \$5,\$6,\$7
+
+[0-9a-f]+ <fpu_insns>:
+.*: 46020818 madd.s \$f0,\$f1,\$f2
+.*: 462520d8 madd.d \$f3,\$f4,\$f5
+.*: 45683998 madd.ps \$f6,\$f7,\$f8
+.*: 460b5259 msub.s \$f9,\$f10,\$f11
+.*: 462e6b19 msub.d \$f12,\$f13,\$f14
+.*: 457183d9 msub.ps \$f15,\$f16,\$f17
+.*: 46149c9a nmadd.s \$f18,\$f19,\$f20
+.*: 4637b55a nmadd.d \$f21,\$f22,\$f23
+.*: 457ace1a nmadd.ps \$f24,\$f25,\$f26
+.*: 461de6db nmsub.s \$f27,\$f28,\$f29
+.*: 4622081b nmsub.d \$f0,\$f1,\$f2
+.*: 456520db nmsub.ps \$f3,\$f4,\$f5
+
+[0-9a-f]+ <simd_insns>:
+.*: 47420802 packsshb \$f0,\$f1,\$f2
+.*: 472520c2 packsswh \$f3,\$f4,\$f5
+.*: 47683982 packushb \$f6,\$f7,\$f8
+.*: 47cb5240 paddb \$f9,\$f10,\$f11
+.*: 474e6b00 paddh \$f12,\$f13,\$f14
+.*: 477183c0 paddw \$f15,\$f16,\$f17
+.*: 47f49c80 paddd \$f18,\$f19,\$f20
+.*: 4797b540 paddsb \$f21,\$f22,\$f23
+.*: 471ace00 paddsh \$f24,\$f25,\$f26
+.*: 47bde6c0 paddusb \$f27,\$f28,\$f29
+.*: 47220800 paddush \$f0,\$f1,\$f2
+.*: 47e520c2 pandn \$f3,\$f4,\$f5
+.*: 46683980 pavgb \$f6,\$f7,\$f8
+.*: 464b5240 pavgh \$f9,\$f10,\$f11
+.*: 46ce6b01 pcmpeqb \$f12,\$f13,\$f14
+.*: 469183c1 pcmpeqh \$f15,\$f16,\$f17
+.*: 46549c81 pcmpeqw \$f18,\$f19,\$f20
+.*: 46f7b541 pcmpgtb \$f21,\$f22,\$f23
+.*: 46bace01 pcmpgth \$f24,\$f25,\$f26
+.*: 467de6c1 pcmpgtw \$f27,\$f28,\$f29
+.*: 45c20802 pextrh \$f0,\$f1,\$f2
+.*: 478520c3 pinsrh_0 \$f3,\$f4,\$f5
+.*: 47a83983 pinsrh_1 \$f6,\$f7,\$f8
+.*: 47cb5243 pinsrh_2 \$f9,\$f10,\$f11
+.*: 47ee6b03 pinsrh_3 \$f12,\$f13,\$f14
+.*: 45f183c2 pmaddhw \$f15,\$f16,\$f17
+.*: 46949c80 pmaxsh \$f18,\$f19,\$f20
+.*: 46d7b540 pmaxub \$f21,\$f22,\$f23
+.*: 46bace00 pminsh \$f24,\$f25,\$f26
+.*: 46fde6c0 pminub \$f27,\$f28,\$f29
+.*: 46a00805 pmovmskb \$f0,\$f1
+.*: 46e41882 pmulhuh \$f2,\$f3,\$f4
+.*: 46a73142 pmulhh \$f5,\$f6,\$f7
+.*: 468a4a02 pmullh \$f8,\$f9,\$f10
+.*: 46cd62c2 pmuluw \$f11,\$f12,\$f13
+.*: 45b07b81 pasubub \$f14,\$f15,\$f16
+.*: 46809445 biadd \$f17,\$f18
+.*: 4715a4c2 pshufh \$f19,\$f20,\$f21
+.*: 4678bd82 psllh \$f22,\$f23,\$f24
+.*: 465bd642 psllw \$f25,\$f26,\$f27
+.*: 46beef03 psrah \$f28,\$f29,\$f30
+.*: 46820803 psraw \$f0,\$f1,\$f2
+.*: 466520c3 psrlh \$f3,\$f4,\$f5
+.*: 46483983 psrlw \$f6,\$f7,\$f8
+.*: 47cb5241 psubb \$f9,\$f10,\$f11
+.*: 474e6b01 psubh \$f12,\$f13,\$f14
+.*: 477183c1 psubw \$f15,\$f16,\$f17
+.*: 47f49c81 psubd \$f18,\$f19,\$f20
+.*: 4797b541 psubsb \$f21,\$f22,\$f23
+.*: 471ace01 psubsh \$f24,\$f25,\$f26
+.*: 47bde6c1 psubusb \$f27,\$f28,\$f29
+.*: 47220801 psubush \$f0,\$f1,\$f2
+.*: 476520c3 punpckhbh \$f3,\$f4,\$f5
+.*: 47283983 punpckhhw \$f6,\$f7,\$f8
+.*: 46eb5243 punpckhwd \$f9,\$f10,\$f11
+.*: 474e6b03 punpcklbh \$f12,\$f13,\$f14
+.*: 471183c3 punpcklhw \$f15,\$f16,\$f17
+.*: 46d49c83 punpcklwd \$f18,\$f19,\$f20
+
+[0-9a-f]+ <fixed_point_insns>:
+.*: 45c20800 add \$f0,\$f1,\$f2
+.*: 458520c0 addu \$f3,\$f4,\$f5
+.*: 45e83980 dadd \$f6,\$f7,\$f8
+.*: 45cb5241 sub \$f9,\$f10,\$f11
+.*: 458e6b01 subu \$f12,\$f13,\$f14
+.*: 45f183c1 dsub \$f15,\$f16,\$f17
+.*: 45b49c80 or \$f18,\$f19,\$f20
+.*: 4597b542 sll \$f21,\$f22,\$f23
+.*: 45bace02 dsll \$f24,\$f25,\$f26
+.*: 479de6c2 xor \$f27,\$f28,\$f29
+.*: 47a20802 nor \$f0,\$f1,\$f2
+.*: 47c520c2 and \$f3,\$f4,\$f5
+.*: 45883983 srl \$f6,\$f7,\$f8
+.*: 45ab5243 dsrl \$f9,\$f10,\$f11
+.*: 45ce6b03 sra \$f12,\$f13,\$f14
+.*: 45f183c3 dsra \$f15,\$f16,\$f17
+.*: 46939032 sequ \$f18,\$f19
+.*: 4695a03c sltu \$f20,\$f21
+.*: 4697b03e sleu \$f22,\$f23
+.*: 46b9c032 seq \$f24,\$f25
+.*: 46bbd03c slt \$f26,\$f27
+.*: 46bde03e sle \$f28,\$f29
+
+[0-9a-f]+ <mips5_ps_insns>:
+.*: 45601005 abs.ps \$f0,\$f2
+.*: 45662080 add.ps \$f2,\$f4,\$f6
+.*: 456a4032 c.eq.ps \$f8,\$f10
+.*: 456a4030 c.f.ps \$f8,\$f10
+.*: 456a403e c.le.ps \$f8,\$f10
+.*: 456a403c c.lt.ps \$f8,\$f10
+.*: 456a403d c.nge.ps \$f8,\$f10
+.*: 456a403b c.ngl.ps \$f8,\$f10
+.*: 456a4039 c.ngle.ps \$f8,\$f10
+.*: 456a403f c.ngt.ps \$f8,\$f10
+.*: 456a4036 c.ole.ps \$f8,\$f10
+.*: 456a4034 c.olt.ps \$f8,\$f10
+.*: 456a403a c.seq.ps \$f8,\$f10
+.*: 456a4038 c.sf.ps \$f8,\$f10
+.*: 456a4033 c.ueq.ps \$f8,\$f10
+.*: 456a4037 c.ule.ps \$f8,\$f10
+.*: 456a4035 c.ult.ps \$f8,\$f10
+.*: 456a4031 c.un.ps \$f8,\$f10
+.*: 4560d606 mov.ps \$f24,\$f26
+.*: 45662082 mul.ps \$f2,\$f4,\$f6
+.*: 45604187 neg.ps \$f6,\$f8
+.*: 457ac581 sub.ps \$f22,\$f24,\$f26
+#pass
+
diff --git a/gas/testsuite/gas/mips/loongson-2e.s b/gas/testsuite/gas/mips/loongson-2e.s
new file mode 100644
index 0000000..ceca517
--- /dev/null
+++ b/gas/testsuite/gas/mips/loongson-2e.s
@@ -0,0 +1,144 @@
+ .text
+ .set noreorder
+
+movz_insns:
+ movz $2, $3, $4
+ movnz $2, $3, $4
+ movn $2, $3, $4
+
+integer_insns:
+ mult.g $2, $3, $4
+ multu.g $5, $6, $7
+ dmult.g $8, $9, $10
+ dmultu.g $11, $12, $13
+ div.g $14, $15, $16
+ divu.g $17, $18, $19
+ ddiv.g $20, $21, $22
+ ddivu.g $23, $24, $25
+ mod.g $26, $27, $28
+ modu.g $29, $30, $31
+ dmod.g $2, $3, $4
+ dmodu.g $5, $6, $7
+
+fpu_insns:
+ madd.s $f0, $f1, $f2
+ madd.d $f3, $f4, $f5
+ madd.ps $f6, $f7, $f8
+ msub.s $f9, $f10, $f11
+ msub.d $f12, $f13, $f14
+ msub.ps $f15, $f16, $f17
+ nmadd.s $f18, $f19, $f20
+ nmadd.d $f21, $f22, $f23
+ nmadd.ps $f24, $f25, $f26
+ nmsub.s $f27, $f28, $f29
+ nmsub.d $f0, $f1, $f2
+ nmsub.ps $f3, $f4, $f5
+
+simd_insns:
+ packsshb $f0, $f1, $f2
+ packsswh $f3, $f4, $f5
+ packushb $f6, $f7, $f8
+ paddb $f9, $f10, $f11
+ paddh $f12, $f13, $f14
+ paddw $f15, $f16, $f17
+ paddd $f18, $f19, $f20
+ paddsb $f21, $f22, $f23
+ paddsh $f24, $f25, $f26
+ paddusb $f27, $f28, $f29
+ paddush $f0, $f1, $f2
+ pandn $f3, $f4, $f5
+ pavgb $f6, $f7, $f8
+ pavgh $f9, $f10, $f11
+ pcmpeqb $f12, $f13, $f14
+ pcmpeqh $f15, $f16, $f17
+ pcmpeqw $f18, $f19, $f20
+ pcmpgtb $f21, $f22, $f23
+ pcmpgth $f24, $f25, $f26
+ pcmpgtw $f27, $f28, $f29
+ pextrh $f0, $f1, $f2
+ pinsrh_0 $f3, $f4, $f5
+ pinsrh_1 $f6, $f7, $f8
+ pinsrh_2 $f9, $f10, $f11
+ pinsrh_3 $f12, $f13, $f14
+ pmaddhw $f15, $f16, $f17
+ pmaxsh $f18, $f19, $f20
+ pmaxub $f21, $f22, $f23
+ pminsh $f24, $f25, $f26
+ pminub $f27, $f28, $f29
+ pmovmskb $f0, $f1
+ pmulhuh $f2, $f3, $f4
+ pmulhh $f5, $f6, $f7
+ pmullh $f8, $f9, $f10
+ pmuluw $f11, $f12, $f13
+ pasubub $f14, $f15, $f16
+ biadd $f17, $f18
+ pshufh $f19, $f20, $f21
+ psllh $f22, $f23, $f24
+ psllw $f25, $f26, $f27
+ psrah $f28, $f29, $f30
+ psraw $f0, $f1, $f2
+ psrlh $f3, $f4, $f5
+ psrlw $f6, $f7, $f8
+ psubb $f9, $f10, $f11
+ psubh $f12, $f13, $f14
+ psubw $f15, $f16, $f17
+ psubd $f18, $f19, $f20
+ psubsb $f21, $f22, $f23
+ psubsh $f24, $f25, $f26
+ psubusb $f27, $f28, $f29
+ psubush $f0, $f1, $f2
+ punpckhbh $f3, $f4, $f5
+ punpckhhw $f6, $f7, $f8
+ punpckhwd $f9, $f10, $f11
+ punpcklbh $f12, $f13, $f14
+ punpcklhw $f15, $f16, $f17
+ punpcklwd $f18, $f19, $f20
+
+fixed_point_insns:
+ add $f0, $f1, $f2
+ addu $f3, $f4, $f5
+ dadd $f6, $f7, $f8
+ sub $f9, $f10, $f11
+ subu $f12, $f13, $f14
+ dsub $f15, $f16, $f17
+ or $f18, $f19, $f20
+ sll $f21, $f22, $f23
+ dsll $f24, $f25, $f26
+ xor $f27, $f28, $f29
+ nor $f0, $f1, $f2
+ and $f3, $f4, $f5
+ srl $f6, $f7, $f8
+ dsrl $f9, $f10, $f11
+ sra $f12, $f13, $f14
+ dsra $f15, $f16, $f17
+ sequ $f18, $f19
+ sltu $f20, $f21
+ sleu $f22, $f23
+ seq $f24, $f25
+ slt $f26, $f27
+ sle $f28, $f29
+
+mips5_ps_insns:
+ abs.ps $f0, $f2
+ add.ps $f2, $f4, $f6
+ c.eq.ps $f8, $f10
+ c.f.ps $f8, $f10
+ c.le.ps $f8, $f10
+ c.lt.ps $f8, $f10
+ c.nge.ps $f8, $f10
+ c.ngl.ps $f8, $f10
+ c.ngle.ps $f8, $f10
+ c.ngt.ps $f8, $f10
+ c.ole.ps $f8, $f10
+ c.olt.ps $f8, $f10
+ c.seq.ps $f8, $f10
+ c.sf.ps $f8, $f10
+ c.ueq.ps $f8, $f10
+ c.ule.ps $f8, $f10
+ c.ult.ps $f8, $f10
+ c.un.ps $f8, $f10
+ mov.ps $f24, $f26
+ mul.ps $f2, $f4, $f6
+ neg.ps $f6, $f8
+ sub.ps $f22, $f24, $f26
+
diff --git a/gas/testsuite/gas/mips/loongson-2f.d b/gas/testsuite/gas/mips/loongson-2f.d
new file mode 100644
index 0000000..a47441a
--- /dev/null
+++ b/gas/testsuite/gas/mips/loongson-2f.d
@@ -0,0 +1,150 @@
+#as: -march=loongson2f -mabi=o64
+#objdump: -M reg-names=numeric -dr
+#name: ST Microelectronics Loongson-2F tests
+
+.*: file format .*
+
+Disassembly of section .text:
+
+[0-9a-f]+ <movz_insns>:
+.*: 0064100a movz \$2,\$3,\$4
+.*: 0064100b movn \$2,\$3,\$4
+.*: 0064100b movn \$2,\$3,\$4
+
+[0-9a-f]+ <integer_insns>:
+.*: 70641010 mult.g \$2,\$3,\$4
+.*: 70c72812 multu.g \$5,\$6,\$7
+.*: 712a4011 dmult.g \$8,\$9,\$10
+.*: 718d5813 dmultu.g \$11,\$12,\$13
+.*: 71f07014 div.g \$14,\$15,\$16
+.*: 72538816 divu.g \$17,\$18,\$19
+.*: 72b6a015 ddiv.g \$20,\$21,\$22
+.*: 7319b817 ddivu.g \$23,\$24,\$25
+.*: 737cd01c mod.g \$26,\$27,\$28
+.*: 73dfe81e modu.g \$29,\$30,\$31
+.*: 7064101d dmod.g \$2,\$3,\$4
+.*: 70c7281f dmodu.g \$5,\$6,\$7
+
+[0-9a-f]+ <fpu_insns>:
+.*: 72020818 madd.s \$f0,\$f1,\$f2
+.*: 722520d8 madd.d \$f3,\$f4,\$f5
+.*: 71683998 madd.ps \$f6,\$f7,\$f8
+.*: 720b5259 msub.s \$f9,\$f10,\$f11
+.*: 722e6b19 msub.d \$f12,\$f13,\$f14
+.*: 717183d9 msub.ps \$f15,\$f16,\$f17
+.*: 72149c9a nmadd.s \$f18,\$f19,\$f20
+.*: 7237b55a nmadd.d \$f21,\$f22,\$f23
+.*: 717ace1a nmadd.ps \$f24,\$f25,\$f26
+.*: 721de6db nmsub.s \$f27,\$f28,\$f29
+.*: 7222081b nmsub.d \$f0,\$f1,\$f2
+.*: 716520db nmsub.ps \$f3,\$f4,\$f5
+
+[0-9a-f]+ <simd_insns>:
+.*: 4b420802 packsshb \$f0,\$f1,\$f2
+.*: 4b2520c2 packsswh \$f3,\$f4,\$f5
+.*: 4b683982 packushb \$f6,\$f7,\$f8
+.*: 4bcb5240 paddb \$f9,\$f10,\$f11
+.*: 4b4e6b00 paddh \$f12,\$f13,\$f14
+.*: 4b7183c0 paddw \$f15,\$f16,\$f17
+.*: 4bf49c80 paddd \$f18,\$f19,\$f20
+.*: 4b97b540 paddsb \$f21,\$f22,\$f23
+.*: 4b1ace00 paddsh \$f24,\$f25,\$f26
+.*: 4bbde6c0 paddusb \$f27,\$f28,\$f29
+.*: 4b220800 paddush \$f0,\$f1,\$f2
+.*: 4be520c2 pandn \$f3,\$f4,\$f5
+.*: 4b283988 pavgb \$f6,\$f7,\$f8
+.*: 4b0b5248 pavgh \$f9,\$f10,\$f11
+.*: 4b8e6b09 pcmpeqb \$f12,\$f13,\$f14
+.*: 4b5183c9 pcmpeqh \$f15,\$f16,\$f17
+.*: 4b149c89 pcmpeqw \$f18,\$f19,\$f20
+.*: 4bb7b549 pcmpgtb \$f21,\$f22,\$f23
+.*: 4b7ace09 pcmpgth \$f24,\$f25,\$f26
+.*: 4b3de6c9 pcmpgtw \$f27,\$f28,\$f29
+.*: 4b42080e pextrh \$f0,\$f1,\$f2
+.*: 4b8520c3 pinsrh_0 \$f3,\$f4,\$f5
+.*: 4ba83983 pinsrh_1 \$f6,\$f7,\$f8
+.*: 4bcb5243 pinsrh_2 \$f9,\$f10,\$f11
+.*: 4bee6b03 pinsrh_3 \$f12,\$f13,\$f14
+.*: 4b7183ce pmaddhw \$f15,\$f16,\$f17
+.*: 4b549c88 pmaxsh \$f18,\$f19,\$f20
+.*: 4b97b548 pmaxub \$f21,\$f22,\$f23
+.*: 4b7ace08 pminsh \$f24,\$f25,\$f26
+.*: 4bbde6c8 pminub \$f27,\$f28,\$f29
+.*: 4ba0080f pmovmskb \$f0,\$f1
+.*: 4ba4188a pmulhuh \$f2,\$f3,\$f4
+.*: 4b67314a pmulhh \$f5,\$f6,\$f7
+.*: 4b4a4a0a pmullh \$f8,\$f9,\$f10
+.*: 4b8d62ca pmuluw \$f11,\$f12,\$f13
+.*: 4b307b8d pasubub \$f14,\$f15,\$f16
+.*: 4b80944f biadd \$f17,\$f18
+.*: 4b15a4c2 pshufh \$f19,\$f20,\$f21
+.*: 4b38bd8a psllh \$f22,\$f23,\$f24
+.*: 4b1bd64a psllw \$f25,\$f26,\$f27
+.*: 4b7eef0b psrah \$f28,\$f29,\$f30
+.*: 4b42080b psraw \$f0,\$f1,\$f2
+.*: 4b2520cb psrlh \$f3,\$f4,\$f5
+.*: 4b08398b psrlw \$f6,\$f7,\$f8
+.*: 4bcb5241 psubb \$f9,\$f10,\$f11
+.*: 4b4e6b01 psubh \$f12,\$f13,\$f14
+.*: 4b7183c1 psubw \$f15,\$f16,\$f17
+.*: 4bf49c81 psubd \$f18,\$f19,\$f20
+.*: 4b97b541 psubsb \$f21,\$f22,\$f23
+.*: 4b1ace01 psubsh \$f24,\$f25,\$f26
+.*: 4bbde6c1 psubusb \$f27,\$f28,\$f29
+.*: 4b220801 psubush \$f0,\$f1,\$f2
+.*: 4b6520c3 punpckhbh \$f3,\$f4,\$f5
+.*: 4b283983 punpckhhw \$f6,\$f7,\$f8
+.*: 4bab524b punpckhwd \$f9,\$f10,\$f11
+.*: 4b4e6b03 punpcklbh \$f12,\$f13,\$f14
+.*: 4b1183c3 punpcklhw \$f15,\$f16,\$f17
+.*: 4b949c8b punpcklwd \$f18,\$f19,\$f20
+
+[0-9a-f]+ <fixed_point_insns>:
+.*: 4b42080c add \$f0,\$f1,\$f2
+.*: 4b0520cc addu \$f3,\$f4,\$f5
+.*: 4b68398c dadd \$f6,\$f7,\$f8
+.*: 4b4b524d sub \$f9,\$f10,\$f11
+.*: 4b0e6b0d subu \$f12,\$f13,\$f14
+.*: 4b7183cd dsub \$f15,\$f16,\$f17
+.*: 4b349c8c or \$f18,\$f19,\$f20
+.*: 4b17b54e sll \$f21,\$f22,\$f23
+.*: 4b3ace0e dsll \$f24,\$f25,\$f26
+.*: 4b9de6c2 xor \$f27,\$f28,\$f29
+.*: 4ba20802 nor \$f0,\$f1,\$f2
+.*: 4bc520c2 and \$f3,\$f4,\$f5
+.*: 4b08398f srl \$f6,\$f7,\$f8
+.*: 4b2b524f dsrl \$f9,\$f10,\$f11
+.*: 4b4e6b0f sra \$f12,\$f13,\$f14
+.*: 4b7183cf dsra \$f15,\$f16,\$f17
+.*: 4b93900c sequ \$f18,\$f19
+.*: 4b95a00d sltu \$f20,\$f21
+.*: 4b97b00e sleu \$f22,\$f23
+.*: 4bb9c00c seq \$f24,\$f25
+.*: 4bbbd00d slt \$f26,\$f27
+.*: 4bbde00e sle \$f28,\$f29
+
+000001ac <mips5_ps_insns>:
+.*: 46c01005 abs.ps \$f0,\$f2
+.*: 46c62080 add.ps \$f2,\$f4,\$f6
+.*: 46ca4032 c.eq.ps \$f8,\$f10
+.*: 46ca4030 c.f.ps \$f8,\$f10
+.*: 46ca403e c.le.ps \$f8,\$f10
+.*: 46ca403c c.lt.ps \$f8,\$f10
+.*: 46ca403d c.nge.ps \$f8,\$f10
+.*: 46ca403b c.ngl.ps \$f8,\$f10
+.*: 46ca4039 c.ngle.ps \$f8,\$f10
+.*: 46ca403f c.ngt.ps \$f8,\$f10
+.*: 46ca4036 c.ole.ps \$f8,\$f10
+.*: 46ca4034 c.olt.ps \$f8,\$f10
+.*: 46ca403a c.seq.ps \$f8,\$f10
+.*: 46ca4038 c.sf.ps \$f8,\$f10
+.*: 46ca4033 c.ueq.ps \$f8,\$f10
+.*: 46ca4037 c.ule.ps \$f8,\$f10
+.*: 46ca4035 c.ult.ps \$f8,\$f10
+.*: 46ca4031 c.un.ps \$f8,\$f10
+.*: 46c0d606 mov.ps \$f24,\$f26
+.*: 46c62082 mul.ps \$f2,\$f4,\$f6
+.*: 46c04187 neg.ps \$f6,\$f8
+.*: 46dac581 sub.ps \$f22,\$f24,\$f26
+#pass
+
diff --git a/gas/testsuite/gas/mips/loongson-2f.s b/gas/testsuite/gas/mips/loongson-2f.s
new file mode 100644
index 0000000..4b47a99
--- /dev/null
+++ b/gas/testsuite/gas/mips/loongson-2f.s
@@ -0,0 +1,144 @@
+ .text
+ .set noreorder
+
+movz_insns:
+ movz $2, $3, $4
+ movnz $2, $3, $4
+ movn $2, $3, $4
+
+integer_insns:
+ mult.g $2, $3, $4
+ multu.g $5, $6, $7
+ dmult.g $8, $9, $10
+ dmultu.g $11, $12, $13
+ div.g $14, $15, $16
+ divu.g $17, $18, $19
+ ddiv.g $20, $21, $22
+ ddivu.g $23, $24, $25
+ mod.g $26, $27, $28
+ modu.g $29, $30, $31
+ dmod.g $2, $3, $4
+ dmodu.g $5, $6, $7
+
+fpu_insns:
+ madd.s $f0, $f1, $f2
+ madd.d $f3, $f4, $f5
+ madd.ps $f6, $f7, $f8
+ msub.s $f9, $f10, $f11
+ msub.d $f12, $f13, $f14
+ msub.ps $f15, $f16, $f17
+ nmadd.s $f18, $f19, $f20
+ nmadd.d $f21, $f22, $f23
+ nmadd.ps $f24, $f25, $f26
+ nmsub.s $f27, $f28, $f29
+ nmsub.d $f0, $f1, $f2
+ nmsub.ps $f3, $f4, $f5
+
+simd_insns:
+ packsshb $f0, $f1, $f2
+ packsswh $f3, $f4, $f5
+ packushb $f6, $f7, $f8
+ paddb $f9, $f10, $f11
+ paddh $f12, $f13, $f14
+ paddw $f15, $f16, $f17
+ paddd $f18, $f19, $f20
+ paddsb $f21, $f22, $f23
+ paddsh $f24, $f25, $f26
+ paddusb $f27, $f28, $f29
+ paddush $f0, $f1, $f2
+ pandn $f3, $f4, $f5
+ pavgb $f6, $f7, $f8
+ pavgh $f9, $f10, $f11
+ pcmpeqb $f12, $f13, $f14
+ pcmpeqh $f15, $f16, $f17
+ pcmpeqw $f18, $f19, $f20
+ pcmpgtb $f21, $f22, $f23
+ pcmpgth $f24, $f25, $f26
+ pcmpgtw $f27, $f28, $f29
+ pextrh $f0, $f1, $f2
+ pinsrh_0 $f3, $f4, $f5
+ pinsrh_1 $f6, $f7, $f8
+ pinsrh_2 $f9, $f10, $f11
+ pinsrh_3 $f12, $f13, $f14
+ pmaddhw $f15, $f16, $f17
+ pmaxsh $f18, $f19, $f20
+ pmaxub $f21, $f22, $f23
+ pminsh $f24, $f25, $f26
+ pminub $f27, $f28, $f29
+ pmovmskb $f0, $f1
+ pmulhuh $f2, $f3, $f4
+ pmulhh $f5, $f6, $f7
+ pmullh $f8, $f9, $f10
+ pmuluw $f11, $f12, $f13
+ pasubub $f14, $f15, $f16
+ biadd $f17, $f18
+ pshufh $f19, $f20, $f21
+ psllh $f22, $f23, $f24
+ psllw $f25, $f26, $f27
+ psrah $f28, $f29, $f30
+ psraw $f0, $f1, $f2
+ psrlh $f3, $f4, $f5
+ psrlw $f6, $f7, $f8
+ psubb $f9, $f10, $f11
+ psubh $f12, $f13, $f14
+ psubw $f15, $f16, $f17
+ psubd $f18, $f19, $f20
+ psubsb $f21, $f22, $f23
+ psubsh $f24, $f25, $f26
+ psubusb $f27, $f28, $f29
+ psubush $f0, $f1, $f2
+ punpckhbh $f3, $f4, $f5
+ punpckhhw $f6, $f7, $f8
+ punpckhwd $f9, $f10, $f11
+ punpcklbh $f12, $f13, $f14
+ punpcklhw $f15, $f16, $f17
+ punpcklwd $f18, $f19, $f20
+
+fixed_point_insns:
+ add $f0, $f1, $f2
+ addu $f3, $f4, $f5
+ dadd $f6, $f7, $f8
+ sub $f9, $f10, $f11
+ subu $f12, $f13, $f14
+ dsub $f15, $f16, $f17
+ or $f18, $f19, $f20
+ sll $f21, $f22, $f23
+ dsll $f24, $f25, $f26
+ xor $f27, $f28, $f29
+ nor $f0, $f1, $f2
+ and $f3, $f4, $f5
+ srl $f6, $f7, $f8
+ dsrl $f9, $f10, $f11
+ sra $f12, $f13, $f14
+ dsra $f15, $f16, $f17
+ sequ $f18, $f19
+ sltu $f20, $f21
+ sleu $f22, $f23
+ seq $f24, $f25
+ slt $f26, $f27
+ sle $f28, $f29
+
+mips5_ps_insns:
+ abs.ps $f0, $f2
+ add.ps $f2, $f4, $f6
+ c.eq.ps $f8, $f10
+ c.f.ps $f8, $f10
+ c.le.ps $f8, $f10
+ c.lt.ps $f8, $f10
+ c.nge.ps $f8, $f10
+ c.ngl.ps $f8, $f10
+ c.ngle.ps $f8, $f10
+ c.ngt.ps $f8, $f10
+ c.ole.ps $f8, $f10
+ c.olt.ps $f8, $f10
+ c.seq.ps $f8, $f10
+ c.sf.ps $f8, $f10
+ c.ueq.ps $f8, $f10
+ c.ule.ps $f8, $f10
+ c.ult.ps $f8, $f10
+ c.un.ps $f8, $f10
+ mov.ps $f24, $f26
+ mul.ps $f2, $f4, $f6
+ neg.ps $f6, $f8
+ sub.ps $f22, $f24, $f26
+
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 30efee8..5d04f41 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -757,6 +757,9 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "at-1"
run_list_test "at-2" "-32 -mips1" "MIPS at-2"
+ run_dump_test "loongson-2e"
+ run_dump_test "loongson-2f"
+
run_dump_test_arches "smartmips" [mips_arch_list_matching mips32 !gpr64]
run_dump_test_arches "mips32-dsp" [mips_arch_list_matching mips32r2]
run_dump_test_arches "mips32-dspr2" [mips_arch_list_matching mips32r2]