1 ;; Machine Descriptions for R8C/M16C/M32C
3 ;; Free Software Foundation, Inc.
4 ;; Contributed by Red Hat.
6 ;; This file is part of GCC.
8 ;; GCC is free software; you can redistribute it and/or modify it
9 ;; under the terms of the GNU General Public License as published
10 ;; by the Free Software Foundation; either version 2, or (at your
11 ;; option) any later version.
13 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
14 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 ;; License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GCC; see the file COPYING. If not, write to the Free
20 ;; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
26 [(set (match_operand:QI 0 "mra_or_sp_operand"
27 "=SdRhl,SdRhl,??Rmm,??Rmm, Raa,Raa,SdRhl,??Rmm")
28 (plus:QI (match_operand:QI 1 "mra_operand"
30 (match_operand:QI 2 "mrai_operand"
31 "iSdRhl,?Rmm,iSdRhl,?Rmm, iSdRhl,?Rmm,Raa,Raa")))]
34 [(set_attr "flags" "oszc")]
38 [(set (match_operand:HI 0 "nonimmediate_operand"
39 "=SdRhi,SdRhi,??Rmm,??Rmm, SdRhi,??Rmm, Rhi, Raw, Raw, !Rsp")
40 (plus:HI (match_operand:HI 1 "general_operand"
41 "%0,0,0,0, 0,0, Raw, Rfb, Rfb, 0")
42 (match_operand:HI 2 "general_operand"
43 "IU2sSdRhi,?Rmm,IU2sSdRhi,?Rmm, IM2,IM2, IS2IU2, I00, IS1, i")))]
56 [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc")]
59 (define_insn "addpsi3"
60 [(set (match_operand:PSI 0 "nonimmediate_operand" "=SdRpi,SdRpi,Rsp*Rmm, Rpi,Rpi,Rhi,&Rhi")
61 (plus:PSI (match_operand:PSI 1 "nonimmediate_operand" "0,0,0, Raa,Rad,!Rcl,Rhi")
62 (match_operand:PSI 2 "general_operand" "iSdRpi,?Rmm,i, i,IS2,i,!Rcl")))]
72 [(set_attr "flags" "oszc,oszc,oszc,*,*,oszc,oszc")]
75 ; This is needed for reloading large frames.
77 [(set (match_operand:PSI 0 "ra_operand" "")
78 (plus:PSI (match_operand:PSI 1 "cr_operand" "")
79 (match_operand:PSI 2 "immediate_operand" "")))]
81 [(set (match_dup 0) (match_dup 1))
83 (plus:PSI (match_dup 0)
88 ; This is needed for reloading large frames.
90 [(set (match_operand:PSI 0 "ra_operand" "")
91 (plus:PSI (match_operand:PSI 1 "ra_operand" "")
92 (match_operand:PSI 2 "cr_operand" "")))]
94 [(set (match_dup 0) (match_dup 2))
96 (plus:PSI (match_dup 0)
101 (define_insn "subqi3"
102 [(set (match_operand:QI 0 "mra_or_sp_operand"
103 "=SdRhl,SdRhl,??Rmm,??Rmm, Raa,Raa,SdRhl,??Rmm, *Rsp")
104 (minus:QI (match_operand:QI 1 "mra_operand"
105 "0,0,0,0, 0,0,0,0, 0")
106 (match_operand:QI 2 "mrai_operand"
107 "iSdRhl,?Rmm,iSdRhl,?Rmm, iSdRhl,?Rmm,Raa,Raa, i")))]
110 [(set_attr "flags" "oszc")]
113 (define_insn "subhi3"
114 [(set (match_operand:HI 0 "mra_operand"
115 "=SdRhi,SdRhi,??Rmm,??Rmm, SdRhi,??Rmm")
116 (minus:HI (match_operand:HI 1 "mras_operand"
118 (match_operand:HI 2 "mrai_operand"
119 "IU2SdRhi,?Rmm,IU2SdRhi,?Rmm, IM2,IM2")))]
128 [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,oszc")]
131 (define_insn "subpsi3"
132 [(set (match_operand:PSI 0 "mra_operand" "=RpiSd,RpiSd,??Rmm,??Rmm")
133 (minus:PSI (match_operand:PSI 1 "mra_operand" "0,0,0,0")
134 (match_operand:PSI 2 "mrai_operand" "iRpiSd,?Rmm,iRpiSd,?Rmm")))]
137 [(set_attr "flags" "oszc")]
140 (define_insn "negqi2"
141 [(set (match_operand:QI 0 "mra_operand" "=SdRhl,??Rmm")
142 (neg:QI (match_operand:QI 1 "mra_operand" "0,0")))]
145 [(set_attr "flags" "oszc,oszc")]
148 (define_insn "neghi2"
149 [(set (match_operand:HI 0 "mra_operand" "=SdRhi,??Rmm")
150 (neg:HI (match_operand:HI 1 "mra_operand" "0,0")))]
153 [(set_attr "flags" "oszc,oszc")]
156 ; We can negate an SImode by operating on the subparts. GCC deals
157 ; with this itself for larger modes, but not SI.
158 (define_insn "negsi2"
159 [(set (match_operand:SI 0 "mra_operand" "=SdR03,??Rmm")
160 (neg:SI (match_operand:SI 1 "mra_operand" "0,0")))]
162 "not.w %h0 | not.w %H0 | add.w #1,%h0 | adcf.w %H0"
163 [(set_attr "flags" "oszc,oszc")]
166 (define_insn "absqi2"
167 [(set (match_operand:QI 0 "mra_operand" "=RhlSd,??Rmm")
168 (abs:QI (match_operand:QI 1 "mra_operand" "0,0")))]
171 [(set_attr "flags" "oszc")]
174 (define_insn "abshi2"
175 [(set (match_operand:HI 0 "mra_operand" "=RhiSd,??Rmm")
176 (abs:HI (match_operand:HI 1 "mra_operand" "0,0")))]
179 [(set_attr "flags" "oszc")]