summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/binutils/files/loongson.patch')
-rw-r--r--sys-devel/binutils/files/loongson.patch117
1 files changed, 117 insertions, 0 deletions
diff --git a/sys-devel/binutils/files/loongson.patch b/sys-devel/binutils/files/loongson.patch
new file mode 100644
index 0000000..267495e
--- /dev/null
+++ b/sys-devel/binutils/files/loongson.patch
@@ -0,0 +1,117 @@
+diff -urNad --exclude=CVS --exclude=.svn ./opcodes/mips-opc.c new/mips-opc.c
+--- ./opcodes/mips-opc.c 2006-10-17 11:36:56.000000000 +0000
++++ new/mips-opc.c 2006-10-17 11:34:10.000000000 +0000
+@@ -1410,6 +1410,113 @@
+ {"bc0fl", "p", 0x41020000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
+ {"bc0t", "p", 0x41010000, 0xffff0000, CBD|RD_CC, 0, I1 },
+ {"bc0tl", "p", 0x41030000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
++
++ /* godson2 extensions */
++{"faddu", "D,V,T", 0x45800000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"for", "D,V,T", 0x45a00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fadd", "D,V,T", 0x45c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fdadd", "D,V,T", 0x45e00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pavgh", "D,V,T", 0x46400000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pavgb", "D,V,T", 0x46600000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pmaxsh", "D,V,T", 0x46800000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pminsh", "D,V,T", 0x46a00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pmaxub", "D,V,T", 0x46c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pminub", "D,V,T", 0x46e00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddsh", "D,V,T", 0x47000000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddush", "D,V,T", 0x47200000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddh", "D,V,T", 0x47400000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddw", "D,V,T", 0x47600000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddsb", "D,V,T", 0x47800000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddusb", "D,V,T", 0x47a00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddb", "D,V,T", 0x47c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"paddd", "D,V,T", 0x47e00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fsubu", "D,V,T", 0x45800001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pasubub", "D,V,T", 0x45a00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fsub", "D,V,T", 0x45c00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fdsub", "D,V,T", 0x45e00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pcmpeqw", "D,V,T", 0x46400001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pcmpgtw", "D,V,T", 0x46600001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pcmpeqh", "D,V,T", 0x46800001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pcmpgth", "D,V,T", 0x46a00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pcmpeqb", "D,V,T", 0x46c00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pcmpgtb", "D,V,T", 0x46e00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubsh", "D,V,T", 0x47000001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubush", "D,V,T", 0x47200001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubh", "D,V,T", 0x47400001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubw", "D,V,T", 0x47600001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubsb", "D,V,T", 0x47800001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubusb", "D,V,T", 0x47a00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubb", "D,V,T", 0x47c00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psubd", "D,V,T", 0x47e00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fsll", "D,V,T", 0x45800002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fdsll", "D,V,T", 0x45a00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pextrh", "D,V,T", 0x45c00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pmaddhw", "D,V,T", 0x45e00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psllw", "D,V,T", 0x46400002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psllh", "D,V,T", 0x46600002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pmullh", "D,V,T", 0x46800002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pmulhh", "D,V,T", 0x46a00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pmuluw", "D,V,T", 0x46c00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pmulhuh", "D,V,T", 0x46e00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pshufh", "D,V,T", 0x47000002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"packsswh", "D,V,T", 0x47200002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"packsshb", "D,V,T", 0x47400002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"packushb", "D,V,T", 0x47600002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fxor", "D,V,T", 0x47800002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fnor", "D,V,T", 0x47a00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fand", "D,V,T", 0x47c00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pandn", "D,V,T", 0x47e00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fsrl", "D,V,T", 0x45800003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fdsrl", "D,V,T", 0x45a00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fsra", "D,V,T", 0x45c00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fdsra", "D,V,T", 0x45e00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psrlw", "D,V,T", 0x46400003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psrlh", "D,V,T", 0x46600003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psraw", "D,V,T", 0x46800003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"psrah", "D,V,T", 0x46a00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"punpcklwd", "D,V,T", 0x46c00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"punpckhwd", "D,V,T", 0x46e00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"punpcklhw", "D,V,T", 0x47000003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"punpckhhw", "D,V,T", 0x47200003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"punpcklbh", "D,V,T", 0x47400003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"punpckhbh", "D,V,T", 0x47600003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pinsrh_0", "D,V,T", 0x47800003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pinsrh_1", "D,V,T", 0x47a00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pinsrh_2", "D,V,T", 0x47c00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"pinsrh_3", "D,V,T", 0x47e00003, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"fseq", "S,T", 0x46800032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"fseq1", "S,T", 0x46a00032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"fsltu", "S,T", 0x4680003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"fslt", "S,T", 0x46a0003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"fsleu", "S,T", 0x4680003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"fsle", "S,T", 0x46a0003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"biadd", "D,V", 0x46800005, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
++{"pmovmskb", "D,V", 0x46a00005, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
++ /* godson2 paired single */
++{"add.gps", "D,V,T", 0x45600000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"sub.gps", "D,V,T", 0x45600001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"mul.gps", "D,V,T", 0x45600002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
++{"abs.gps", "D,V", 0x45600005, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
++{"mov.gps", "D,S", 0x45600006, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
++{"neg.gps", "D,V", 0x45600007, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
++{"c.f.gps", "S,T", 0x45600030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.un.gps", "S,T", 0x45600031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.eq.gps", "S,T", 0x45600032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.ueq.gps", "S,T", 0x45600033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.olt.gps", "S,T", 0x45600034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.ult.gps", "S,T", 0x45600035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.ole.gps", "S,T", 0x45600036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.ule.gps", "S,T", 0x45600037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.sf.gps", "S,T", 0x45600038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.ngle.gps", "S,T", 0x45600039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.seq.gps", "S,T", 0x4560003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.ngl.gps", "S,T", 0x4560003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.lt.gps", "S,T", 0x4560003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.nge.gps", "S,T", 0x4560003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.le.gps", "S,T", 0x4560003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++{"c.ngt.gps", "S,T", 0x4560003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
++
++
+ };
+
+ #define MIPS_NUM_OPCODES \