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, !Rsp")
40 (plus:HI (match_operand:HI 1 "general_operand"
41 "%0,0,0,0, 0,0, Raw, 0")
42 (match_operand:HI 2 "general_operand"
43 "IU2sSdRhi,?Rmm,IU2sSdRhi,?Rmm, IM2,IM2, IS2IU2, i")))]
54 [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,oszc,oszc,oszc")]
57 (define_insn "addpsi3"
58 [(set (match_operand:PSI 0 "nonimmediate_operand" "=SdRpi,SdRpi,Rsp*Rmm, Rpi,Rpi,Rhi,&Rhi")
59 (plus:PSI (match_operand:PSI 1 "nonimmediate_operand" "0,0,0, Raa,Rad,!Rcl,Rhi")
60 (match_operand:PSI 2 "general_operand" "iSdRpi,?Rmm,i, i,IS2,i,!Rcl")))]
70 [(set_attr "flags" "oszc,oszc,oszc,*,*,oszc,oszc")]
73 ; This is needed for reloading large frames.
75 [(set (match_operand:PSI 0 "ra_operand" "")
76 (plus:PSI (match_operand:PSI 1 "cr_operand" "")
77 (match_operand:PSI 2 "immediate_operand" "")))]
79 [(set (match_dup 0) (match_dup 1))
81 (plus:PSI (match_dup 0)
86 ; This is needed for reloading large frames.
88 [(set (match_operand:PSI 0 "ra_operand" "")
89 (plus:PSI (match_operand:PSI 1 "ra_operand" "")
90 (match_operand:PSI 2 "cr_operand" "")))]
92 [(set (match_dup 0) (match_dup 2))
94 (plus:PSI (match_dup 0)
100 [(set (match_operand:QI 0 "mra_or_sp_operand"
101 "=SdRhl,SdRhl,??Rmm,??Rmm, Raa,Raa,SdRhl,??Rmm, *Rsp")
102 (minus:QI (match_operand:QI 1 "mra_operand"
103 "0,0,0,0, 0,0,0,0, 0")
104 (match_operand:QI 2 "mrai_operand"
105 "iSdRhl,?Rmm,iSdRhl,?Rmm, iSdRhl,?Rmm,Raa,Raa, i")))]
108 [(set_attr "flags" "oszc")]
111 (define_insn "subhi3"
112 [(set (match_operand:HI 0 "mra_operand"
113 "=SdRhi,SdRhi,??Rmm,??Rmm, SdRhi,??Rmm")
114 (minus:HI (match_operand:HI 1 "mras_operand"
116 (match_operand:HI 2 "mrai_operand"
117 "IU2SdRhi,?Rmm,IU2SdRhi,?Rmm, IM2,IM2")))]
126 [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,oszc")]
129 (define_insn "subpsi3"
130 [(set (match_operand:PSI 0 "mra_operand" "=RpiSd,RpiSd,??Rmm,??Rmm")
131 (minus:PSI (match_operand:PSI 1 "mra_operand" "0,0,0,0")
132 (match_operand:PSI 2 "mrai_operand" "iRpiSd,?Rmm,iRpiSd,?Rmm")))]
135 [(set_attr "flags" "oszc")]
138 (define_insn "negqi2"
139 [(set (match_operand:QI 0 "mra_operand" "=SdRhl,??Rmm")
140 (neg:QI (match_operand:QI 1 "mra_operand" "0,0")))]
143 [(set_attr "flags" "oszc,oszc")]
146 (define_insn "neghi2"
147 [(set (match_operand:HI 0 "mra_operand" "=SdRhi,??Rmm")
148 (neg:HI (match_operand:HI 1 "mra_operand" "0,0")))]
151 [(set_attr "flags" "oszc,oszc")]
154 ; We can negate an SImode by operating on the subparts. GCC deals
155 ; with this itself for larger modes, but not SI.
156 (define_insn "negsi2"
157 [(set (match_operand:SI 0 "mra_operand" "=SdR03,??Rmm")
158 (neg:SI (match_operand:SI 1 "mra_operand" "0,0")))]
160 "not.w %h0 | not.w %H0 | add.w #1,%h0 | adcf.w %H0"
161 [(set_attr "flags" "oszc,oszc")]
164 (define_insn "absqi2"
165 [(set (match_operand:QI 0 "mra_operand" "=RhlSd,??Rmm")
166 (abs:QI (match_operand:QI 1 "mra_operand" "0,0")))]
169 [(set_attr "flags" "oszc")]
172 (define_insn "abshi2"
173 [(set (match_operand:HI 0 "mra_operand" "=RhiSd,??Rmm")
174 (abs:HI (match_operand:HI 1 "mra_operand" "0,0")))]
177 [(set_attr "flags" "oszc")]