123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644 |
- ;;- Machine description for GNU compiler
- ;;- Vax Version
- ;; Copyright (C) 1987 Free Software Foundation, Inc.
- ;; This file is part of GNU CC.
- ;; GNU CC is distributed in the hope that it will be useful,
- ;; but WITHOUT ANY WARRANTY. No author or distributor
- ;; accepts responsibility to anyone for the consequences of using it
- ;; or for whether it serves any particular purpose or works at all,
- ;; unless he says so in writing. Refer to the GNU CC General Public
- ;; License for full details.
- ;; Everyone is granted permission to copy, modify and redistribute
- ;; GNU CC, but only under the conditions described in the
- ;; GNU CC General Public License. A copy of this license is
- ;; supposed to have been given to you along with GNU CC so you
- ;; can know your rights and responsibilities. It should be in a
- ;; file named COPYING. Among other things, the copyright notice
- ;; and this notice must be preserved on all copies.
- ;;- Instruction patterns. When multiple patterns apply,
- ;;- the first one in the file is chosen.
- ;;-
- ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
- ;;-
- ;;- cpp macro #define NOTICE_UPDATE_CC in file tm.h handles condition code
- ;;- updates for most instructions.
- (define_insn "tstdf"
- [(set (cc0)
- (match_operand:DF 0 "general_operand" "gF"))]
- ""
- "tstd %0")
- (define_insn "tstsf"
- [(set (cc0)
- (match_operand:SF 0 "general_operand" "gF"))]
- ""
- "tstf %0")
- (define_insn "tstsi"
- [(set (cc0)
- (match_operand:SI 0 "general_operand" "g"))]
- ""
- "tstl %0")
- (define_insn "tsthi"
- [(set (cc0)
- (match_operand:HI 0 "general_operand" "g"))]
- ""
- "tstw %0")
- (define_insn "tstqi"
- [(set (cc0)
- (match_operand:QI 0 "general_operand" "g"))]
- ""
- "tstb %0")
- (define_insn "cmpdf"
- [(set (cc0)
- (minus (match_operand:DF 0 "general_operand" "gF")
- (match_operand:DF 1 "general_operand" "gF")))]
- ""
- "cmpd %0,%1")
- (define_insn "cmpsf"
- [(set (cc0)
- (minus (match_operand:SF 0 "general_operand" "gF")
- (match_operand:SF 1 "general_operand" "gF")))]
- ""
- "cmpf %0,%1")
- (define_insn "cmpsi"
- [(set (cc0)
- (minus (match_operand:SI 0 "general_operand" "g")
- (match_operand:SI 1 "general_operand" "g")))]
- ""
- "cmpl %0,%1")
- (define_insn "cmphi"
- [(set (cc0)
- (minus (match_operand:HI 0 "general_operand" "g")
- (match_operand:HI 1 "general_operand" "g")))]
- ""
- "cmpw %0,%1")
- (define_insn "cmpqi"
- [(set (cc0)
- (minus (match_operand:QI 0 "general_operand" "g")
- (match_operand:QI 1 "general_operand" "g")))]
- ""
- "cmpb %0,%1")
- (define_insn ""
- [(set (cc0)
- (and:SI (match_operand:SI 0 "general_operand" "g")
- (match_operand:SI 1 "general_operand" "g")))]
- ""
- "bitl %0,%1")
- (define_insn ""
- [(set (cc0)
- (and:HI (match_operand:HI 0 "general_operand" "g")
- (match_operand:HI 1 "general_operand" "g")))]
- ""
- "bitw %0,%1")
- (define_insn ""
- [(set (cc0)
- (and:QI (match_operand:QI 0 "general_operand" "g")
- (match_operand:QI 1 "general_operand" "g")))]
- ""
- "bitb %0,%1")
- (define_insn "movdf"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (match_operand:DF 1 "general_operand" "gF"))]
- ""
- "*
- {
- if (operands[1] == dconst0_rtx)
- return \"clrd %0\";
- return \"movd %1,%0\";
- }")
- (define_insn "movsf"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (match_operand:SF 1 "general_operand" "gF"))]
- ""
- "*
- {
- if (operands[1] == fconst0_rtx)
- return \"clrf %0\";
- return \"movf %1,%0\";
- }")
- (define_insn "movti"
- [(set (match_operand:TI 0 "general_operand" "=g")
- (match_operand:TI 1 "general_operand" "g"))]
- ""
- "movh %1,%0")
- (define_insn "movdi"
- [(set (match_operand:DI 0 "general_operand" "=g")
- (match_operand:DI 1 "general_operand" "g"))]
- ""
- "movd %1,%0")
- (define_insn "movsi"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (match_operand:SI 1 "general_operand" "g"))]
- ""
- "*
- { if (operands[1] == const1_rtx
- && GET_MODE (REG_NOTES (insn)) == (enum machine_mode) REG_WAS_0)
- return \"incl %0\";
- if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
- {
- if (push_operand (operands[0], SImode))
- return \"pushab %a1\";
- return \"movab %a1,%0\";
- }
- if (operands[1] == const0_rtx)
- return \"clrl %0\";
- if (GET_CODE (operands[1]) == CONST_INT
- && (unsigned) INTVAL (operands[1]) >= 64)
- {
- int i = INTVAL (operands[1]);
- if ((unsigned)(-i) < 64)
- {
- operands[1] = gen_rtx (CONST_INT, VOIDmode, -i);
- return \"mnegl %1,%0\";
- }
- if ((unsigned)i < 0x100)
- return \"movzbl %1,%0\";
- if (i >= -0x80 && i < 0)
- return \"cvtbl %1,%0\";
- if ((unsigned)i < 0x10000)
- return \"movzwl %1,%0\";
- if (i >= -0x8000 && i < 0)
- return \"cvtwl %1,%0\";
- }
- if (push_operand (operands[0], SImode))
- return \"pushl %1\";
- return \"movl %1,%0\";
- }")
- (define_insn "movhi"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (match_operand:HI 1 "general_operand" "g"))]
- ""
- "*
- {
- if (operands[1] == const1_rtx
- && GET_MODE (REG_NOTES (insn)) == (enum machine_mode) REG_WAS_0)
- return \"incw %0\";
- if (operands[1] == const0_rtx)
- return \"clrw %0\";
- if (GET_CODE (operands[1]) == CONST_INT
- && (unsigned) INTVAL (operands[1]) >= 64)
- {
- int i = INTVAL (operands[1]);
- if ((unsigned)(-i) < 64)
- {
- operands[1] = gen_rtx (CONST_INT, VOIDmode, -i);
- return \"mnegw %1,%0\";
- }
- if ((unsigned)i < 0x100)
- return \"movzbw %1,%0\";
- if (i >= -0x80 && i < 0)
- return \"cvtbw %1,%0\";
- }
- return \"movw %1,%0\";
- }")
- (define_insn "movqi"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (match_operand:QI 1 "general_operand" "g"))]
- ""
- "*
- {
- if (operands[1] == const0_rtx)
- return \"clrb %0\";
- return \"movb %1,%0\";
- }")
- ;; The definition of this insn does not really explain what it does,
- ;; but it should suffice
- ;; that anything generated as this insn will be recognized as one
- ;; and that it won't successfully combine with anything.
- (define_insn "movstrhi"
- [(set (match_operand:BLK 0 "general_operand" "=g")
- (match_operand:BLK 1 "general_operand" "g"))
- (use (match_operand:HI 2 "general_operand" "g"))
- (clobber (nil)) ;;- Clobber everything in memory
- (clobber (reg 0))
- (clobber (reg 1))
- (clobber (reg 2))
- (clobber (reg 3))
- (clobber (reg 4))
- (clobber (reg 5))]
- ""
- "movc3 %2,%1,%0")
- ;;- load or push effective address
- ;; These come after the move patterns
- ;; because we don't want pushl $1 turned into pushad 1.
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (match_operand:QI 1 "address_operand" "p"))]
- ""
- "*
- {
- if (push_operand (operands[0], SImode))
- return \"pushab %a1\";
- return \"movab %a1,%0\";
- }")
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (match_operand:HI 1 "address_operand" "p"))]
- ""
- "*
- {
- if (push_operand (operands[0], SImode))
- return \"pushaw %a1\";
- return \"movaw %a1,%0\";
- }")
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (match_operand:SI 1 "address_operand" "p"))]
- ""
- "*
- {
- if (push_operand (operands[0], SImode))
- return \"pushal %a1\";
- return \"moval %a1,%0\";
- }")
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (match_operand:SF 1 "address_operand" "p"))]
- ""
- "*
- {
- if (push_operand (operands[0], SImode))
- return \"pushaf %a1\";
- return \"movaf %a1,%0\";
- }")
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (match_operand:DF 1 "address_operand" "p"))]
- ""
- "*
- {
- if (push_operand (operands[0], SImode))
- return \"pushad %a1\";
- return \"movad %a1,%0\";
- }")
- (define_insn "extendqihi2"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (sign_extend:HI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "cvtbw %1,%0")
- (define_insn "extendqisi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (sign_extend:SI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "cvtbl %1,%0")
- (define_insn "floatqisf2"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (float:SF (match_operand:QI 1 "general_operand" "g")))]
- ""
- "cvtbf %1,%0")
- (define_insn "floatqidf2"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (float:DF (match_operand:QI 1 "general_operand" "g")))]
- ""
- "cvtbd %1,%0")
- (define_insn "trunchiqi2"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (truncate:QI (match_operand:HI 1 "general_operand" "g")))]
- ""
- "cvtwb %1,%0")
- (define_insn "extendhisi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (sign_extend:SI (match_operand:HI 1 "general_operand" "g")))]
- ""
- "cvtwl %1,%0")
- (define_insn "floathisf2"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (float:SF (match_operand:HI 1 "general_operand" "g")))]
- ""
- "cvtwf %1,%0")
- (define_insn "floathidf2"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (float:DF (match_operand:HI 1 "general_operand" "g")))]
- ""
- "cvtwd %1,%0")
- (define_insn "truncsiqi2"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (truncate:QI (match_operand:SI 1 "general_operand" "g")))]
- ""
- "cvtlb %1,%0")
- (define_insn "truncsihi2"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (truncate:HI (match_operand:SI 1 "general_operand" "g")))]
- ""
- "cvtlw %1,%0")
- (define_insn "floatsisf2"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (float:SF (match_operand:SI 1 "general_operand" "g")))]
- ""
- "cvtlf %1,%0")
- (define_insn "floatsidf2"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (float:DF (match_operand:SI 1 "general_operand" "g")))]
- ""
- "cvtld %1,%0")
- (define_insn "fixsfqi2"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (fix:QI (match_operand:SF 1 "general_operand" "gF")))]
- ""
- "cvtfb %1,%0")
- (define_insn "fixsfhi2"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (fix:HI (match_operand:SF 1 "general_operand" "gF")))]
- ""
- "cvtfw %1,%0")
- (define_insn "fixsfsi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (fix:SI (match_operand:SF 1 "general_operand" "gF")))]
- ""
- "cvtfl %1,%0")
- (define_insn "extendsfdf2"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (float_extend:DF (match_operand:SF 1 "general_operand" "gF")))]
- ""
- "cvtfd %1,%0")
- (define_insn "fixdfqi2"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (fix:QI (match_operand:DF 1 "general_operand" "gF")))]
- ""
- "cvtdb %1,%0")
- (define_insn "fixdfhi2"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (fix:HI (match_operand:DF 1 "general_operand" "gF")))]
- ""
- "cvtdw %1,%0")
- (define_insn "fixdfsi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (fix:SI (match_operand:DF 1 "general_operand" "gF")))]
- ""
- "cvtdl %1,%0")
- (define_insn "truncdfsf2"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (float_truncate:SF (match_operand:DF 1 "general_operand" "gF")))]
- ""
- "cvtdf %1,%0")
- (define_insn "zero_extendqihi2"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (zero_extend:HI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "movzbw %1,%0")
- (define_insn "zero_extendqisi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (zero_extend:SI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "movzbl %1,%0")
- (define_insn "zero_extendhisi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (zero_extend:SI (match_operand:HI 1 "general_operand" "g")))]
- ""
- "movzwl %1,%0")
- ;;- All kinds of add instructions.
- (define_insn "adddf3"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (plus:DF (match_operand:DF 1 "general_operand" "gF")
- (match_operand:DF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"addd2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addd2 %1,%0\";
- return \"addd3 %1,%2,%0\";
- }")
- (define_insn "addsf3"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (plus:SF (match_operand:SF 1 "general_operand" "gF")
- (match_operand:SF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"addf2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addf2 %1,%0\";
- return \"addf3 %1,%2,%0\";
- }")
- (define_insn "addsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (plus:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"incl %0\";
- if (GET_CODE (operands[1]) == CONST_INT
- && INTVAL (operands[1]) == -1)
- return \"decl %0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subl2 $%n2,%0\";
- return \"addl2 %2,%0\";
- }
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addl2 %1,%0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && GET_CODE (operands[1]) == REG)
- {
- if (push_operand (operands[0], SImode))
- return \"pushab %c2(%1)\";
- return \"movab %c2(%1),%0\";
- }
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subl3 $%n2,%1,%0\";
- return \"addl3 %1,%2,%0\";
- }")
- (define_insn "addhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (plus:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"incw %0\";
- if (GET_CODE (operands[1]) == CONST_INT
- && INTVAL (operands[1]) == -1)
- return \"decw %0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subw2 $%n2,%0\";
- return \"addw2 %2,%0\";
- }
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addw2 %1,%0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subw3 $%n2,%1,%0\";
- return \"addw3 %1,%2,%0\";
- }")
- (define_insn "addqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (plus:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"incb %0\";
- if (GET_CODE (operands[1]) == CONST_INT
- && INTVAL (operands[1]) == -1)
- return \"decb %0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subb2 $%n2,%0\";
- return \"addb2 %2,%0\";
- }
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addb2 %1,%0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subb3 $%n2,%1,%0\";
- return \"addb3 %1,%2,%0\";
- }")
- ;;- All kinds of subtract instructions.
- (define_insn "subdf3"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (minus:DF (match_operand:DF 1 "general_operand" "gF")
- (match_operand:DF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"subd2 %2,%0\";
- return \"subd3 %2,%1,%0\";
- }")
- (define_insn "subsf3"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (minus:SF (match_operand:SF 1 "general_operand" "gF")
- (match_operand:SF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"subf2 %2,%0\";
- return \"subf3 %2,%1,%0\";
- }")
- (define_insn "subsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (minus:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"decl %0\";
- return \"subl2 %2,%0\";
- }
- return \"subl3 %2,%1,%0\";
- }")
- (define_insn "subhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (minus:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"decw %0\";
- return \"subw2 %2,%0\";
- }
- return \"subw3 %2,%1,%0\";
- }")
- (define_insn "subqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (minus:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"decb %0\";
- return \"subb2 %2,%0\";
- }
- return \"subb3 %2,%1,%0\";
- }")
- ;;- Multiply instructions.
- (define_insn "muldf3"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (mult:DF (match_operand:DF 1 "general_operand" "gF")
- (match_operand:DF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"muld2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"muld2 %1,%0\";
- return \"muld3 %1,%2,%0\";
- }")
- (define_insn "mulsf3"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (mult:SF (match_operand:SF 1 "general_operand" "gF")
- (match_operand:SF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"mulf2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"mulf2 %1,%0\";
- return \"mulf3 %1,%2,%0\";
- }")
- (define_insn "mulsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (mult:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"mull2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"mull2 %1,%0\";
- return \"mull3 %1,%2,%0\";
- }")
- (define_insn "mulhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (mult:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"mulw2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"mulw2 %1,%0\";
- return \"mulw3 %1,%2,%0\";
- }")
- (define_insn "mulqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (mult:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"mulb2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"mulb2 %1,%0\";
- return \"mulb3 %1,%2,%0\";
- }")
- ;;- Divide instructions.
- (define_insn "divdf3"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (div:DF (match_operand:DF 1 "general_operand" "gF")
- (match_operand:DF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"divd2 %2,%0\";
- return \"divd3 %2,%1,%0\";
- }")
- (define_insn "divsf3"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (div:SF (match_operand:SF 1 "general_operand" "gF")
- (match_operand:SF 2 "general_operand" "gF")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"divf2 %2,%0\";
- return \"divf3 %2,%1,%0\";
- }")
- (define_insn "divsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (div:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"divl2 %2,%0\";
- return \"divl3 %2,%1,%0\";
- }")
- (define_insn "divhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (div:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"divw2 %2,%0\";
- return \"divw3 %2,%1,%0\";
- }")
- (define_insn "divqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (div:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"divb2 %2,%0\";
- return \"divb3 %2,%1,%0\";
- }")
- ;This is left out because it is very slow;
- ;we are better off programming around the "lack" of this insn.
- ;(define_insn "divmoddisi4"
- ; [(set (match_operand:SI 0 "general_operand" "=g")
- ; (div:SI (match_operand:DI 1 "general_operand" "g")
- ; (match_operand:SI 2 "general_operand" "g")))
- ; (set (match_operand:SI 3 "general_operand" "=g")
- ; (mod:SI (match_operand:DI 1 "general_operand" "g")
- ; (match_operand:SI 2 "general_operand" "g")))]
- ; ""
- ; "ediv %2,%1,%0,%3")
- (define_insn "andcbsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (and:SI (match_operand:SI 1 "general_operand" "g")
- (not:SI (match_operand:SI 2 "general_operand" "g"))))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"bicl2 %2,%0\";
- return \"bicl3 %2,%1,%0\";
- }")
- (define_insn "andcbhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (and:HI (match_operand:HI 1 "general_operand" "g")
- (not:HI (match_operand:HI 2 "general_operand" "g"))))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"bicw2 %2,%0\";
- return \"bicw3 %2,%1,%0\";
- }")
- (define_insn "andcbqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (and:QI (match_operand:QI 1 "general_operand" "g")
- (not:QI (match_operand:QI 2 "general_operand" "g"))))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"bicb2 %2,%0\";
- return \"bicb3 %2,%1,%0\";
- }")
- ;; The following are needed because constant propagation can
- ;; create them starting from the bic insn patterns above.
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (and:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- "GET_CODE (operands[2]) == CONST_INT"
- "*
- { operands[2] = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[2]));
- if (rtx_equal_p (operands[1], operands[0]))
- return \"bicl2 %2,%0\";
- return \"bicl3 %2,%1,%0\";
- }")
- (define_insn ""
- [(set (match_operand:HI 0 "general_operand" "=g")
- (and:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- "GET_CODE (operands[2]) == CONST_INT"
- "*
- { operands[2] = gen_rtx (CONST_INT, VOIDmode, 0xffff & ~INTVAL (operands[2]));
- if (rtx_equal_p (operands[1], operands[0]))
- return \"bicw2 %2,%0\";
- return \"bicw3 %2,%1,%0\";
- }")
- (define_insn ""
- [(set (match_operand:QI 0 "general_operand" "=g")
- (and:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- "GET_CODE (operands[2]) == CONST_INT"
- "*
- { operands[2] = gen_rtx (CONST_INT, VOIDmode, 0xff & ~INTVAL (operands[2]));
- if (rtx_equal_p (operands[1], operands[0]))
- return \"bicb2 %2,%0\";
- return \"bicb3 %2,%1,%0\";
- }")
- ;;- Bit set instructions.
- (define_insn "iorsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (ior:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"bisl2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"bisl2 %1,%0\";
- return \"bisl3 %2,%1,%0\";
- }")
- (define_insn "iorhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (ior:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"bisw2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"bisw2 %1,%0\";
- return \"bisw3 %2,%1,%0\";
- }")
- (define_insn "iorqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (ior:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"bisb2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"bisb2 %1,%0\";
- return \"bisb3 %2,%1,%0\";
- }")
- ;;- xor instructions.
- (define_insn "xorsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (xor:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"xorl2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"xorl2 %1,%0\";
- return \"xorl3 %2,%1,%0\";
- }")
- (define_insn "xorhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (xor:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"xorw2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"xorw2 %1,%0\";
- return \"xorw3 %2,%1,%0\";
- }")
- (define_insn "xorqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (xor:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "*
- {
- if (rtx_equal_p (operands[0], operands[1]))
- return \"xorb2 %2,%0\";
- if (rtx_equal_p (operands[0], operands[2]))
- return \"xorb2 %1,%0\";
- return \"xorb3 %2,%1,%0\";
- }")
- (define_insn "negdf2"
- [(set (match_operand:DF 0 "general_operand" "=g")
- (neg:DF (match_operand:DF 1 "general_operand" "gF")))]
- ""
- "mnegd %1,%0")
- (define_insn "negsf2"
- [(set (match_operand:SF 0 "general_operand" "=g")
- (neg:SF (match_operand:SF 1 "general_operand" "gF")))]
- ""
- "mnegf %1,%0")
- (define_insn "negsi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (neg:SI (match_operand:SI 1 "general_operand" "g")))]
- ""
- "mnegl %1,%0")
- (define_insn "neghi2"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (neg:HI (match_operand:HI 1 "general_operand" "g")))]
- ""
- "mnegw %1,%0")
- (define_insn "negqi2"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (neg:QI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "mnegb %1,%0")
- (define_insn "one_cmplsi2"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (not:SI (match_operand:SI 1 "general_operand" "g")))]
- ""
- "mcoml %1,%0")
- (define_insn "one_cmplhi2"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (not:HI (match_operand:HI 1 "general_operand" "g")))]
- ""
- "mcomw %1,%0")
- (define_insn "one_cmplqi2"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (not:QI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "mcomb %1,%0")
- (define_insn "ashlsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (ashift:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "ashl %2,%1,%0")
- (define_insn "ashldi3"
- [(set (match_operand:DI 0 "general_operand" "=g")
- (ashift:DI (match_operand:DI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "ashq %2,%1,%0")
- (define_insn "rotlsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (rotate:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "rotl %2,%1,%0")
- (define_insn "rotldi3"
- [(set (match_operand:DI 0 "general_operand" "=g")
- (rotate:DI (match_operand:DI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
- ""
- "rotq %2,%1,%0")
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (mult:SI (plus:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g"))
- (match_operand:SI 3 "general_operand" "g")))]
- ""
- "index %1,$??,$??,%3,%2,%0")
- (define_insn ""
- [(set (cc0)
- (minus
- (sign_extract:SI (match_operand:QI 0 "general_operand" "g")
- (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g"))
- (match_operand:SI 3 "general_operand" "g")))]
- ""
- "cmpv %2,%1,%0,%3")
- (define_insn ""
- [(set (cc0)
- (minus
- (zero_extract:SI (match_operand:QI 0 "general_operand" "g")
- (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g"))
- (match_operand:SI 3 "general_operand" "g")))]
- ""
- "cmpzv %2,%1,%0,%3")
- (define_insn "extv"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (sign_extract:SI (match_operand:QI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")
- (match_operand:SI 3 "general_operand" "g")))]
- ""
- "extv %3,%2,%1,%0")
- (define_insn "extzv"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (zero_extract:SI (match_operand:QI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")
- (match_operand:SI 3 "general_operand" "g")))]
- ""
- "extzv %3,%2,%1,%0")
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (sign_extract:SI (match_operand:SI 1 "general_operand" "r")
- (match_operand:SI 2 "general_operand" "g")
- (match_operand:SI 3 "general_operand" "g")))]
- ""
- "extv %3,%2,%1,%0")
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "=g")
- (zero_extract:SI (match_operand:SI 1 "general_operand" "r")
- (match_operand:SI 2 "general_operand" "g")
- (match_operand:SI 3 "general_operand" "g")))]
- ""
- "extzv %3,%2,%1,%0")
- (define_insn "insv"
- [(set (zero_extract:SI (match_operand:QI 0 "general_operand" "=g")
- (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g"))
- (match_operand:SI 3 "general_operand" "g"))]
- ""
- "insv %3,%2,%1,%0")
- (define_insn ""
- [(set (zero_extract:SI (match_operand:SI 0 "general_operand" "=r")
- (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g"))
- (match_operand:SI 3 "general_operand" "g"))]
- ""
- "insv %3,%2,%1,%0")
- (define_insn "jump"
- [(set (pc)
- (label_ref (match_operand 0 "" "")))]
- ""
- "jbr %l0")
- (define_insn "beq"
- [(set (pc)
- (if_then_else (eq (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jeql %l0")
- (define_insn "bne"
- [(set (pc)
- (if_then_else (ne (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jneq %l0")
- (define_insn "bgt"
- [(set (pc)
- (if_then_else (gt (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgtr %l0")
- (define_insn "bgtu"
- [(set (pc)
- (if_then_else (gtu (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgtru %l0")
- (define_insn "blt"
- [(set (pc)
- (if_then_else (lt (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jlss %l0")
- (define_insn "bltu"
- [(set (pc)
- (if_then_else (ltu (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jlssu %l0")
- (define_insn "bge"
- [(set (pc)
- (if_then_else (ge (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgeq %l0")
- (define_insn "bgeu"
- [(set (pc)
- (if_then_else (geu (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgequ %l0")
- (define_insn "ble"
- [(set (pc)
- (if_then_else (le (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jleq %l0")
- (define_insn "bleu"
- [(set (pc)
- (if_then_else (leu (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jlequ %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (eq (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jneq %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (ne (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jeql %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (gt (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jleq %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (gtu (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jlequ %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (lt (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jgeq %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (ltu (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jgequ %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (ge (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jlss %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (geu (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jlssu %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (le (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jgtr %l0")
- (define_insn ""
- [(set (pc)
- (if_then_else (leu (cc0)
- (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "jgtru %l0")
- ;; Recognize jbs and jbc instructions.
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (sign_extract:SI (match_operand:QI 0 "general_operand" "g")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (label_ref (match_operand 2 "" ""))
- (pc)))]
- ""
- "jbs %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (sign_extract:SI (match_operand:QI 0 "general_operand" "g")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (label_ref (match_operand 2 "" ""))
- (pc)))]
- ""
- "jbc %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (sign_extract:SI (match_operand:QI 0 "general_operand" "g")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (pc)
- (label_ref (match_operand 2 "" ""))))]
- ""
- "jbc %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (sign_extract:SI (match_operand:QI 0 "general_operand" "g")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (pc)
- (label_ref (match_operand 2 "" ""))))]
- ""
- "jbs %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (sign_extract:SI (match_operand:SI 0 "general_operand" "r")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (label_ref (match_operand 2 "" ""))
- (pc)))]
- ""
- "jbs %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (sign_extract:SI (match_operand:SI 0 "general_operand" "r")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (label_ref (match_operand 2 "" ""))
- (pc)))]
- ""
- "jbc %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (sign_extract:SI (match_operand:SI 0 "general_operand" "r")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (pc)
- (label_ref (match_operand 2 "" ""))))]
- ""
- "jbc %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (sign_extract:SI (match_operand:SI 0 "general_operand" "r")
- (const_int 1)
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (pc)
- (label_ref (match_operand 2 "" ""))))]
- ""
- "jbs %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (and:SI (match_operand:SI 0 "general_operand" "g")
- (const_int 1))
- (const_int 0))
- (label_ref (match_operand 1 "" ""))
- (pc)))]
- ""
- "jlbs %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (and:SI (match_operand:SI 0 "general_operand" "g")
- (const_int 1))
- (const_int 0))
- (label_ref (match_operand 1 "" ""))
- (pc)))]
- ""
- "jlbc %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (and:SI (match_operand:SI 0 "general_operand" "g")
- (const_int 1))
- (const_int 0))
- (pc)
- (label_ref (match_operand 1 "" ""))))]
- ""
- "jlbc %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (and:SI (match_operand:SI 0 "general_operand" "g")
- (const_int 1))
- (const_int 0))
- (pc)
- (label_ref (match_operand 1 "" ""))))]
- ""
- "jlbs %0,%l1")
- ;; These four entries allow a jlbc or jlbs to be made
- ;; by combination with a bic.
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (and:SI (match_operand:SI 0 "general_operand" "g")
- (not:SI (const_int -2)))
- (const_int 0))
- (label_ref (match_operand 1 "" ""))
- (pc)))]
- ""
- "jlbs %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (and:SI (match_operand:SI 0 "general_operand" "g")
- (not:SI (const_int -2)))
- (const_int 0))
- (label_ref (match_operand 1 "" ""))
- (pc)))]
- ""
- "jlbc %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ne (and:SI (match_operand:SI 0 "general_operand" "g")
- (not:SI (const_int -2)))
- (const_int 0))
- (pc)
- (label_ref (match_operand 1 "" ""))))]
- ""
- "jlbc %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (eq (and:SI (match_operand:SI 0 "general_operand" "g")
- (not:SI (const_int -2)))
- (const_int 0))
- (pc)
- (label_ref (match_operand 1 "" ""))))]
- ""
- "jlbs %0,%l1")
- ;; Subtract-and-jump and Add-and-jump insns.
- ;; These are not used when output is for the Unix assembler
- ;; because it does not know how to modify them to reach far.
- ;; Normal sob insns.
- (define_insn ""
- [(set (pc)
- (if_then_else
- (gt (minus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (const_int 0))
- (label_ref (match_operand 1 "" ""))
- (pc)))
- (set (match_dup 0)
- (minus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jsobgtr %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ge (minus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (const_int 0))
- (label_ref (match_operand 1 "" ""))
- (pc)))
- (set (match_dup 0)
- (minus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jsobgeq %0,%l1")
- ;; Reversed sob insns.
- (define_insn ""
- [(set (pc)
- (if_then_else
- (le (minus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (const_int 0))
- (pc)
- (label_ref (match_operand 1 "" ""))))
- (set (match_dup 0)
- (minus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jsobgtr %0,%l1")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (lt (minus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (const_int 0))
- (pc)
- (label_ref (match_operand 1 "" ""))))
- (set (match_dup 0)
- (minus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jsobgeq %0,%l1")
- ;; Normal aob insns.
- (define_insn ""
- [(set (pc)
- (if_then_else
- (lt (minus (plus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (label_ref (match_operand 2 "" ""))
- (pc)))
- (set (match_dup 0)
- (plus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jaoblss %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (le (minus (plus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (label_ref (match_operand 2 "" ""))
- (pc)))
- (set (match_dup 0)
- (plus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jaobleq %1,%0,%l2")
- ;; Reverse aob insns.
- (define_insn ""
- [(set (pc)
- (if_then_else
- (ge (minus (plus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (pc)
- (label_ref (match_operand 2 "" ""))))
- (set (match_dup 0)
- (plus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jaoblss %1,%0,%l2")
- (define_insn ""
- [(set (pc)
- (if_then_else
- (gt (minus (plus:SI (match_operand:SI 0 "general_operand" "+g")
- (const_int 1))
- (match_operand:SI 1 "general_operand" "g"))
- (const_int 0))
- (pc)
- (label_ref (match_operand 2 "" ""))))
- (set (match_dup 0)
- (plus:SI (match_dup 0)
- (const_int 1)))]
- "!TARGET_UNIX_ASM"
- "jaobleq %1,%0,%l2")
- (define_insn "call"
- [(call (match_operand:QI 0 "general_operand" "g")
- (match_operand:QI 1 "general_operand" "g"))]
- ""
- "calls %1,%0")
- (define_insn "return"
- [(return)]
- ""
- "ret")
- (define_insn "casesi"
- [(set (pc)
- (if_then_else (le (minus:SI (match_operand:SI 0 "general_operand" "g")
- (match_operand:SI 1 "general_operand" "g"))
- (match_operand:SI 2 "general_operand" "g"))
- (plus:SI (label_ref:SI (match_operand 3 "" ""))
- (sign_extend:SI
- (mem:HI (plus:SI (pc)
- (minus:SI (match_dup 0)
- (match_dup 1))))))
- (pc)))]
- ""
- "casel %0,%1,%2")
- ;; This arises from the preceding by simplification if operand 1 is zero.
- (define_insn ""
- [(set (pc)
- (if_then_else (le (match_operand:SI 0 "general_operand" "g")
- (match_operand:SI 1 "general_operand" "g"))
- (plus:SI (label_ref:SI (match_operand 3 "" ""))
- (sign_extend:SI
- (mem:HI (plus:SI (pc)
- (match_dup 0)))))
- (pc)))]
- ""
- "casel %0,$0,%1")
- ;;- Local variables:
- ;;- mode:emacs-lisp
- ;;- comment-start: ";;- "
- ;;- eval: (set-syntax-table (copy-sequence (syntax-table)))
- ;;- eval: (modify-syntax-entry ?[ "(]")
- ;;- eval: (modify-syntax-entry ?] ")[")
- ;;- eval: (modify-syntax-entry ?{ "(}")
- ;;- eval: (modify-syntax-entry ?} "){")
- ;;- End:
|