This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH MIPS][LS3A] Add Loongson3A specific instructions


Hello,

I prepared a patch to add Loongson3A specific instructions.  Tested on
the cross compilation platform.

I'm not sure if the test cases are good enough.  Suggestions are welcome.

Thanks,
Mingjie

include/ChangeLog
2010-12-14  Mingjie Xing  <mingjie.xing@gmail.com>

        * opcode/mips.h: Define OP_*_OFFSET_A, OP_*_OFFSET_B, OP_*_OFFSET_C,
        OP_*_RZ, OP_*_FZ, INSN2_M_FP_D, INSN2_WRITE_GPR_Z, INSN2_WRITE_FPR_Z,
        INSN2_READ_GPR_Z, INSN2_READ_FPR_Z, INSN2_READ_GPR_D.

opcodes/ChangeLog
2010-12-14  Mingjie Xing  <mingjie.xing@gmail.com>

        * mips-opc.c: Define WR_z, WR_Z, RD_z, RD_Z, RD_d.
        (mips_builtin_opcodes): Add loongson3a specific instructions.
        * mips-dis.c (print_insn_args): Handle the new arguments +a|b|c|z|Z.

gas/ChangeLog
2010-12-14  Mingjie Xing  <mingjie.xing@gmail.com>

        * config/tc-mips.c (insn_uses_reg): Handle the new flags
        INSN2_READ_FPR_Z, INSN2_READ_GPR_D and INSN2_READ_GPR_Z.
        (append_insn): Handle delay-slot filling for the new flags.
        (validate_mips_insn): Handle the new arguments +a|b|c|z|Z.
        (mips_ip): Handle the new arguments +a|b|c|z|Z.

gas/testsuite/ChangeLog
2010-12-14  Mingjie Xing  <mingjie.xing@gmail.com>

        * gas/mips/{loongson-3a-2.s, loongson-3a-2.d, loongson3a-3.s,
        loongson3a-3.d} : New tests.
        * gas/mips/mips.exp: Run the tests.

Attachment: patch.txt
Description: Text document

Attachment: loongson-3a-2.s
Description: Binary data

#as: -march=loongson3a -mabi=o64
#objdump: -M reg-names=numeric -dr
#name: Loongson-3A tests

.*:     file format .*

Disassembly of section .text:

[0-9a-f]+ <.text>:
.*:	70601075 	campi	\$2,\$3
.*:	70a02035 	campv	\$4,\$5
.*:	70e830b5 	camwi	\$6,\$7,\$8
.*:	714048f5 	ramri	\$9,\$10
.*:	716c0026 	gsle	\$11,\$12
.*:	71ae0027 	gsgt	\$13,\$14
.*:	c8622010 	gslble	\$2,\$3,\$4
.*:	c8c53811 	gslbgt	\$5,\$6,\$7
.*:	c9285012 	gslhle	\$8,\$9,\$10
.*:	c98b6813 	gslhgt	\$11,\$12,\$13
.*:	c9ee8014 	gslwle	\$14,\$15,\$16
.*:	ca519815 	gslwgt	\$17,\$18,\$19
.*:	cab4b016 	gsldle	\$20,\$21,\$22
.*:	cb17c817 	gsldgt	\$23,\$24,\$25
.*:	e8622010 	gssble	\$2,\$3,\$4
.*:	e8c53811 	gssbgt	\$5,\$6,\$7
.*:	e9285012 	gsshle	\$8,\$9,\$10
.*:	e98b6813 	gsshgt	\$11,\$12,\$13
.*:	e9ee8014 	gsswle	\$14,\$15,\$16
.*:	ea519815 	gsswgt	\$17,\$18,\$19
.*:	eab4b016 	gssdle	\$20,\$21,\$22
.*:	eb17c817 	gssdgt	\$23,\$24,\$25
.*:	c8401818 	gslwlec1	\$f0,\$2,\$3
.*:	c8812819 	gslwgtc1	\$f1,\$4,\$5
.*:	c8c2381a 	gsldlec1	\$f2,\$6,\$7
.*:	c903481b 	gsldgtc1	\$f3,\$8,\$9
.*:	e944581c 	gsswlec1	\$f4,\$10,\$11
.*:	e985681d 	gsswgtc1	\$f5,\$12,\$13
.*:	e9c6781e 	gssdlec1	\$f6,\$14,\$15
.*:	ea07881f 	gssdgtc1	\$f7,\$16,\$17
.*:	ca480004 	gslwlc1	\$f8,0\(\$18\)
.*:	ca690045 	gslwrc1	\$f9,1\(\$19\)
.*:	ca8a0086 	gsldlc1	\$f10,2\(\$20\)
.*:	caab00c7 	gsldrc1	\$f11,3\(\$21\)
.*:	eacc0104 	gsswlc1	\$f12,4\(\$22\)
.*:	eaed0145 	gsswrc1	\$f13,5\(\$23\)
.*:	eb0e0186 	gssdlc1	\$f14,6\(\$24\)
.*:	eb2f01c7 	gssdrc1	\$f15,7\(\$25\)
.*:	d8622000 	gslbx	\$2,0\(\$3,\$4\)
.*:	d8c53ff9 	gslhx	\$5,-1\(\$6,\$7\)
.*:	d92857f2 	gslwx	\$8,-2\(\$9,\$10\)
.*:	d98b6feb 	gsldx	\$11,-3\(\$12,\$13\)
.*:	f9ee87e0 	gssbx	\$14,-4\(\$15,\$16\)
.*:	fa519fd9 	gsshx	\$17,-5\(\$18,\$19\)
.*:	fab4b7d2 	gsswx	\$20,-6\(\$21,\$22\)
.*:	fb17cfcb 	gssdx	\$23,-7\(\$24,\$25\)
.*:	d8501bfe 	gslwxc1	\$f16,127\(\$2,\$3\)
.*:	d8912c07 	gsldxc1	\$f17,-128\(\$4,\$5\)
.*:	f8d23bfe 	gsswxc1	\$f18,127\(\$6,\$7\)
.*:	f9134c07 	gssdxc1	\$f19,-128\(\$8,\$9\)
.*:	c98b3fea 	gslq	\$10,\$11,255\(\$12\)
.*:	e9ee402d 	gssq	\$13,\$14,-256\(\$15\)
.*:	ca15bff4 	gslqc1	\$f20,\$f21,255\(\$16\)
.*:	ea37c036 	gssqc1	\$f22,\$f23,-256\(\$17\)
#pass

Attachment: loongson-3a-3.s
Description: Binary data

#as: -march=loongson3a -mabi=o64
#objdump: -M reg-names=numeric -dr
#name: Loongson delay slot tests

.*:     file format .*

Disassembly of section .text:

[0-9a-f]+ <.text>:
.*:	c8c50024 	gslq	\$4,\$5,0\(\$6\)
.*:	10800002 	beqz	\$4,0x10
.*:	00000000 	nop
.*:	00000000 	nop
#pass

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]