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 "m32c_nonimmediate_operand"
39 "=SdRhi,SdRhi,??Rmm,??Rmm, SdRhi,??Rmm, Rhi, Raw, Raw, !Rsp")
40 (plus:HI (match_operand:HI 1 "m32c_any_operand"
41 "%0,0,0,0, 0,0, Raw, Rfb, Rfb, 0")
42 (match_operand:HI 2 "m32c_any_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 "m32c_nonimmediate_operand" "=Rpi,Raa,SdRpi,SdRpi,Rsp*Rmm, Rpi,Rpi")
61 (plus:PSI (match_operand:PSI 1 "m32c_nonimmediate_operand" "0,0,0,0,0, Raa,Rad")
62 (match_operand:PSI 2 "m32c_any_operand" "Is3,IS1,iSdRpi,?Rmm,i, i,IS2")))]
72 [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,*,*")]
76 [(set (match_operand:QI 0 "mra_or_sp_operand"
77 "=SdRhl,SdRhl,??Rmm,??Rmm, Raa,Raa,SdRhl,??Rmm, *Rsp")
78 (minus:QI (match_operand:QI 1 "mra_operand"
79 "0,0,0,0, 0,0,0,0, 0")
80 (match_operand:QI 2 "mrai_operand"
81 "iSdRhl,?Rmm,iSdRhl,?Rmm, iSdRhl,?Rmm,Raa,Raa, i")))]
84 [(set_attr "flags" "oszc")]
88 [(set (match_operand:HI 0 "mra_operand"
89 "=SdRhi,SdRhi,??Rmm,??Rmm, SdRhi,??Rmm")
90 (minus:HI (match_operand:HI 1 "mras_operand"
92 (match_operand:HI 2 "mrai_operand"
93 "IU2SdRhi,?Rmm,IU2SdRhi,?Rmm, IM2,IM2")))]
102 [(set_attr "flags" "oszc,oszc,oszc,oszc,oszc,oszc")]
105 (define_insn "subpsi3"
106 [(set (match_operand:PSI 0 "mra_operand" "=RpiSd,RpiSd,??Rmm,??Rmm")
107 (minus:PSI (match_operand:PSI 1 "mra_operand" "0,0,0,0")
108 (match_operand:PSI 2 "mrai_operand" "iRpiSd,?Rmm,iRpiSd,?Rmm")))]
111 [(set_attr "flags" "oszc")]
114 (define_insn "negqi2"
115 [(set (match_operand:QI 0 "mra_operand" "=SdRhl,??Rmm")
116 (neg:QI (match_operand:QI 1 "mra_operand" "0,0")))]
119 [(set_attr "flags" "oszc,oszc")]
122 (define_insn "neghi2"
123 [(set (match_operand:HI 0 "mra_operand" "=SdRhi,??Rmm")
124 (neg:HI (match_operand:HI 1 "mra_operand" "0,0")))]
127 [(set_attr "flags" "oszc,oszc")]
130 ; We can negate an SImode by operating on the subparts. GCC deals
131 ; with this itself for larger modes, but not SI.
132 (define_insn "negsi2"
133 [(set (match_operand:SI 0 "mra_operand" "=SdR03,??Rmm")
134 (neg:SI (match_operand:SI 1 "mra_operand" "0,0")))]
136 "not.w %h0 | not.w %H0 | add.w #1,%h0 | adcf.w %H0"
137 [(set_attr "flags" "oszc,oszc")]
140 (define_insn "absqi2"
141 [(set (match_operand:QI 0 "mra_operand" "=RhlSd,??Rmm")
142 (abs:QI (match_operand:QI 1 "mra_operand" "0,0")))]
145 [(set_attr "flags" "oszc")]
148 (define_insn "abshi2"
149 [(set (match_operand:HI 0 "mra_operand" "=RhiSd,??Rmm")
150 (abs:HI (match_operand:HI 1 "mra_operand" "0,0")))]
153 [(set_attr "flags" "oszc")]