diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2010-12-11 10:48:55 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2010-12-11 10:48:55 +0000 |
commit | a471ec3a5ce05adc88440b7af411898fb1abbfea (patch) | |
tree | 57e8614f51d383144f884a775216f919aa22297f /gas | |
parent | 4a2b320e1fae7db83aeae1b3633ad1c0a61aebda (diff) | |
download | gdb-a471ec3a5ce05adc88440b7af411898fb1abbfea.zip gdb-a471ec3a5ce05adc88440b7af411898fb1abbfea.tar.gz gdb-a471ec3a5ce05adc88440b7af411898fb1abbfea.tar.bz2 |
opcodes/
2010-12-03 Mingming Sun <mingm.sun@gmail.com>
* mips-opc.c: (mips_builtin_opcodes): Add loongson3a mul/div and
fixed point instructions.
gas/testsuite/
2010-12-03 Mingming Sun <mingm.sun@gmail.com>
* gas/mips/loongson-3a.s, gas/mips/loongson-3a.d: New test.
* gas/mips/mips.exp: Run it.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/loongson-3a.d | 111 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/loongson-3a.s | 105 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 2 |
4 files changed, 223 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 3675cbc2..8b4e801 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-12-11 Mingming Sun <mingm.sun@gmail.com> + + * gas/mips/loongson-3a.s, gas/mips/loongson-3a.d: New test. + * gas/mips/mips.exp: Run it. + 2010-12-09 Maciej W. Rozycki <macro@codesourcery.com> * gas/mips/elf_ase_mips16.d: Update test for new MIPS16 ASE flag diff --git a/gas/testsuite/gas/mips/loongson-3a.d b/gas/testsuite/gas/mips/loongson-3a.d new file mode 100644 index 0000000..f0eb0e3 --- /dev/null +++ b/gas/testsuite/gas/mips/loongson-3a.d @@ -0,0 +1,111 @@ +#as: -march=loongson3a -mabi=o64
+#objdump: -M reg-names=numeric -dr
+#name: Loongson-3A tests
+
+.*: file format .*
+
+Disassembly of section .text:
+
+[0-9a-f]+ <movz_insns>:
+.*: 0064100b movn \$2,\$3,\$4
+
+[0-9a-f]+ <integer_insns>:
+.*: 70641010 gsmult \$2,\$3,\$4
+.*: 70c72812 gsmultu \$5,\$6,\$7
+.*: 712a4011 gsdmult \$8,\$9,\$10
+.*: 718d5813 gsdmultu \$11,\$12,\$13
+.*: 71f07014 gsdiv \$14,\$15,\$16
+.*: 72538816 gsdivu \$17,\$18,\$19
+.*: 72b6a015 gsddiv \$20,\$21,\$22
+.*: 7319b817 gsddivu \$23,\$24,\$25
+.*: 737cd01c gsmod \$26,\$27,\$28
+.*: 73dfe81e gsmodu \$29,\$30,\$31
+.*: 7064101d gsdmod \$2,\$3,\$4
+.*: 70c7281f gsdmodu \$5,\$6,\$7
+
+[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
+#pass
+
+
diff --git a/gas/testsuite/gas/mips/loongson-3a.s b/gas/testsuite/gas/mips/loongson-3a.s new file mode 100644 index 0000000..73c00c0 --- /dev/null +++ b/gas/testsuite/gas/mips/loongson-3a.s @@ -0,0 +1,105 @@ + .text
+ .set noreorder
+
+movz_insns:
+ movnz $2, $3, $4
+
+integer_insns:
+ gsmult $2, $3, $4
+ gsmultu $5, $6, $7
+ gsdmult $8, $9, $10
+ gsdmultu $11, $12, $13
+ gsdiv $14, $15, $16
+ gsdivu $17, $18, $19
+ gsddiv $20, $21, $22
+ gsddivu $23, $24, $25
+ gsmod $26, $27, $28
+ gsmodu $29, $30, $31
+ gsdmod $2, $3, $4
+ gsdmodu $5, $6, $7
+
+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
+
+
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 7075f9d..baea397 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -915,6 +915,8 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "loongson-2f-2" run_dump_test "loongson-2f-3" + run_dump_test "loongson-3a" + run_dump_test_arches "octeon" [mips_arch_list_matching octeon] run_list_test_arches "octeon-ill" "" \ [mips_arch_list_matching octeon] |