annotate gcc/config/mips/mips-dsp.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
1 ;; Copyright (C) 2005-2018 Free Software Foundation, Inc.
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
2 ;;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
3 ;; This file is part of GCC.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
4 ;;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
5 ;; GCC is free software; you can redistribute it and/or modify
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
6 ;; it under the terms of the GNU General Public License as published by
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
7 ;; the Free Software Foundation; either version 3, or (at your option)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
8 ;; any later version.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
9 ;;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
10 ;; GCC is distributed in the hope that it will be useful,
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
11 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
13 ;; GNU General Public License for more details.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
14 ;;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
15 ;; You should have received a copy of the GNU General Public License
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
16 ;; along with GCC; see the file COPYING3. If not see
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
17 ;; <http://www.gnu.org/licenses/>.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
18
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
19 ;; MIPS DSP ASE Revision 0.98 3/24/2005
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
20 (define_c_enum "unspec" [
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
21 UNSPEC_ADDQ
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
22 UNSPEC_ADDQ_S
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
23 UNSPEC_SUBQ
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
24 UNSPEC_SUBQ_S
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
25 UNSPEC_ADDSC
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
26 UNSPEC_ADDWC
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
27 UNSPEC_MODSUB
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
28 UNSPEC_RADDU_W_QB
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
29 UNSPEC_ABSQ_S
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
30 UNSPEC_PRECRQ_QB_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
31 UNSPEC_PRECRQ_PH_W
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
32 UNSPEC_PRECRQ_RS_PH_W
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
33 UNSPEC_PRECRQU_S_QB_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
34 UNSPEC_PRECEQ_W_PHL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
35 UNSPEC_PRECEQ_W_PHR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
36 UNSPEC_PRECEQU_PH_QBL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
37 UNSPEC_PRECEQU_PH_QBR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
38 UNSPEC_PRECEQU_PH_QBLA
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
39 UNSPEC_PRECEQU_PH_QBRA
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
40 UNSPEC_PRECEU_PH_QBL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
41 UNSPEC_PRECEU_PH_QBR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
42 UNSPEC_PRECEU_PH_QBLA
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
43 UNSPEC_PRECEU_PH_QBRA
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
44 UNSPEC_SHLL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
45 UNSPEC_SHLL_S
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
46 UNSPEC_SHRL_QB
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
47 UNSPEC_SHRA_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
48 UNSPEC_SHRA_R
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
49 UNSPEC_MULEU_S_PH_QBL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
50 UNSPEC_MULEU_S_PH_QBR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
51 UNSPEC_MULQ_RS_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
52 UNSPEC_MULEQ_S_W_PHL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
53 UNSPEC_MULEQ_S_W_PHR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
54 UNSPEC_DPAU_H_QBL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
55 UNSPEC_DPAU_H_QBR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
56 UNSPEC_DPSU_H_QBL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
57 UNSPEC_DPSU_H_QBR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
58 UNSPEC_DPAQ_S_W_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
59 UNSPEC_DPSQ_S_W_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
60 UNSPEC_MULSAQ_S_W_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
61 UNSPEC_DPAQ_SA_L_W
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
62 UNSPEC_DPSQ_SA_L_W
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
63 UNSPEC_MAQ_S_W_PHL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
64 UNSPEC_MAQ_S_W_PHR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
65 UNSPEC_MAQ_SA_W_PHL
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
66 UNSPEC_MAQ_SA_W_PHR
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
67 UNSPEC_BITREV
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
68 UNSPEC_INSV
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
69 UNSPEC_REPL_QB
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
70 UNSPEC_REPL_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
71 UNSPEC_CMP_EQ
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
72 UNSPEC_CMP_LT
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
73 UNSPEC_CMP_LE
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
74 UNSPEC_CMPGU_EQ_QB
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
75 UNSPEC_CMPGU_LT_QB
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
76 UNSPEC_CMPGU_LE_QB
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
77 UNSPEC_PICK
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
78 UNSPEC_PACKRL_PH
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
79 UNSPEC_EXTR_W
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
80 UNSPEC_EXTR_R_W
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
81 UNSPEC_EXTR_RS_W
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
82 UNSPEC_EXTR_S_H
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
83 UNSPEC_EXTP
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
84 UNSPEC_EXTPDP
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
85 UNSPEC_SHILO
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
86 UNSPEC_MTHLIP
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
87 UNSPEC_WRDSP
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
88 UNSPEC_RDDSP
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
89 ])
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
90
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 (define_constants
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 [(CCDSP_PO_REGNUM 182)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 (CCDSP_SC_REGNUM 183)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 (CCDSP_CA_REGNUM 184)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 (CCDSP_OU_REGNUM 185)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 (CCDSP_CC_REGNUM 186)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 (CCDSP_EF_REGNUM 187)])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 ;; This mode iterator allows si, v2hi, v4qi for all possible modes in DSP ASE.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 (define_mode_iterator DSP [(SI "ISA_HAS_DSP")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 (V2HI "ISA_HAS_DSP")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 (V4QI "ISA_HAS_DSP")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 ;; This mode iterator allows v2hi, v4qi for vector/SIMD data.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 (define_mode_iterator DSPV [(V2HI "ISA_HAS_DSP")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 (V4QI "ISA_HAS_DSP")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 ;; This mode iterator allows si, v2hi for Q31 and V2Q15 fixed-point data.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 (define_mode_iterator DSPQ [(SI "ISA_HAS_DSP")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 (V2HI "ISA_HAS_DSP")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 ;; DSP instructions use q for fixed-point data, and u for integer in the infix.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 (define_mode_attr dspfmt1 [(SI "q") (V2HI "q") (V4QI "u")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 ;; DSP instructions use nothing for fixed-point data, and u for integer in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 ;; the infix.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 (define_mode_attr dspfmt1_1 [(SI "") (V2HI "") (V4QI "u")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 ;; DSP instructions use w, ph, qb in the postfix.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 (define_mode_attr dspfmt2 [(SI "w") (V2HI "ph") (V4QI "qb")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 ;; DSP shift masks for SI, V2HI, V4QI.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 (define_mode_attr dspshift_mask [(SI "0x1f") (V2HI "0xf") (V4QI "0x7")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 ;; MIPS DSP ASE Revision 0.98 3/24/2005
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 ;; Table 2-1. MIPS DSP ASE Instructions: Arithmetic
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 ;; ADDQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 (define_insn "add<DSPV:mode>3"
111
kono
parents: 67
diff changeset
129 [(set (match_operand:DSPV 0 "register_operand" "=d")
kono
parents: 67
diff changeset
130 (plus:DSPV (match_operand:DSPV 1 "register_operand" "d")
kono
parents: 67
diff changeset
131 (match_operand:DSPV 2 "register_operand" "d")))
kono
parents: 67
diff changeset
132 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
133 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDQ))]
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
134 "ISA_HAS_DSP"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 "add<DSPV:dspfmt1>.<DSPV:dspfmt2>\t%0,%1,%2"
111
kono
parents: 67
diff changeset
136 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 (define_insn "mips_add<DSP:dspfmt1>_s_<DSP:dspfmt2>"
111
kono
parents: 67
diff changeset
140 [(set (match_operand:DSP 0 "register_operand" "=d")
kono
parents: 67
diff changeset
141 (unspec:DSP [(match_operand:DSP 1 "register_operand" "d")
kono
parents: 67
diff changeset
142 (match_operand:DSP 2 "register_operand" "d")]
kono
parents: 67
diff changeset
143 UNSPEC_ADDQ_S))
kono
parents: 67
diff changeset
144 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
145 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDQ_S))]
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
146 "ISA_HAS_DSP"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 "add<DSP:dspfmt1>_s.<DSP:dspfmt2>\t%0,%1,%2"
111
kono
parents: 67
diff changeset
148 [(set_attr "type" "dspalusat")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 ;; SUBQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 (define_insn "sub<DSPV:mode>3"
111
kono
parents: 67
diff changeset
153 [(set (match_operand:DSPV 0 "register_operand" "=d")
kono
parents: 67
diff changeset
154 (minus:DSPV (match_operand:DSPV 1 "register_operand" "d")
kono
parents: 67
diff changeset
155 (match_operand:DSPV 2 "register_operand" "d")))
kono
parents: 67
diff changeset
156 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
157 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_SUBQ))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 "sub<DSPV:dspfmt1>.<DSPV:dspfmt2>\t%0,%1,%2"
111
kono
parents: 67
diff changeset
160 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 (define_insn "mips_sub<DSP:dspfmt1>_s_<DSP:dspfmt2>"
111
kono
parents: 67
diff changeset
164 [(set (match_operand:DSP 0 "register_operand" "=d")
kono
parents: 67
diff changeset
165 (unspec:DSP [(match_operand:DSP 1 "register_operand" "d")
kono
parents: 67
diff changeset
166 (match_operand:DSP 2 "register_operand" "d")]
kono
parents: 67
diff changeset
167 UNSPEC_SUBQ_S))
kono
parents: 67
diff changeset
168 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
169 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_SUBQ_S))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 "sub<DSP:dspfmt1>_s.<DSP:dspfmt2>\t%0,%1,%2"
111
kono
parents: 67
diff changeset
172 [(set_attr "type" "dspalusat")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 ;; ADDSC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 (define_insn "mips_addsc"
111
kono
parents: 67
diff changeset
177 [(set (match_operand:SI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
178 (unspec:SI [(match_operand:SI 1 "register_operand" "d")
kono
parents: 67
diff changeset
179 (match_operand:SI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
180 UNSPEC_ADDSC))
kono
parents: 67
diff changeset
181 (set (reg:CCDSP CCDSP_CA_REGNUM)
kono
parents: 67
diff changeset
182 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDSC))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 "addsc\t%0,%1,%2"
111
kono
parents: 67
diff changeset
185 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 ;; ADDWC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 (define_insn "mips_addwc"
111
kono
parents: 67
diff changeset
190 [(set (match_operand:SI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
191 (unspec:SI [(match_operand:SI 1 "register_operand" "d")
kono
parents: 67
diff changeset
192 (match_operand:SI 2 "register_operand" "d")
kono
parents: 67
diff changeset
193 (reg:CCDSP CCDSP_CA_REGNUM)]
kono
parents: 67
diff changeset
194 UNSPEC_ADDWC))
kono
parents: 67
diff changeset
195 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
196 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_ADDWC))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 "addwc\t%0,%1,%2"
111
kono
parents: 67
diff changeset
199 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 ;; MODSUB
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 (define_insn "mips_modsub"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 (unspec:SI [(match_operand:SI 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 (match_operand:SI 2 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 UNSPEC_MODSUB))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 "modsub\t%0,%1,%2"
111
kono
parents: 67
diff changeset
210 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 ;; RADDU*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 (define_insn "mips_raddu_w_qb"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 (unspec:SI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 UNSPEC_RADDU_W_QB))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 "raddu.w.qb\t%0,%1"
111
kono
parents: 67
diff changeset
220 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 ;; ABSQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 (define_insn "mips_absq_s_<DSPQ:dspfmt2>"
111
kono
parents: 67
diff changeset
225 [(set (match_operand:DSPQ 0 "register_operand" "=d")
kono
parents: 67
diff changeset
226 (unspec:DSPQ [(match_operand:DSPQ 1 "register_operand" "d")]
kono
parents: 67
diff changeset
227 UNSPEC_ABSQ_S))
kono
parents: 67
diff changeset
228 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
229 (unspec:CCDSP [(match_dup 1)] UNSPEC_ABSQ_S))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 "absq_s.<DSPQ:dspfmt2>\t%0,%1"
111
kono
parents: 67
diff changeset
232 [(set_attr "type" "dspalusat")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 ;; PRECRQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 (define_insn "mips_precrq_qb_ph"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 [(set (match_operand:V4QI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 (unspec:V4QI [(match_operand:V2HI 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 (match_operand:V2HI 2 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 UNSPEC_PRECRQ_QB_PH))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 "precrq.qb.ph\t%0,%1,%2"
111
kono
parents: 67
diff changeset
243 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 (define_insn "mips_precrq_ph_w"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 (unspec:V2HI [(match_operand:SI 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 (match_operand:SI 2 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 UNSPEC_PRECRQ_PH_W))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 "precrq.ph.w\t%0,%1,%2"
111
kono
parents: 67
diff changeset
253 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
255
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 (define_insn "mips_precrq_rs_ph_w"
111
kono
parents: 67
diff changeset
257 [(set (match_operand:V2HI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
258 (unspec:V2HI [(match_operand:SI 1 "register_operand" "d")
kono
parents: 67
diff changeset
259 (match_operand:SI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
260 UNSPEC_PRECRQ_RS_PH_W))
kono
parents: 67
diff changeset
261 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
262 (unspec:CCDSP [(match_dup 1) (match_dup 2)]
kono
parents: 67
diff changeset
263 UNSPEC_PRECRQ_RS_PH_W))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 "precrq_rs.ph.w\t%0,%1,%2"
111
kono
parents: 67
diff changeset
266 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 ;; PRECRQU*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 (define_insn "mips_precrqu_s_qb_ph"
111
kono
parents: 67
diff changeset
271 [(set (match_operand:V4QI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
272 (unspec:V4QI [(match_operand:V2HI 1 "register_operand" "d")
kono
parents: 67
diff changeset
273 (match_operand:V2HI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
274 UNSPEC_PRECRQU_S_QB_PH))
kono
parents: 67
diff changeset
275 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
276 (unspec:CCDSP [(match_dup 1) (match_dup 2)]
kono
parents: 67
diff changeset
277 UNSPEC_PRECRQU_S_QB_PH))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 "precrqu_s.qb.ph\t%0,%1,%2"
111
kono
parents: 67
diff changeset
280 [(set_attr "type" "dspalusat")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 ;; PRECEQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 (define_insn "mips_preceq_w_phl"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 (unspec:SI [(match_operand:V2HI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 UNSPEC_PRECEQ_W_PHL))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 "preceq.w.phl\t%0,%1"
111
kono
parents: 67
diff changeset
290 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 (define_insn "mips_preceq_w_phr"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 (unspec:SI [(match_operand:V2HI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 UNSPEC_PRECEQ_W_PHR))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 "preceq.w.phr\t%0,%1"
111
kono
parents: 67
diff changeset
299 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 ;; PRECEQU*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 (define_insn "mips_precequ_ph_qbl"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 UNSPEC_PRECEQU_PH_QBL))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 "precequ.ph.qbl\t%0,%1"
111
kono
parents: 67
diff changeset
309 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
311
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 (define_insn "mips_precequ_ph_qbr"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 UNSPEC_PRECEQU_PH_QBR))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 "precequ.ph.qbr\t%0,%1"
111
kono
parents: 67
diff changeset
318 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 (define_insn "mips_precequ_ph_qbla"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
324 UNSPEC_PRECEQU_PH_QBLA))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
325 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 "precequ.ph.qbla\t%0,%1"
111
kono
parents: 67
diff changeset
327 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
329
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 (define_insn "mips_precequ_ph_qbra"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 UNSPEC_PRECEQU_PH_QBRA))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 "precequ.ph.qbra\t%0,%1"
111
kono
parents: 67
diff changeset
336 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
338
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 ;; PRECEU*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 (define_insn "mips_preceu_ph_qbl"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 UNSPEC_PRECEU_PH_QBL))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 "preceu.ph.qbl\t%0,%1"
111
kono
parents: 67
diff changeset
346 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 (define_insn "mips_preceu_ph_qbr"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 UNSPEC_PRECEU_PH_QBR))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 "preceu.ph.qbr\t%0,%1"
111
kono
parents: 67
diff changeset
355 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
357
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 (define_insn "mips_preceu_ph_qbla"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 UNSPEC_PRECEU_PH_QBLA))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
362 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 "preceu.ph.qbla\t%0,%1"
111
kono
parents: 67
diff changeset
364 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 (define_insn "mips_preceu_ph_qbra"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 UNSPEC_PRECEU_PH_QBRA))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 "preceu.ph.qbra\t%0,%1"
111
kono
parents: 67
diff changeset
373 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 ;; Table 2-2. MIPS DSP ASE Instructions: Shift
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
377 ;; SHLL*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
378 (define_insn "mips_shll_<DSPV:dspfmt2>"
111
kono
parents: 67
diff changeset
379 [(set (match_operand:DSPV 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
380 (unspec:DSPV [(match_operand:DSPV 1 "register_operand" "d,d")
kono
parents: 67
diff changeset
381 (match_operand:SI 2 "arith_operand" "I,d")]
kono
parents: 67
diff changeset
382 UNSPEC_SHLL))
kono
parents: 67
diff changeset
383 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
384 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_SHLL))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
386 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
388 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 if (INTVAL (operands[2])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 & ~(unsigned HOST_WIDE_INT) <DSPV:dspshift_mask>)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
391 operands[2] = GEN_INT (INTVAL (operands[2]) & <DSPV:dspshift_mask>);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
392 return "shll.<DSPV:dspfmt2>\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
393 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
394 return "shllv.<DSPV:dspfmt2>\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
395 }
111
kono
parents: 67
diff changeset
396 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
398
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
399 (define_insn "mips_shll_s_<DSPQ:dspfmt2>"
111
kono
parents: 67
diff changeset
400 [(set (match_operand:DSPQ 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
401 (unspec:DSPQ [(match_operand:DSPQ 1 "register_operand" "d,d")
kono
parents: 67
diff changeset
402 (match_operand:SI 2 "arith_operand" "I,d")]
kono
parents: 67
diff changeset
403 UNSPEC_SHLL_S))
kono
parents: 67
diff changeset
404 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
405 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_SHLL_S))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
406 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
409 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
410 if (INTVAL (operands[2])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 & ~(unsigned HOST_WIDE_INT) <DSPQ:dspshift_mask>)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
412 operands[2] = GEN_INT (INTVAL (operands[2]) & <DSPQ:dspshift_mask>);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 return "shll_s.<DSPQ:dspfmt2>\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
414 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
415 return "shllv_s.<DSPQ:dspfmt2>\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
416 }
111
kono
parents: 67
diff changeset
417 [(set_attr "type" "dspalusat")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
418 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
419
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
420 ;; SHRL*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
421 (define_insn "mips_shrl_qb"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
422 [(set (match_operand:V4QI 0 "register_operand" "=d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
423 (unspec:V4QI [(match_operand:V4QI 1 "register_operand" "d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
424 (match_operand:SI 2 "arith_operand" "I,d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
425 UNSPEC_SHRL_QB))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
426 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
427 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
428 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
429 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
430 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0x7)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
431 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x7);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
432 return "shrl.qb\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
433 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
434 return "shrlv.qb\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
435 }
111
kono
parents: 67
diff changeset
436 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
437 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
438
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
439 ;; SHRA*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
440 (define_insn "mips_shra_ph"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
441 [(set (match_operand:V2HI 0 "register_operand" "=d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
442 (unspec:V2HI [(match_operand:V2HI 1 "register_operand" "d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
443 (match_operand:SI 2 "arith_operand" "I,d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
444 UNSPEC_SHRA_PH))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
445 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
446 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
447 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
448 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
449 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0xf)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
450 operands[2] = GEN_INT (INTVAL (operands[2]) & 0xf);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
451 return "shra.ph\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
452 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
453 return "shrav.ph\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
454 }
111
kono
parents: 67
diff changeset
455 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
456 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
457
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
458 (define_insn "mips_shra_r_<DSPQ:dspfmt2>"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
459 [(set (match_operand:DSPQ 0 "register_operand" "=d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
460 (unspec:DSPQ [(match_operand:DSPQ 1 "register_operand" "d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
461 (match_operand:SI 2 "arith_operand" "I,d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
462 UNSPEC_SHRA_R))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
463 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
464 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
465 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
466 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
467 if (INTVAL (operands[2])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
468 & ~(unsigned HOST_WIDE_INT) <DSPQ:dspshift_mask>)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
469 operands[2] = GEN_INT (INTVAL (operands[2]) & <DSPQ:dspshift_mask>);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
470 return "shra_r.<DSPQ:dspfmt2>\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
471 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
472 return "shrav_r.<DSPQ:dspfmt2>\t%0,%1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
473 }
111
kono
parents: 67
diff changeset
474 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
475 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
476
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
477 ;; Table 2-3. MIPS DSP ASE Instructions: Multiply
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
478 ;; MULEU*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
479 (define_insn "mips_muleu_s_ph_qbl"
111
kono
parents: 67
diff changeset
480 [(set (match_operand:V2HI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
481 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")
kono
parents: 67
diff changeset
482 (match_operand:V2HI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
483 UNSPEC_MULEU_S_PH_QBL))
kono
parents: 67
diff changeset
484 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
485 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULEU_S_PH_QBL))
kono
parents: 67
diff changeset
486 (clobber (match_scratch:DI 3 "=x"))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
487 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
488 "muleu_s.ph.qbl\t%0,%1,%2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
489 [(set_attr "type" "imul3")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
490 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
491
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
492 (define_insn "mips_muleu_s_ph_qbr"
111
kono
parents: 67
diff changeset
493 [(set (match_operand:V2HI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
494 (unspec:V2HI [(match_operand:V4QI 1 "register_operand" "d")
kono
parents: 67
diff changeset
495 (match_operand:V2HI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
496 UNSPEC_MULEU_S_PH_QBR))
kono
parents: 67
diff changeset
497 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
498 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULEU_S_PH_QBR))
kono
parents: 67
diff changeset
499 (clobber (match_scratch:DI 3 "=x"))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
500 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
501 "muleu_s.ph.qbr\t%0,%1,%2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
502 [(set_attr "type" "imul3")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
503 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
504
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
505 ;; MULQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
506 (define_insn "mips_mulq_rs_ph"
111
kono
parents: 67
diff changeset
507 [(set (match_operand:V2HI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
508 (unspec:V2HI [(match_operand:V2HI 1 "register_operand" "d")
kono
parents: 67
diff changeset
509 (match_operand:V2HI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
510 UNSPEC_MULQ_RS_PH))
kono
parents: 67
diff changeset
511 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
512 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULQ_RS_PH))
kono
parents: 67
diff changeset
513 (clobber (match_scratch:DI 3 "=x"))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
514 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
515 "mulq_rs.ph\t%0,%1,%2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
516 [(set_attr "type" "imul3")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
517 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
518
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
519 ;; MULEQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
520 (define_insn "mips_muleq_s_w_phl"
111
kono
parents: 67
diff changeset
521 [(set (match_operand:SI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
522 (unspec:SI [(match_operand:V2HI 1 "register_operand" "d")
kono
parents: 67
diff changeset
523 (match_operand:V2HI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
524 UNSPEC_MULEQ_S_W_PHL))
kono
parents: 67
diff changeset
525 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
526 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULEQ_S_W_PHL))
kono
parents: 67
diff changeset
527 (clobber (match_scratch:DI 3 "=x"))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
528 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 "muleq_s.w.phl\t%0,%1,%2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
530 [(set_attr "type" "imul3")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
531 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
532
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
533 (define_insn "mips_muleq_s_w_phr"
111
kono
parents: 67
diff changeset
534 [(set (match_operand:SI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
535 (unspec:SI [(match_operand:V2HI 1 "register_operand" "d")
kono
parents: 67
diff changeset
536 (match_operand:V2HI 2 "register_operand" "d")]
kono
parents: 67
diff changeset
537 UNSPEC_MULEQ_S_W_PHR))
kono
parents: 67
diff changeset
538 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
539 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_MULEQ_S_W_PHR))
kono
parents: 67
diff changeset
540 (clobber (match_scratch:DI 3 "=x"))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
541 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
542 "muleq_s.w.phr\t%0,%1,%2"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
543 [(set_attr "type" "imul3")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
544 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
545
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 ;; DPAU*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
547 (define_insn "mips_dpau_h_qbl"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
548 [(set (match_operand:DI 0 "register_operand" "=a")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
549 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
550 (match_operand:V4QI 2 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
551 (match_operand:V4QI 3 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
552 UNSPEC_DPAU_H_QBL))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
553 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
554 "dpau.h.qbl\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
555 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
556 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
557 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
558
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
559 (define_insn "mips_dpau_h_qbr"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
560 [(set (match_operand:DI 0 "register_operand" "=a")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
561 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
562 (match_operand:V4QI 2 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
563 (match_operand:V4QI 3 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
564 UNSPEC_DPAU_H_QBR))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
565 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
566 "dpau.h.qbr\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
567 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
568 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
570
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
571 ;; DPSU*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
572 (define_insn "mips_dpsu_h_qbl"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
573 [(set (match_operand:DI 0 "register_operand" "=a")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
574 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
575 (match_operand:V4QI 2 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
576 (match_operand:V4QI 3 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
577 UNSPEC_DPSU_H_QBL))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
578 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
579 "dpsu.h.qbl\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
580 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
581 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
582 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
583
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
584 (define_insn "mips_dpsu_h_qbr"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
585 [(set (match_operand:DI 0 "register_operand" "=a")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
586 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
587 (match_operand:V4QI 2 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
588 (match_operand:V4QI 3 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
589 UNSPEC_DPSU_H_QBR))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
590 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
591 "dpsu.h.qbr\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
592 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
593 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
594 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
595
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 ;; DPAQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
597 (define_insn "mips_dpaq_s_w_ph"
111
kono
parents: 67
diff changeset
598 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
599 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
600 (match_operand:V2HI 2 "register_operand" "d")
kono
parents: 67
diff changeset
601 (match_operand:V2HI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
602 UNSPEC_DPAQ_S_W_PH))
kono
parents: 67
diff changeset
603 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
604 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
605 UNSPEC_DPAQ_S_W_PH))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
606 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
607 "dpaq_s.w.ph\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
608 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
609 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
610 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
611
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
612 ;; DPSQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
613 (define_insn "mips_dpsq_s_w_ph"
111
kono
parents: 67
diff changeset
614 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
615 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
616 (match_operand:V2HI 2 "register_operand" "d")
kono
parents: 67
diff changeset
617 (match_operand:V2HI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
618 UNSPEC_DPSQ_S_W_PH))
kono
parents: 67
diff changeset
619 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
620 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
621 UNSPEC_DPSQ_S_W_PH))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
622 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
623 "dpsq_s.w.ph\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
624 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
625 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
626 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
627
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
628 ;; MULSAQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
629 (define_insn "mips_mulsaq_s_w_ph"
111
kono
parents: 67
diff changeset
630 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
631 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
632 (match_operand:V2HI 2 "register_operand" "d")
kono
parents: 67
diff changeset
633 (match_operand:V2HI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
634 UNSPEC_MULSAQ_S_W_PH))
kono
parents: 67
diff changeset
635 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
636 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
637 UNSPEC_MULSAQ_S_W_PH))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
638 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
639 "mulsaq_s.w.ph\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
640 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
641 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
642 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
643
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
644 ;; DPAQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
645 (define_insn "mips_dpaq_sa_l_w"
111
kono
parents: 67
diff changeset
646 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
647 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
648 (match_operand:SI 2 "register_operand" "d")
kono
parents: 67
diff changeset
649 (match_operand:SI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
650 UNSPEC_DPAQ_SA_L_W))
kono
parents: 67
diff changeset
651 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
652 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
653 UNSPEC_DPAQ_SA_L_W))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
654 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
655 "dpaq_sa.l.w\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
656 [(set_attr "type" "dspmacsat")
kono
parents: 67
diff changeset
657 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
658 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
659
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
660 ;; DPSQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
661 (define_insn "mips_dpsq_sa_l_w"
111
kono
parents: 67
diff changeset
662 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
663 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
664 (match_operand:SI 2 "register_operand" "d")
kono
parents: 67
diff changeset
665 (match_operand:SI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
666 UNSPEC_DPSQ_SA_L_W))
kono
parents: 67
diff changeset
667 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
668 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
669 UNSPEC_DPSQ_SA_L_W))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
670 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
671 "dpsq_sa.l.w\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
672 [(set_attr "type" "dspmacsat")
kono
parents: 67
diff changeset
673 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
674 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
675
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
676 ;; MAQ*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
677 (define_insn "mips_maq_s_w_phl"
111
kono
parents: 67
diff changeset
678 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
679 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
680 (match_operand:V2HI 2 "register_operand" "d")
kono
parents: 67
diff changeset
681 (match_operand:V2HI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
682 UNSPEC_MAQ_S_W_PHL))
kono
parents: 67
diff changeset
683 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
684 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
685 UNSPEC_MAQ_S_W_PHL))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
686 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
687 "maq_s.w.phl\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
688 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
689 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
690 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
691
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
692 (define_insn "mips_maq_s_w_phr"
111
kono
parents: 67
diff changeset
693 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
694 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
695 (match_operand:V2HI 2 "register_operand" "d")
kono
parents: 67
diff changeset
696 (match_operand:V2HI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
697 UNSPEC_MAQ_S_W_PHR))
kono
parents: 67
diff changeset
698 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
699 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
700 UNSPEC_MAQ_S_W_PHR))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
701 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
702 "maq_s.w.phr\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
703 [(set_attr "type" "dspmac")
kono
parents: 67
diff changeset
704 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
705 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
706
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
707 ;; MAQ_SA*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
708 (define_insn "mips_maq_sa_w_phl"
111
kono
parents: 67
diff changeset
709 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
710 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
711 (match_operand:V2HI 2 "register_operand" "d")
kono
parents: 67
diff changeset
712 (match_operand:V2HI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
713 UNSPEC_MAQ_SA_W_PHL))
kono
parents: 67
diff changeset
714 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
715 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
716 UNSPEC_MAQ_SA_W_PHL))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
717 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
718 "maq_sa.w.phl\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
719 [(set_attr "type" "dspmacsat")
kono
parents: 67
diff changeset
720 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
721 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
722
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
723 (define_insn "mips_maq_sa_w_phr"
111
kono
parents: 67
diff changeset
724 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
725 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
726 (match_operand:V2HI 2 "register_operand" "d")
kono
parents: 67
diff changeset
727 (match_operand:V2HI 3 "register_operand" "d")]
kono
parents: 67
diff changeset
728 UNSPEC_MAQ_SA_W_PHR))
kono
parents: 67
diff changeset
729 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
730 (unspec:CCDSP [(match_dup 1) (match_dup 2) (match_dup 3)]
kono
parents: 67
diff changeset
731 UNSPEC_MAQ_SA_W_PHR))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
732 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
733 "maq_sa.w.phr\t%q0,%2,%3"
111
kono
parents: 67
diff changeset
734 [(set_attr "type" "dspmacsat")
kono
parents: 67
diff changeset
735 (set_attr "accum_in" "1")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
736 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
737
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
738 ;; Table 2-4. MIPS DSP ASE Instructions: General Bit/Manipulation
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
739 ;; BITREV
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
740 (define_insn "mips_bitrev"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
741 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
742 (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
743 UNSPEC_BITREV))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
744 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
745 "bitrev\t%0,%1"
111
kono
parents: 67
diff changeset
746 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
747 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
748
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
749 ;; INSV
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
750 (define_insn "mips_insv"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
751 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
752 (unspec:SI [(match_operand:SI 1 "register_operand" "0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
753 (match_operand:SI 2 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
754 (reg:CCDSP CCDSP_SC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
755 (reg:CCDSP CCDSP_PO_REGNUM)]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
756 UNSPEC_INSV))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
757 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
758 "insv\t%0,%2"
111
kono
parents: 67
diff changeset
759 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
760 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
761
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
762 ;; REPL*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
763 (define_insn "mips_repl_qb"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
764 [(set (match_operand:V4QI 0 "register_operand" "=d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
765 (unspec:V4QI [(match_operand:SI 1 "arith_operand" "I,d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
766 UNSPEC_REPL_QB))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
767 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
768 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
769 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
770 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
771 if (INTVAL (operands[1]) & ~(unsigned HOST_WIDE_INT) 0xff)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
772 operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
773 return "repl.qb\t%0,%1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
774 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
775 return "replv.qb\t%0,%1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
776 }
111
kono
parents: 67
diff changeset
777 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
778 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
779
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
780 (define_insn "mips_repl_ph"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
781 [(set (match_operand:V2HI 0 "register_operand" "=d,d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
782 (unspec:V2HI [(match_operand:SI 1 "reg_imm10_operand" "YB,d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
783 UNSPEC_REPL_PH))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
784 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
785 "@
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
786 repl.ph\t%0,%1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
787 replv.ph\t%0,%1"
111
kono
parents: 67
diff changeset
788 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
789 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
790
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
791 ;; Table 2-5. MIPS DSP ASE Instructions: Compare-Pick
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
792 ;; CMPU.* CMP.*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
793 (define_insn "mips_cmp<DSPV:dspfmt1_1>_eq_<DSPV:dspfmt2>"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
794 [(set (reg:CCDSP CCDSP_CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
795 (unspec:CCDSP [(match_operand:DSPV 0 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
796 (match_operand:DSPV 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
797 (reg:CCDSP CCDSP_CC_REGNUM)]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
798 UNSPEC_CMP_EQ))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
799 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
800 "cmp<DSPV:dspfmt1_1>.eq.<DSPV:dspfmt2>\t%0,%1"
111
kono
parents: 67
diff changeset
801 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
802 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
803
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
804 (define_insn "mips_cmp<DSPV:dspfmt1_1>_lt_<DSPV:dspfmt2>"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
805 [(set (reg:CCDSP CCDSP_CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
806 (unspec:CCDSP [(match_operand:DSPV 0 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
807 (match_operand:DSPV 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
808 (reg:CCDSP CCDSP_CC_REGNUM)]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
809 UNSPEC_CMP_LT))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
810 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
811 "cmp<DSPV:dspfmt1_1>.lt.<DSPV:dspfmt2>\t%0,%1"
111
kono
parents: 67
diff changeset
812 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
813 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
814
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
815 (define_insn "mips_cmp<DSPV:dspfmt1_1>_le_<DSPV:dspfmt2>"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
816 [(set (reg:CCDSP CCDSP_CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
817 (unspec:CCDSP [(match_operand:DSPV 0 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
818 (match_operand:DSPV 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
819 (reg:CCDSP CCDSP_CC_REGNUM)]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
820 UNSPEC_CMP_LE))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
821 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
822 "cmp<DSPV:dspfmt1_1>.le.<DSPV:dspfmt2>\t%0,%1"
111
kono
parents: 67
diff changeset
823 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
824 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
825
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
826 (define_insn "mips_cmpgu_eq_qb"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
827 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
828 (unspec:SI [(match_operand:V4QI 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
829 (match_operand:V4QI 2 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
830 UNSPEC_CMPGU_EQ_QB))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
831 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
832 "cmpgu.eq.qb\t%0,%1,%2"
111
kono
parents: 67
diff changeset
833 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
834 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
835
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
836 (define_insn "mips_cmpgu_lt_qb"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
837 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
838 (unspec:SI [(match_operand:V4QI 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
839 (match_operand:V4QI 2 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
840 UNSPEC_CMPGU_LT_QB))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
841 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
842 "cmpgu.lt.qb\t%0,%1,%2"
111
kono
parents: 67
diff changeset
843 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
844 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
845
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
846 (define_insn "mips_cmpgu_le_qb"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
847 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
848 (unspec:SI [(match_operand:V4QI 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
849 (match_operand:V4QI 2 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
850 UNSPEC_CMPGU_LE_QB))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
851 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
852 "cmpgu.le.qb\t%0,%1,%2"
111
kono
parents: 67
diff changeset
853 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
854 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
855
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
856 ;; PICK*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
857 (define_insn "mips_pick_<DSPV:dspfmt2>"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
858 [(set (match_operand:DSPV 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
859 (unspec:DSPV [(match_operand:DSPV 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
860 (match_operand:DSPV 2 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
861 (reg:CCDSP CCDSP_CC_REGNUM)]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
862 UNSPEC_PICK))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
863 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
864 "pick.<DSPV:dspfmt2>\t%0,%1,%2"
111
kono
parents: 67
diff changeset
865 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
866 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
867
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
868 ;; PACKRL*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
869 (define_insn "mips_packrl_ph"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
870 [(set (match_operand:V2HI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
871 (unspec:V2HI [(match_operand:V2HI 1 "register_operand" "d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
872 (match_operand:V2HI 2 "register_operand" "d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
873 UNSPEC_PACKRL_PH))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
874 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
875 "packrl.ph\t%0,%1,%2"
111
kono
parents: 67
diff changeset
876 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
877 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
878
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
879 ;; Table 2-6. MIPS DSP ASE Instructions: Accumulator and DSPControl Access
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
880 ;; EXTR*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
881 (define_insn "mips_extr_w"
111
kono
parents: 67
diff changeset
882 [(set (match_operand:SI 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
883 (unspec:SI [(match_operand:DI 1 "register_operand" "a,a")
kono
parents: 67
diff changeset
884 (match_operand:SI 2 "arith_operand" "I,d")]
kono
parents: 67
diff changeset
885 UNSPEC_EXTR_W))
kono
parents: 67
diff changeset
886 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
887 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_EXTR_W))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
888 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
889 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
890 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
891 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
892 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0x1f)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
893 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
894 return "extr.w\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
895 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
896 return "extrv.w\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
897 }
111
kono
parents: 67
diff changeset
898 [(set_attr "type" "accext")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
899 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
900
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
901 (define_insn "mips_extr_r_w"
111
kono
parents: 67
diff changeset
902 [(set (match_operand:SI 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
903 (unspec:SI [(match_operand:DI 1 "register_operand" "a,a")
kono
parents: 67
diff changeset
904 (match_operand:SI 2 "arith_operand" "I,d")]
kono
parents: 67
diff changeset
905 UNSPEC_EXTR_R_W))
kono
parents: 67
diff changeset
906 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
907 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_EXTR_R_W))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
908 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
909 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
910 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
911 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
912 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0x1f)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
913 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
914 return "extr_r.w\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
915 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
916 return "extrv_r.w\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
917 }
111
kono
parents: 67
diff changeset
918 [(set_attr "type" "accext")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
919 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
920
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
921 (define_insn "mips_extr_rs_w"
111
kono
parents: 67
diff changeset
922 [(set (match_operand:SI 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
923 (unspec:SI [(match_operand:DI 1 "register_operand" "a,a")
kono
parents: 67
diff changeset
924 (match_operand:SI 2 "arith_operand" "I,d")]
kono
parents: 67
diff changeset
925 UNSPEC_EXTR_RS_W))
kono
parents: 67
diff changeset
926 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
927 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_EXTR_RS_W))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
928 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
929 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
930 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
931 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
932 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0x1f)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
933 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
934 return "extr_rs.w\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
935 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
936 return "extrv_rs.w\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
937 }
111
kono
parents: 67
diff changeset
938 [(set_attr "type" "accext")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
939 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
940
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
941 ;; EXTR*_S.H
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
942 (define_insn "mips_extr_s_h"
111
kono
parents: 67
diff changeset
943 [(set (match_operand:SI 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
944 (unspec:SI [(match_operand:DI 1 "register_operand" "a,a")
kono
parents: 67
diff changeset
945 (match_operand:SI 2 "arith_operand" "I,d")]
kono
parents: 67
diff changeset
946 UNSPEC_EXTR_S_H))
kono
parents: 67
diff changeset
947 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
948 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_EXTR_S_H))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
949 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
950 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
951 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
952 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
953 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0x1f)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
954 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
955 return "extr_s.h\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
956 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
957 return "extrv_s.h\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
958 }
111
kono
parents: 67
diff changeset
959 [(set_attr "type" "accext")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
960 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
961
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
962 ;; EXTP*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
963 (define_insn "mips_extp"
111
kono
parents: 67
diff changeset
964 [(set (match_operand:SI 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
965 (unspec:SI [(match_operand:DI 1 "register_operand" "a,a")
kono
parents: 67
diff changeset
966 (match_operand:SI 2 "arith_operand" "I,d")
kono
parents: 67
diff changeset
967 (reg:CCDSP CCDSP_PO_REGNUM)]
kono
parents: 67
diff changeset
968 UNSPEC_EXTP))
kono
parents: 67
diff changeset
969 (set (reg:CCDSP CCDSP_EF_REGNUM)
kono
parents: 67
diff changeset
970 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_EXTP))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
971 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
972 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
973 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
974 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
975 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0x1f)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
976 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
977 return "extp\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
978 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
979 return "extpv\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
980 }
111
kono
parents: 67
diff changeset
981 [(set_attr "type" "accext")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
982 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
983
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
984 (define_insn "mips_extpdp"
111
kono
parents: 67
diff changeset
985 [(set (match_operand:SI 0 "register_operand" "=d,d")
kono
parents: 67
diff changeset
986 (unspec:SI [(match_operand:DI 1 "register_operand" "a,a")
kono
parents: 67
diff changeset
987 (match_operand:SI 2 "arith_operand" "I,d")
kono
parents: 67
diff changeset
988 (reg:CCDSP CCDSP_PO_REGNUM)]
kono
parents: 67
diff changeset
989 UNSPEC_EXTPDP))
kono
parents: 67
diff changeset
990 (set (reg:CCDSP CCDSP_PO_REGNUM)
kono
parents: 67
diff changeset
991 (unspec:CCDSP [(match_dup 1) (match_dup 2)
kono
parents: 67
diff changeset
992 (reg:CCDSP CCDSP_PO_REGNUM)] UNSPEC_EXTPDP))
kono
parents: 67
diff changeset
993 (set (reg:CCDSP CCDSP_EF_REGNUM)
kono
parents: 67
diff changeset
994 (unspec:CCDSP [(match_dup 1) (match_dup 2)] UNSPEC_EXTPDP))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
995 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
996 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
997 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
998 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
999 if (INTVAL (operands[2]) & ~(unsigned HOST_WIDE_INT) 0x1f)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1000 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1001 return "extpdp\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1002 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1003 return "extpdpv\t%0,%q1,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1004 }
111
kono
parents: 67
diff changeset
1005 [(set_attr "type" "accext")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1006 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1007
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1008 ;; SHILO*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1009 (define_insn "mips_shilo"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1010 [(set (match_operand:DI 0 "register_operand" "=a,a")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1011 (unspec:DI [(match_operand:DI 1 "register_operand" "0,0")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1012 (match_operand:SI 2 "arith_operand" "I,d")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1013 UNSPEC_SHILO))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1014 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1015 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1016 if (which_alternative == 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1017 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1018 if (INTVAL (operands[2]) < -32 || INTVAL (operands[2]) > 31)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1019 operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1020 return "shilo\t%q0,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1021 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1022 return "shilov\t%q0,%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1023 }
111
kono
parents: 67
diff changeset
1024 [(set_attr "type" "accmod")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1025 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1026
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1027 ;; MTHLIP*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1028 (define_insn "mips_mthlip"
111
kono
parents: 67
diff changeset
1029 [(set (match_operand:DI 0 "register_operand" "=a")
kono
parents: 67
diff changeset
1030 (unspec:DI [(match_operand:DI 1 "register_operand" "0")
kono
parents: 67
diff changeset
1031 (match_operand:SI 2 "register_operand" "d")
kono
parents: 67
diff changeset
1032 (reg:CCDSP CCDSP_PO_REGNUM)]
kono
parents: 67
diff changeset
1033 UNSPEC_MTHLIP))
kono
parents: 67
diff changeset
1034 (set (reg:CCDSP CCDSP_PO_REGNUM)
kono
parents: 67
diff changeset
1035 (unspec:CCDSP [(match_dup 1) (match_dup 2)
kono
parents: 67
diff changeset
1036 (reg:CCDSP CCDSP_PO_REGNUM)] UNSPEC_MTHLIP))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1037 "ISA_HAS_DSP && !TARGET_64BIT"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1038 "mthlip\t%2,%q0"
111
kono
parents: 67
diff changeset
1039 [(set_attr "type" "accmod")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1040 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1041
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1042 ;; WRDSP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1043 (define_insn "mips_wrdsp"
111
kono
parents: 67
diff changeset
1044 [(set (reg:CCDSP CCDSP_PO_REGNUM)
kono
parents: 67
diff changeset
1045 (unspec:CCDSP [(match_operand:SI 0 "register_operand" "d")
kono
parents: 67
diff changeset
1046 (match_operand:SI 1 "const_uimm6_operand" "YA")]
kono
parents: 67
diff changeset
1047 UNSPEC_WRDSP))
kono
parents: 67
diff changeset
1048 (set (reg:CCDSP CCDSP_SC_REGNUM)
kono
parents: 67
diff changeset
1049 (unspec:CCDSP [(match_dup 0) (match_dup 1)] UNSPEC_WRDSP))
kono
parents: 67
diff changeset
1050 (set (reg:CCDSP CCDSP_CA_REGNUM)
kono
parents: 67
diff changeset
1051 (unspec:CCDSP [(match_dup 0) (match_dup 1)] UNSPEC_WRDSP))
kono
parents: 67
diff changeset
1052 (set (reg:CCDSP CCDSP_OU_REGNUM)
kono
parents: 67
diff changeset
1053 (unspec:CCDSP [(match_dup 0) (match_dup 1)] UNSPEC_WRDSP))
kono
parents: 67
diff changeset
1054 (set (reg:CCDSP CCDSP_CC_REGNUM)
kono
parents: 67
diff changeset
1055 (unspec:CCDSP [(match_dup 0) (match_dup 1)] UNSPEC_WRDSP))
kono
parents: 67
diff changeset
1056 (set (reg:CCDSP CCDSP_EF_REGNUM)
kono
parents: 67
diff changeset
1057 (unspec:CCDSP [(match_dup 0) (match_dup 1)] UNSPEC_WRDSP))]
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1058 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1059 "wrdsp\t%0,%1"
111
kono
parents: 67
diff changeset
1060 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1061 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1062
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1063 ;; RDDSP
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1064 (define_insn "mips_rddsp"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1065 [(set (match_operand:SI 0 "register_operand" "=d")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1066 (unspec:SI [(match_operand:SI 1 "const_uimm6_operand" "YA")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1067 (reg:CCDSP CCDSP_PO_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1068 (reg:CCDSP CCDSP_SC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1069 (reg:CCDSP CCDSP_CA_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1070 (reg:CCDSP CCDSP_OU_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1071 (reg:CCDSP CCDSP_CC_REGNUM)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1072 (reg:CCDSP CCDSP_EF_REGNUM)]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1073 UNSPEC_RDDSP))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1074 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1075 "rddsp\t%0,%1"
111
kono
parents: 67
diff changeset
1076 [(set_attr "type" "dspalu")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1077 (set_attr "mode" "SI")])
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1078
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1079 ;; Table 2-7. MIPS DSP ASE Instructions: Indexed-Load
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1080 ;; L*X
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1081 (define_expand "mips_lbux"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1082 [(match_operand:SI 0 "register_operand")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1083 (match_operand 1 "pmode_register_operand")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1084 (match_operand:SI 2 "register_operand")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1085 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1086 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1087 operands[2] = convert_to_mode (Pmode, operands[2], false);
111
kono
parents: 67
diff changeset
1088 emit_insn (PMODE_INSN (gen_mips_lbux_extsi,
kono
parents: 67
diff changeset
1089 (operands[0], operands[1], operands[2])));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1090 DONE;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1091 })
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1092
111
kono
parents: 67
diff changeset
1093 (define_insn "mips_l<SHORT:size><u>x_ext<GPR:mode>_<P:mode>"
kono
parents: 67
diff changeset
1094 [(set (match_operand:GPR 0 "register_operand" "=d")
kono
parents: 67
diff changeset
1095 (any_extend:GPR
kono
parents: 67
diff changeset
1096 (mem:SHORT (plus:P (match_operand:P 1 "register_operand" "d")
kono
parents: 67
diff changeset
1097 (match_operand:P 2 "register_operand" "d")))))]
kono
parents: 67
diff changeset
1098 "ISA_HAS_L<SHORT:SIZE><U>X"
kono
parents: 67
diff changeset
1099 "l<SHORT:size><u>x\t%0,%2(%1)"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1100 [(set_attr "type" "load")
111
kono
parents: 67
diff changeset
1101 (set_attr "mode" "<GPR:MODE>")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1102
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1103 (define_expand "mips_lhx"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1104 [(match_operand:SI 0 "register_operand")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1105 (match_operand 1 "pmode_register_operand")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1106 (match_operand:SI 2 "register_operand")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1107 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1108 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1109 operands[2] = convert_to_mode (Pmode, operands[2], false);
111
kono
parents: 67
diff changeset
1110 emit_insn (PMODE_INSN (gen_mips_lhx_extsi,
kono
parents: 67
diff changeset
1111 (operands[0], operands[1], operands[2])));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1112 DONE;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1113 })
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1114
111
kono
parents: 67
diff changeset
1115 (define_expand "mips_l<size>x"
kono
parents: 67
diff changeset
1116 [(match_operand:GPR 0 "register_operand")
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1117 (match_operand 1 "pmode_register_operand")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1118 (match_operand:SI 2 "register_operand")]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1119 "ISA_HAS_DSP"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1120 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1121 operands[2] = convert_to_mode (Pmode, operands[2], false);
111
kono
parents: 67
diff changeset
1122 emit_insn (PMODE_INSN (gen_mips_l<size>x,
kono
parents: 67
diff changeset
1123 (operands[0], operands[1], operands[2])));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1124 DONE;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1125 })
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1126
111
kono
parents: 67
diff changeset
1127 (define_insn "mips_l<GPR:size>x_<P:mode>"
kono
parents: 67
diff changeset
1128 [(set (match_operand:GPR 0 "register_operand" "=d")
kono
parents: 67
diff changeset
1129 (mem:GPR (plus:P (match_operand:P 1 "register_operand" "d")
kono
parents: 67
diff changeset
1130 (match_operand:P 2 "register_operand" "d"))))]
kono
parents: 67
diff changeset
1131 "ISA_HAS_L<GPR:SIZE>X"
kono
parents: 67
diff changeset
1132 "l<GPR:size>x\t%0,%2(%1)"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1133 [(set_attr "type" "load")
111
kono
parents: 67
diff changeset
1134 (set_attr "mode" "<GPR:MODE>")])
kono
parents: 67
diff changeset
1135
kono
parents: 67
diff changeset
1136 (define_insn "*mips_lw<u>x_<P:mode>_ext"
kono
parents: 67
diff changeset
1137 [(set (match_operand:DI 0 "register_operand" "=d")
kono
parents: 67
diff changeset
1138 (any_extend:DI
kono
parents: 67
diff changeset
1139 (mem:SI (plus:P (match_operand:P 1 "register_operand" "d")
kono
parents: 67
diff changeset
1140 (match_operand:P 2 "register_operand" "d")))))]
kono
parents: 67
diff changeset
1141 "ISA_HAS_LW<U>X && TARGET_64BIT"
kono
parents: 67
diff changeset
1142 "lw<u>x\t%0,%2(%1)"
kono
parents: 67
diff changeset
1143 [(set_attr "type" "load")
kono
parents: 67
diff changeset
1144 (set_attr "mode" "DI")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1145
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1146 ;; Table 2-8. MIPS DSP ASE Instructions: Branch
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1147 ;; BPOSGE32
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1148 (define_insn "mips_bposge"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1149 [(set (pc)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1150 (if_then_else (ge (reg:CCDSP CCDSP_PO_REGNUM)
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
1151 (match_operand:SI 1 "immediate_operand" "I"))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
1152 (label_ref (match_operand 0 "" ""))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1153 (pc)))]
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1154 "ISA_HAS_DSP"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
1155 "%*bposge%1\t%0%/"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 47
diff changeset
1156 [(set_attr "type" "branch")])
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1157
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1158 (define_expand "mips_madd<u>"
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1159 [(set (match_operand:DI 0 "register_operand")
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1160 (plus:DI
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1161 (mult:DI (any_extend:DI (match_operand:SI 2 "register_operand"))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1162 (any_extend:DI (match_operand:SI 3 "register_operand")))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1163 (match_operand:DI 1 "register_operand")))]
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1164 "ISA_HAS_DSP && !TARGET_64BIT")
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1165
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1166 (define_expand "mips_msub<u>"
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1167 [(set (match_operand:DI 0 "register_operand")
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1168 (minus:DI
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1169 (match_operand:DI 1 "register_operand")
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1170 (mult:DI (any_extend:DI (match_operand:SI 2 "register_operand"))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1171 (any_extend:DI (match_operand:SI 3 "register_operand")))))]
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
1172 "ISA_HAS_DSP && !TARGET_64BIT")