1 ;;- Machine description for HP PA-RISC architecture for GCC compiler
2 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
3 ;; 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4 ;; Contributed by the Center for Software Science at the University
7 ;; This file is part of GCC.
9 ;; GCC is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; GCC is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GCC; see the file COPYING. If not, write to
21 ;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 ;; Boston, MA 02110-1301, USA.
24 ;; This gcc Version 2 machine description is inspired by sparc.md and
27 ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
29 ;; Uses of UNSPEC in this file:
32 [(UNSPEC_CFFC 0) ; canonicalize_funcptr_for_compare
33 (UNSPEC_GOTO 1) ; indirect_goto
34 (UNSPEC_DLTIND14R 2) ;
47 [(UNSPECV_BLOCKAGE 0) ; blockage
48 (UNSPECV_DCACHE 1) ; dcacheflush
49 (UNSPECV_ICACHE 2) ; icacheflush
50 (UNSPECV_OPC 3) ; outline_prologue_call
51 (UNSPECV_OEC 4) ; outline_epilogue_call
52 (UNSPECV_LONGJMP 5) ; builtin_longjmp
55 ;; Maximum pc-relative branch offsets.
57 ;; These numbers are a bit smaller than the maximum allowable offsets
58 ;; so that a few instructions may be inserted before the actual branch.
61 [(MAX_12BIT_OFFSET 8184) ; 12-bit branch
62 (MAX_17BIT_OFFSET 262100) ; 17-bit branch
65 ;; Insn type. Used to default other attribute values.
67 ;; type "unary" insns have one input operand (1) and one output operand (0)
68 ;; type "binary" insns have two input operands (1,2) and one output (0)
71 "move,unary,binary,shift,nullshift,compare,load,store,uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,fpload,fpstore,fpalu,fpcc,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,multi,milli,parallel_branch"
72 (const_string "binary"))
74 (define_attr "pa_combine_type"
75 "fmpy,faddsub,uncond_branch,addmove,none"
76 (const_string "none"))
78 ;; Processor type (for scheduling, not code generation) -- this attribute
79 ;; must exactly match the processor_type enumeration in pa.h.
81 ;; FIXME: Add 800 scheduling for completeness?
83 (define_attr "cpu" "700,7100,7100LC,7200,7300,8000" (const (symbol_ref "pa_cpu_attr")))
85 ;; Length (in # of bytes).
86 (define_attr "length" ""
87 (cond [(eq_attr "type" "load,fpload")
88 (if_then_else (match_operand 1 "symbolic_memory_operand" "")
89 (const_int 8) (const_int 4))
91 (eq_attr "type" "store,fpstore")
92 (if_then_else (match_operand 0 "symbolic_memory_operand" "")
93 (const_int 8) (const_int 4))
95 (eq_attr "type" "binary,shift,nullshift")
96 (if_then_else (match_operand 2 "arith_operand" "")
97 (const_int 4) (const_int 12))
99 (eq_attr "type" "move,unary,shift,nullshift")
100 (if_then_else (match_operand 1 "arith_operand" "")
101 (const_int 4) (const_int 8))]
105 (define_asm_attributes
106 [(set_attr "length" "4")
107 (set_attr "type" "multi")])
109 ;; Attributes for instruction and branch scheduling
111 ;; For conditional branches.
112 (define_attr "in_branch_delay" "false,true"
113 (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
114 (eq_attr "length" "4"))
115 (const_string "true")
116 (const_string "false")))
118 ;; Disallow instructions which use the FPU since they will tie up the FPU
119 ;; even if the instruction is nullified.
120 (define_attr "in_nullified_branch_delay" "false,true"
121 (if_then_else (and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,parallel_branch")
122 (eq_attr "length" "4"))
123 (const_string "true")
124 (const_string "false")))
126 ;; For calls and millicode calls. Allow unconditional branches in the
128 (define_attr "in_call_delay" "false,true"
129 (cond [(and (eq_attr "type" "!uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
130 (eq_attr "length" "4"))
131 (const_string "true")
132 (eq_attr "type" "uncond_branch")
133 (if_then_else (ne (symbol_ref "TARGET_JUMP_IN_DELAY")
135 (const_string "true")
136 (const_string "false"))]
137 (const_string "false")))
140 ;; Call delay slot description.
141 (define_delay (eq_attr "type" "call")
142 [(eq_attr "in_call_delay" "true") (nil) (nil)])
144 ;; Millicode call delay slot description.
145 (define_delay (eq_attr "type" "milli")
146 [(eq_attr "in_call_delay" "true") (nil) (nil)])
148 ;; Return and other similar instructions.
149 (define_delay (eq_attr "type" "btable_branch,branch,parallel_branch")
150 [(eq_attr "in_branch_delay" "true") (nil) (nil)])
152 ;; Floating point conditional branch delay slot description.
153 (define_delay (eq_attr "type" "fbranch")
154 [(eq_attr "in_branch_delay" "true")
155 (eq_attr "in_nullified_branch_delay" "true")
158 ;; Integer conditional branch delay slot description.
159 ;; Nullification of conditional branches on the PA is dependent on the
160 ;; direction of the branch. Forward branches nullify true and
161 ;; backward branches nullify false. If the direction is unknown
162 ;; then nullification is not allowed.
163 (define_delay (eq_attr "type" "cbranch")
164 [(eq_attr "in_branch_delay" "true")
165 (and (eq_attr "in_nullified_branch_delay" "true")
166 (attr_flag "forward"))
167 (and (eq_attr "in_nullified_branch_delay" "true")
168 (attr_flag "backward"))])
170 (define_delay (and (eq_attr "type" "uncond_branch")
171 (eq (symbol_ref "following_call (insn)")
173 [(eq_attr "in_branch_delay" "true") (nil) (nil)])
175 ;; Memory. Disregarding Cache misses, the Mustang memory times are:
176 ;; load: 2, fpload: 3
177 ;; store, fpstore: 3, no D-cache operations should be scheduled.
179 ;; The Timex (aka 700) has two floating-point units: ALU, and MUL/DIV/SQRT.
181 ;; Instruction Time Unit Minimum Distance (unit contention)
188 ;; fmpyadd 3 ALU,MPY 2
189 ;; fmpysub 3 ALU,MPY 2
190 ;; fmpycfxt 3 ALU,MPY 2
193 ;; fdiv,sgl 10 MPY 10
194 ;; fdiv,dbl 12 MPY 12
195 ;; fsqrt,sgl 14 MPY 14
196 ;; fsqrt,dbl 18 MPY 18
198 ;; We don't model fmpyadd/fmpysub properly as those instructions
199 ;; keep both the FP ALU and MPY units busy. Given that these
200 ;; processors are obsolete, I'm not going to spend the time to
201 ;; model those instructions correctly.
203 (define_automaton "pa700")
204 (define_cpu_unit "dummy_700,mem_700,fpalu_700,fpmpy_700" "pa700")
206 (define_insn_reservation "W0" 4
207 (and (eq_attr "type" "fpcc")
208 (eq_attr "cpu" "700"))
211 (define_insn_reservation "W1" 3
212 (and (eq_attr "type" "fpalu")
213 (eq_attr "cpu" "700"))
216 (define_insn_reservation "W2" 3
217 (and (eq_attr "type" "fpmulsgl,fpmuldbl")
218 (eq_attr "cpu" "700"))
221 (define_insn_reservation "W3" 10
222 (and (eq_attr "type" "fpdivsgl")
223 (eq_attr "cpu" "700"))
226 (define_insn_reservation "W4" 12
227 (and (eq_attr "type" "fpdivdbl")
228 (eq_attr "cpu" "700"))
231 (define_insn_reservation "W5" 14
232 (and (eq_attr "type" "fpsqrtsgl")
233 (eq_attr "cpu" "700"))
236 (define_insn_reservation "W6" 18
237 (and (eq_attr "type" "fpsqrtdbl")
238 (eq_attr "cpu" "700"))
241 (define_insn_reservation "W7" 2
242 (and (eq_attr "type" "load")
243 (eq_attr "cpu" "700"))
246 (define_insn_reservation "W8" 2
247 (and (eq_attr "type" "fpload")
248 (eq_attr "cpu" "700"))
251 (define_insn_reservation "W9" 3
252 (and (eq_attr "type" "store")
253 (eq_attr "cpu" "700"))
256 (define_insn_reservation "W10" 3
257 (and (eq_attr "type" "fpstore")
258 (eq_attr "cpu" "700"))
261 (define_insn_reservation "W11" 1
262 (and (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpdivdbl,fpsqrtsgl,fpsqrtdbl,load,fpload,store,fpstore")
263 (eq_attr "cpu" "700"))
266 ;; We have a bypass for all computations in the FP unit which feed an
267 ;; FP store as long as the sizes are the same.
268 (define_bypass 2 "W1,W2" "W10" "hppa_fpstore_bypass_p")
269 (define_bypass 9 "W3" "W10" "hppa_fpstore_bypass_p")
270 (define_bypass 11 "W4" "W10" "hppa_fpstore_bypass_p")
271 (define_bypass 13 "W5" "W10" "hppa_fpstore_bypass_p")
272 (define_bypass 17 "W6" "W10" "hppa_fpstore_bypass_p")
274 ;; We have an "anti-bypass" for FP loads which feed an FP store.
275 (define_bypass 4 "W8" "W10" "hppa_fpstore_bypass_p")
277 ;; Function units for the 7100 and 7150. The 7100/7150 can dual-issue
278 ;; floating point computations with non-floating point computations (fp loads
279 ;; and stores are not fp computations).
281 ;; Memory. Disregarding Cache misses, memory loads take two cycles; stores also
282 ;; take two cycles, during which no Dcache operations should be scheduled.
283 ;; Any special cases are handled in pa_adjust_cost. The 7100, 7150 and 7100LC
284 ;; all have the same memory characteristics if one disregards cache misses.
286 ;; The 7100/7150 has three floating-point units: ALU, MUL, and DIV.
287 ;; There's no value in modeling the ALU and MUL separately though
288 ;; since there can never be a functional unit conflict given the
289 ;; latency and issue rates for those units.
292 ;; Instruction Time Unit Minimum Distance (unit contention)
299 ;; fmpyadd 2 ALU,MPY 1
300 ;; fmpysub 2 ALU,MPY 1
301 ;; fmpycfxt 2 ALU,MPY 1
305 ;; fdiv,dbl 15 DIV 15
307 ;; fsqrt,dbl 15 DIV 15
309 (define_automaton "pa7100")
310 (define_cpu_unit "i_7100, f_7100,fpmac_7100,fpdivsqrt_7100,mem_7100" "pa7100")
312 (define_insn_reservation "X0" 2
313 (and (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl")
314 (eq_attr "cpu" "7100"))
317 (define_insn_reservation "X1" 8
318 (and (eq_attr "type" "fpdivsgl,fpsqrtsgl")
319 (eq_attr "cpu" "7100"))
320 "f_7100+fpdivsqrt_7100,fpdivsqrt_7100*7")
322 (define_insn_reservation "X2" 15
323 (and (eq_attr "type" "fpdivdbl,fpsqrtdbl")
324 (eq_attr "cpu" "7100"))
325 "f_7100+fpdivsqrt_7100,fpdivsqrt_7100*14")
327 (define_insn_reservation "X3" 2
328 (and (eq_attr "type" "load")
329 (eq_attr "cpu" "7100"))
332 (define_insn_reservation "X4" 2
333 (and (eq_attr "type" "fpload")
334 (eq_attr "cpu" "7100"))
337 (define_insn_reservation "X5" 2
338 (and (eq_attr "type" "store")
339 (eq_attr "cpu" "7100"))
340 "i_7100+mem_7100,mem_7100")
342 (define_insn_reservation "X6" 2
343 (and (eq_attr "type" "fpstore")
344 (eq_attr "cpu" "7100"))
345 "i_7100+mem_7100,mem_7100")
347 (define_insn_reservation "X7" 1
348 (and (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl,load,fpload,store,fpstore")
349 (eq_attr "cpu" "7100"))
352 ;; We have a bypass for all computations in the FP unit which feed an
353 ;; FP store as long as the sizes are the same.
354 (define_bypass 1 "X0" "X6" "hppa_fpstore_bypass_p")
355 (define_bypass 7 "X1" "X6" "hppa_fpstore_bypass_p")
356 (define_bypass 14 "X2" "X6" "hppa_fpstore_bypass_p")
358 ;; We have an "anti-bypass" for FP loads which feed an FP store.
359 (define_bypass 3 "X4" "X6" "hppa_fpstore_bypass_p")
361 ;; The 7100LC has three floating-point units: ALU, MUL, and DIV.
362 ;; There's no value in modeling the ALU and MUL separately though
363 ;; since there can never be a functional unit conflict that
364 ;; can be avoided given the latency, issue rates and mandatory
365 ;; one cycle cpu-wide lock for a double precision fp multiply.
368 ;; Instruction Time Unit Minimum Distance (unit contention)
375 ;; fmpyadd,sgl 2 ALU,MPY 1
376 ;; fmpyadd,dbl 3 ALU,MPY 2
377 ;; fmpysub,sgl 2 ALU,MPY 1
378 ;; fmpysub,dbl 3 ALU,MPY 2
379 ;; fmpycfxt,sgl 2 ALU,MPY 1
380 ;; fmpycfxt,dbl 3 ALU,MPY 2
385 ;; fdiv,dbl 15 DIV 15
387 ;; fsqrt,dbl 15 DIV 15
389 ;; The PA7200 is just like the PA7100LC except that there is
390 ;; no store-store penalty.
392 ;; The PA7300 is just like the PA7200 except that there is
393 ;; no store-load penalty.
395 ;; Note there are some aspects of the 7100LC we are not modeling
396 ;; at the moment. I'll be reviewing the 7100LC scheduling info
397 ;; shortly and updating this description.
401 ;; other issue modeling
403 (define_automaton "pa7100lc")
404 (define_cpu_unit "i0_7100lc, i1_7100lc, f_7100lc" "pa7100lc")
405 (define_cpu_unit "fpmac_7100lc" "pa7100lc")
406 (define_cpu_unit "mem_7100lc" "pa7100lc")
408 ;; Double precision multiplies lock the entire CPU for one
409 ;; cycle. There is no way to avoid this lock and trying to
410 ;; schedule around the lock is pointless and thus there is no
411 ;; value in trying to model this lock.
413 ;; Not modeling the lock allows us to treat fp multiplies just
414 ;; like any other FP alu instruction. It allows for a smaller
415 ;; DFA and may reduce register pressure.
416 (define_insn_reservation "Y0" 2
417 (and (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl")
418 (eq_attr "cpu" "7100LC,7200,7300"))
419 "f_7100lc,fpmac_7100lc")
421 ;; fp division and sqrt instructions lock the entire CPU for
422 ;; 7 cycles (single precision) or 14 cycles (double precision).
423 ;; There is no way to avoid this lock and trying to schedule
424 ;; around the lock is pointless and thus there is no value in
425 ;; trying to model this lock. Not modeling the lock allows
426 ;; for a smaller DFA and may reduce register pressure.
427 (define_insn_reservation "Y1" 1
428 (and (eq_attr "type" "fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl")
429 (eq_attr "cpu" "7100LC,7200,7300"))
432 (define_insn_reservation "Y2" 2
433 (and (eq_attr "type" "load")
434 (eq_attr "cpu" "7100LC,7200,7300"))
435 "i1_7100lc+mem_7100lc")
437 (define_insn_reservation "Y3" 2
438 (and (eq_attr "type" "fpload")
439 (eq_attr "cpu" "7100LC,7200,7300"))
440 "i1_7100lc+mem_7100lc")
442 (define_insn_reservation "Y4" 2
443 (and (eq_attr "type" "store")
444 (eq_attr "cpu" "7100LC"))
445 "i1_7100lc+mem_7100lc,mem_7100lc")
447 (define_insn_reservation "Y5" 2
448 (and (eq_attr "type" "fpstore")
449 (eq_attr "cpu" "7100LC"))
450 "i1_7100lc+mem_7100lc,mem_7100lc")
452 (define_insn_reservation "Y6" 1
453 (and (eq_attr "type" "shift,nullshift")
454 (eq_attr "cpu" "7100LC,7200,7300"))
457 (define_insn_reservation "Y7" 1
458 (and (eq_attr "type" "!fpcc,fpalu,fpmulsgl,fpmuldbl,fpdivsgl,fpsqrtsgl,fpdivdbl,fpsqrtdbl,load,fpload,store,fpstore,shift,nullshift")
459 (eq_attr "cpu" "7100LC,7200,7300"))
460 "(i0_7100lc|i1_7100lc)")
462 ;; The 7200 has a store-load penalty
463 (define_insn_reservation "Y8" 2
464 (and (eq_attr "type" "store")
465 (eq_attr "cpu" "7200"))
466 "i1_7100lc,mem_7100lc")
468 (define_insn_reservation "Y9" 2
469 (and (eq_attr "type" "fpstore")
470 (eq_attr "cpu" "7200"))
471 "i1_7100lc,mem_7100lc")
473 ;; The 7300 has no penalty for store-store or store-load
474 (define_insn_reservation "Y10" 2
475 (and (eq_attr "type" "store")
476 (eq_attr "cpu" "7300"))
479 (define_insn_reservation "Y11" 2
480 (and (eq_attr "type" "fpstore")
481 (eq_attr "cpu" "7300"))
484 ;; We have an "anti-bypass" for FP loads which feed an FP store.
485 (define_bypass 3 "Y3" "Y5,Y9,Y11" "hppa_fpstore_bypass_p")
487 ;; Scheduling for the PA8000 is somewhat different than scheduling for a
488 ;; traditional architecture.
490 ;; The PA8000 has a large (56) entry reorder buffer that is split between
491 ;; memory and non-memory operations.
493 ;; The PA8000 can issue two memory and two non-memory operations per cycle to
494 ;; the function units, with the exception of branches and multi-output
495 ;; instructions. The PA8000 can retire two non-memory operations per cycle
496 ;; and two memory operations per cycle, only one of which may be a store.
498 ;; Given the large reorder buffer, the processor can hide most latencies.
499 ;; According to HP, they've got the best results by scheduling for retirement
500 ;; bandwidth with limited latency scheduling for floating point operations.
501 ;; Latency for integer operations and memory references is ignored.
504 ;; We claim floating point operations have a 2 cycle latency and are
505 ;; fully pipelined, except for div and sqrt which are not pipelined and
506 ;; take from 17 to 31 cycles to complete.
508 ;; It's worth noting that there is no way to saturate all the functional
509 ;; units on the PA8000 as there is not enough issue bandwidth.
511 (define_automaton "pa8000")
512 (define_cpu_unit "inm0_8000, inm1_8000, im0_8000, im1_8000" "pa8000")
513 (define_cpu_unit "rnm0_8000, rnm1_8000, rm0_8000, rm1_8000" "pa8000")
514 (define_cpu_unit "store_8000" "pa8000")
515 (define_cpu_unit "f0_8000, f1_8000" "pa8000")
516 (define_cpu_unit "fdivsqrt0_8000, fdivsqrt1_8000" "pa8000")
517 (define_reservation "inm_8000" "inm0_8000 | inm1_8000")
518 (define_reservation "im_8000" "im0_8000 | im1_8000")
519 (define_reservation "rnm_8000" "rnm0_8000 | rnm1_8000")
520 (define_reservation "rm_8000" "rm0_8000 | rm1_8000")
521 (define_reservation "f_8000" "f0_8000 | f1_8000")
522 (define_reservation "fdivsqrt_8000" "fdivsqrt0_8000 | fdivsqrt1_8000")
524 ;; We can issue any two memops per cycle, but we can only retire
525 ;; one memory store per cycle. We assume that the reorder buffer
526 ;; will hide any memory latencies per HP's recommendation.
527 (define_insn_reservation "Z0" 0
529 (eq_attr "type" "load,fpload")
530 (eq_attr "cpu" "8000"))
533 (define_insn_reservation "Z1" 0
535 (eq_attr "type" "store,fpstore")
536 (eq_attr "cpu" "8000"))
537 "im_8000,rm_8000+store_8000")
539 ;; We can issue and retire two non-memory operations per cycle with
540 ;; a few exceptions (branches). This group catches those we want
541 ;; to assume have zero latency.
542 (define_insn_reservation "Z2" 0
544 (eq_attr "type" "!load,fpload,store,fpstore,uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch,fpcc,fpalu,fpmulsgl,fpmuldbl,fpsqrtsgl,fpsqrtdbl,fpdivsgl,fpdivdbl")
545 (eq_attr "cpu" "8000"))
548 ;; Branches use both slots in the non-memory issue and
550 (define_insn_reservation "Z3" 0
552 (eq_attr "type" "uncond_branch,btable_branch,branch,cbranch,fbranch,call,dyncall,multi,milli,parallel_branch")
553 (eq_attr "cpu" "8000"))
554 "inm0_8000+inm1_8000,rnm0_8000+rnm1_8000")
556 ;; We partial latency schedule the floating point units.
557 ;; They can issue/retire two at a time in the non-memory
558 ;; units. We fix their latency at 2 cycles and they
559 ;; are fully pipelined.
560 (define_insn_reservation "Z4" 1
562 (eq_attr "type" "fpcc,fpalu,fpmulsgl,fpmuldbl")
563 (eq_attr "cpu" "8000"))
564 "inm_8000,f_8000,rnm_8000")
566 ;; The fdivsqrt units are not pipelined and have a very long latency.
567 ;; To keep the DFA from exploding, we do not show all the
568 ;; reservations for the divsqrt unit.
569 (define_insn_reservation "Z5" 17
571 (eq_attr "type" "fpdivsgl,fpsqrtsgl")
572 (eq_attr "cpu" "8000"))
573 "inm_8000,fdivsqrt_8000*6,rnm_8000")
575 (define_insn_reservation "Z6" 31
577 (eq_attr "type" "fpdivdbl,fpsqrtdbl")
578 (eq_attr "cpu" "8000"))
579 "inm_8000,fdivsqrt_8000*6,rnm_8000")
581 (include "predicates.md")
583 ;; Compare instructions.
584 ;; This controls RTL generation and register allocation.
586 ;; We generate RTL for comparisons and branches by having the cmpxx
587 ;; patterns store away the operands. Then, the scc and bcc patterns
588 ;; emit RTL for both the compare and the branch.
591 (define_expand "cmpdi"
593 (compare:CC (match_operand:DI 0 "reg_or_0_operand" "")
594 (match_operand:DI 1 "register_operand" "")))]
599 hppa_compare_op0 = operands[0];
600 hppa_compare_op1 = operands[1];
601 hppa_branch_type = CMP_SI;
605 (define_expand "cmpsi"
607 (compare:CC (match_operand:SI 0 "reg_or_0_operand" "")
608 (match_operand:SI 1 "arith5_operand" "")))]
612 hppa_compare_op0 = operands[0];
613 hppa_compare_op1 = operands[1];
614 hppa_branch_type = CMP_SI;
618 (define_expand "cmpsf"
620 (compare:CCFP (match_operand:SF 0 "reg_or_0_operand" "")
621 (match_operand:SF 1 "reg_or_0_operand" "")))]
622 "! TARGET_SOFT_FLOAT"
625 hppa_compare_op0 = operands[0];
626 hppa_compare_op1 = operands[1];
627 hppa_branch_type = CMP_SF;
631 (define_expand "cmpdf"
633 (compare:CCFP (match_operand:DF 0 "reg_or_0_operand" "")
634 (match_operand:DF 1 "reg_or_0_operand" "")))]
635 "! TARGET_SOFT_FLOAT"
638 hppa_compare_op0 = operands[0];
639 hppa_compare_op1 = operands[1];
640 hppa_branch_type = CMP_DF;
646 (match_operator:CCFP 2 "comparison_operator"
647 [(match_operand:SF 0 "reg_or_0_operand" "fG")
648 (match_operand:SF 1 "reg_or_0_operand" "fG")]))]
649 "! TARGET_SOFT_FLOAT"
650 "fcmp,sgl,%Y2 %f0,%f1"
651 [(set_attr "length" "4")
652 (set_attr "type" "fpcc")])
656 (match_operator:CCFP 2 "comparison_operator"
657 [(match_operand:DF 0 "reg_or_0_operand" "fG")
658 (match_operand:DF 1 "reg_or_0_operand" "fG")]))]
659 "! TARGET_SOFT_FLOAT"
660 "fcmp,dbl,%Y2 %f0,%f1"
661 [(set_attr "length" "4")
662 (set_attr "type" "fpcc")])
664 ;; Provide a means to emit the movccfp0 and movccfp1 optimization
665 ;; placeholders. This is necessary in rare situations when a
666 ;; placeholder is re-emitted (see PR 8705).
668 (define_expand "movccfp"
670 (match_operand 0 "const_int_operand" ""))]
671 "! TARGET_SOFT_FLOAT"
674 if ((unsigned HOST_WIDE_INT) INTVAL (operands[0]) > 1)
678 ;; The following patterns are optimization placeholders. In almost
679 ;; all cases, the user of the condition code will be simplified and the
680 ;; original condition code setting insn should be eliminated.
682 (define_insn "*movccfp0"
685 "! TARGET_SOFT_FLOAT"
686 "fcmp,dbl,= %%fr0,%%fr0"
687 [(set_attr "length" "4")
688 (set_attr "type" "fpcc")])
690 (define_insn "*movccfp1"
693 "! TARGET_SOFT_FLOAT"
694 "fcmp,dbl,!= %%fr0,%%fr0"
695 [(set_attr "length" "4")
696 (set_attr "type" "fpcc")])
701 [(set (match_operand:SI 0 "register_operand" "")
707 /* fp scc patterns rarely match, and are not a win on the PA. */
708 if (hppa_branch_type != CMP_SI)
710 /* set up operands from compare. */
711 operands[1] = hppa_compare_op0;
712 operands[2] = hppa_compare_op1;
713 /* fall through and generate default code */
717 [(set (match_operand:SI 0 "register_operand" "")
723 /* fp scc patterns rarely match, and are not a win on the PA. */
724 if (hppa_branch_type != CMP_SI)
726 operands[1] = hppa_compare_op0;
727 operands[2] = hppa_compare_op1;
731 [(set (match_operand:SI 0 "register_operand" "")
737 /* fp scc patterns rarely match, and are not a win on the PA. */
738 if (hppa_branch_type != CMP_SI)
740 operands[1] = hppa_compare_op0;
741 operands[2] = hppa_compare_op1;
745 [(set (match_operand:SI 0 "register_operand" "")
751 /* fp scc patterns rarely match, and are not a win on the PA. */
752 if (hppa_branch_type != CMP_SI)
754 operands[1] = hppa_compare_op0;
755 operands[2] = hppa_compare_op1;
759 [(set (match_operand:SI 0 "register_operand" "")
765 /* fp scc patterns rarely match, and are not a win on the PA. */
766 if (hppa_branch_type != CMP_SI)
768 operands[1] = hppa_compare_op0;
769 operands[2] = hppa_compare_op1;
773 [(set (match_operand:SI 0 "register_operand" "")
779 /* fp scc patterns rarely match, and are not a win on the PA. */
780 if (hppa_branch_type != CMP_SI)
782 operands[1] = hppa_compare_op0;
783 operands[2] = hppa_compare_op1;
786 (define_expand "sltu"
787 [(set (match_operand:SI 0 "register_operand" "")
788 (ltu:SI (match_dup 1)
793 if (hppa_branch_type != CMP_SI)
795 operands[1] = hppa_compare_op0;
796 operands[2] = hppa_compare_op1;
799 (define_expand "sgtu"
800 [(set (match_operand:SI 0 "register_operand" "")
801 (gtu:SI (match_dup 1)
806 if (hppa_branch_type != CMP_SI)
808 operands[1] = hppa_compare_op0;
809 operands[2] = hppa_compare_op1;
812 (define_expand "sleu"
813 [(set (match_operand:SI 0 "register_operand" "")
814 (leu:SI (match_dup 1)
819 if (hppa_branch_type != CMP_SI)
821 operands[1] = hppa_compare_op0;
822 operands[2] = hppa_compare_op1;
825 (define_expand "sgeu"
826 [(set (match_operand:SI 0 "register_operand" "")
827 (geu:SI (match_dup 1)
832 if (hppa_branch_type != CMP_SI)
834 operands[1] = hppa_compare_op0;
835 operands[2] = hppa_compare_op1;
838 ;; Instruction canonicalization puts immediate operands second, which
839 ;; is the reverse of what we want.
842 [(set (match_operand:SI 0 "register_operand" "=r")
843 (match_operator:SI 3 "comparison_operator"
844 [(match_operand:SI 1 "register_operand" "r")
845 (match_operand:SI 2 "arith11_operand" "rI")]))]
847 "{com%I2clr|cmp%I2clr},%B3 %2,%1,%0\;ldi 1,%0"
848 [(set_attr "type" "binary")
849 (set_attr "length" "8")])
852 [(set (match_operand:DI 0 "register_operand" "=r")
853 (match_operator:DI 3 "comparison_operator"
854 [(match_operand:DI 1 "register_operand" "r")
855 (match_operand:DI 2 "arith11_operand" "rI")]))]
857 "cmp%I2clr,*%B3 %2,%1,%0\;ldi 1,%0"
858 [(set_attr "type" "binary")
859 (set_attr "length" "8")])
861 (define_insn "iorscc"
862 [(set (match_operand:SI 0 "register_operand" "=r")
863 (ior:SI (match_operator:SI 3 "comparison_operator"
864 [(match_operand:SI 1 "register_operand" "r")
865 (match_operand:SI 2 "arith11_operand" "rI")])
866 (match_operator:SI 6 "comparison_operator"
867 [(match_operand:SI 4 "register_operand" "r")
868 (match_operand:SI 5 "arith11_operand" "rI")])))]
870 "{com%I2clr|cmp%I2clr},%S3 %2,%1,%%r0\;{com%I5clr|cmp%I5clr},%B6 %5,%4,%0\;ldi 1,%0"
871 [(set_attr "type" "binary")
872 (set_attr "length" "12")])
875 [(set (match_operand:DI 0 "register_operand" "=r")
876 (ior:DI (match_operator:DI 3 "comparison_operator"
877 [(match_operand:DI 1 "register_operand" "r")
878 (match_operand:DI 2 "arith11_operand" "rI")])
879 (match_operator:DI 6 "comparison_operator"
880 [(match_operand:DI 4 "register_operand" "r")
881 (match_operand:DI 5 "arith11_operand" "rI")])))]
883 "cmp%I2clr,*%S3 %2,%1,%%r0\;cmp%I5clr,*%B6 %5,%4,%0\;ldi 1,%0"
884 [(set_attr "type" "binary")
885 (set_attr "length" "12")])
887 ;; Combiner patterns for common operations performed with the output
888 ;; from an scc insn (negscc and incscc).
889 (define_insn "negscc"
890 [(set (match_operand:SI 0 "register_operand" "=r")
891 (neg:SI (match_operator:SI 3 "comparison_operator"
892 [(match_operand:SI 1 "register_operand" "r")
893 (match_operand:SI 2 "arith11_operand" "rI")])))]
895 "{com%I2clr|cmp%I2clr},%B3 %2,%1,%0\;ldi -1,%0"
896 [(set_attr "type" "binary")
897 (set_attr "length" "8")])
900 [(set (match_operand:DI 0 "register_operand" "=r")
901 (neg:DI (match_operator:DI 3 "comparison_operator"
902 [(match_operand:DI 1 "register_operand" "r")
903 (match_operand:DI 2 "arith11_operand" "rI")])))]
905 "cmp%I2clr,*%B3 %2,%1,%0\;ldi -1,%0"
906 [(set_attr "type" "binary")
907 (set_attr "length" "8")])
909 ;; Patterns for adding/subtracting the result of a boolean expression from
910 ;; a register. First we have special patterns that make use of the carry
911 ;; bit, and output only two instructions. For the cases we can't in
912 ;; general do in two instructions, the incscc pattern at the end outputs
913 ;; two or three instructions.
916 [(set (match_operand:SI 0 "register_operand" "=r")
917 (plus:SI (leu:SI (match_operand:SI 2 "register_operand" "r")
918 (match_operand:SI 3 "arith11_operand" "rI"))
919 (match_operand:SI 1 "register_operand" "r")))]
921 "sub%I3 %3,%2,%%r0\;{addc|add,c} %%r0,%1,%0"
922 [(set_attr "type" "binary")
923 (set_attr "length" "8")])
926 [(set (match_operand:DI 0 "register_operand" "=r")
927 (plus:DI (leu:DI (match_operand:DI 2 "register_operand" "r")
928 (match_operand:DI 3 "arith11_operand" "rI"))
929 (match_operand:DI 1 "register_operand" "r")))]
931 "sub%I3 %3,%2,%%r0\;add,dc %%r0,%1,%0"
932 [(set_attr "type" "binary")
933 (set_attr "length" "8")])
935 ; This need only accept registers for op3, since canonicalization
936 ; replaces geu with gtu when op3 is an integer.
938 [(set (match_operand:SI 0 "register_operand" "=r")
939 (plus:SI (geu:SI (match_operand:SI 2 "register_operand" "r")
940 (match_operand:SI 3 "register_operand" "r"))
941 (match_operand:SI 1 "register_operand" "r")))]
943 "sub %2,%3,%%r0\;{addc|add,c} %%r0,%1,%0"
944 [(set_attr "type" "binary")
945 (set_attr "length" "8")])
948 [(set (match_operand:DI 0 "register_operand" "=r")
949 (plus:DI (geu:DI (match_operand:DI 2 "register_operand" "r")
950 (match_operand:DI 3 "register_operand" "r"))
951 (match_operand:DI 1 "register_operand" "r")))]
953 "sub %2,%3,%%r0\;add,dc %%r0,%1,%0"
954 [(set_attr "type" "binary")
955 (set_attr "length" "8")])
957 ; Match only integers for op3 here. This is used as canonical form of the
958 ; geu pattern when op3 is an integer. Don't match registers since we can't
959 ; make better code than the general incscc pattern.
961 [(set (match_operand:SI 0 "register_operand" "=r")
962 (plus:SI (gtu:SI (match_operand:SI 2 "register_operand" "r")
963 (match_operand:SI 3 "int11_operand" "I"))
964 (match_operand:SI 1 "register_operand" "r")))]
966 "addi %k3,%2,%%r0\;{addc|add,c} %%r0,%1,%0"
967 [(set_attr "type" "binary")
968 (set_attr "length" "8")])
971 [(set (match_operand:DI 0 "register_operand" "=r")
972 (plus:DI (gtu:DI (match_operand:DI 2 "register_operand" "r")
973 (match_operand:DI 3 "int11_operand" "I"))
974 (match_operand:DI 1 "register_operand" "r")))]
976 "addi %k3,%2,%%r0\;add,dc %%r0,%1,%0"
977 [(set_attr "type" "binary")
978 (set_attr "length" "8")])
980 (define_insn "incscc"
981 [(set (match_operand:SI 0 "register_operand" "=r,r")
982 (plus:SI (match_operator:SI 4 "comparison_operator"
983 [(match_operand:SI 2 "register_operand" "r,r")
984 (match_operand:SI 3 "arith11_operand" "rI,rI")])
985 (match_operand:SI 1 "register_operand" "0,?r")))]
988 {com%I3clr|cmp%I3clr},%B4 %3,%2,%%r0\;addi 1,%0,%0
989 {com%I3clr|cmp%I3clr},%B4 %3,%2,%%r0\;addi,tr 1,%1,%0\;copy %1,%0"
990 [(set_attr "type" "binary,binary")
991 (set_attr "length" "8,12")])
994 [(set (match_operand:DI 0 "register_operand" "=r,r")
995 (plus:DI (match_operator:DI 4 "comparison_operator"
996 [(match_operand:DI 2 "register_operand" "r,r")
997 (match_operand:DI 3 "arith11_operand" "rI,rI")])
998 (match_operand:DI 1 "register_operand" "0,?r")))]
1001 cmp%I3clr,*%B4 %3,%2,%%r0\;addi 1,%0,%0
1002 cmp%I3clr,*%B4 %3,%2,%%r0\;addi,tr 1,%1,%0\;copy %1,%0"
1003 [(set_attr "type" "binary,binary")
1004 (set_attr "length" "8,12")])
1007 [(set (match_operand:SI 0 "register_operand" "=r")
1008 (minus:SI (match_operand:SI 1 "register_operand" "r")
1009 (gtu:SI (match_operand:SI 2 "register_operand" "r")
1010 (match_operand:SI 3 "arith11_operand" "rI"))))]
1012 "sub%I3 %3,%2,%%r0\;{subb|sub,b} %1,%%r0,%0"
1013 [(set_attr "type" "binary")
1014 (set_attr "length" "8")])
1017 [(set (match_operand:DI 0 "register_operand" "=r")
1018 (minus:DI (match_operand:DI 1 "register_operand" "r")
1019 (gtu:DI (match_operand:DI 2 "register_operand" "r")
1020 (match_operand:DI 3 "arith11_operand" "rI"))))]
1022 "sub%I3 %3,%2,%%r0\;sub,db %1,%%r0,%0"
1023 [(set_attr "type" "binary")
1024 (set_attr "length" "8")])
1027 [(set (match_operand:SI 0 "register_operand" "=r")
1028 (minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r")
1029 (gtu:SI (match_operand:SI 2 "register_operand" "r")
1030 (match_operand:SI 3 "arith11_operand" "rI")))
1031 (match_operand:SI 4 "register_operand" "r")))]
1033 "sub%I3 %3,%2,%%r0\;{subb|sub,b} %1,%4,%0"
1034 [(set_attr "type" "binary")
1035 (set_attr "length" "8")])
1038 [(set (match_operand:DI 0 "register_operand" "=r")
1039 (minus:DI (minus:DI (match_operand:DI 1 "register_operand" "r")
1040 (gtu:DI (match_operand:DI 2 "register_operand" "r")
1041 (match_operand:DI 3 "arith11_operand" "rI")))
1042 (match_operand:DI 4 "register_operand" "r")))]
1044 "sub%I3 %3,%2,%%r0\;sub,db %1,%4,%0"
1045 [(set_attr "type" "binary")
1046 (set_attr "length" "8")])
1048 ; This need only accept registers for op3, since canonicalization
1049 ; replaces ltu with leu when op3 is an integer.
1051 [(set (match_operand:SI 0 "register_operand" "=r")
1052 (minus:SI (match_operand:SI 1 "register_operand" "r")
1053 (ltu:SI (match_operand:SI 2 "register_operand" "r")
1054 (match_operand:SI 3 "register_operand" "r"))))]
1056 "sub %2,%3,%%r0\;{subb|sub,b} %1,%%r0,%0"
1057 [(set_attr "type" "binary")
1058 (set_attr "length" "8")])
1061 [(set (match_operand:DI 0 "register_operand" "=r")
1062 (minus:DI (match_operand:DI 1 "register_operand" "r")
1063 (ltu:DI (match_operand:DI 2 "register_operand" "r")
1064 (match_operand:DI 3 "register_operand" "r"))))]
1066 "sub %2,%3,%%r0\;sub,db %1,%%r0,%0"
1067 [(set_attr "type" "binary")
1068 (set_attr "length" "8")])
1071 [(set (match_operand:SI 0 "register_operand" "=r")
1072 (minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r")
1073 (ltu:SI (match_operand:SI 2 "register_operand" "r")
1074 (match_operand:SI 3 "register_operand" "r")))
1075 (match_operand:SI 4 "register_operand" "r")))]
1077 "sub %2,%3,%%r0\;{subb|sub,b} %1,%4,%0"
1078 [(set_attr "type" "binary")
1079 (set_attr "length" "8")])
1082 [(set (match_operand:DI 0 "register_operand" "=r")
1083 (minus:DI (minus:DI (match_operand:DI 1 "register_operand" "r")
1084 (ltu:DI (match_operand:DI 2 "register_operand" "r")
1085 (match_operand:DI 3 "register_operand" "r")))
1086 (match_operand:DI 4 "register_operand" "r")))]
1088 "sub %2,%3,%%r0\;sub,db %1,%4,%0"
1089 [(set_attr "type" "binary")
1090 (set_attr "length" "8")])
1092 ; Match only integers for op3 here. This is used as canonical form of the
1093 ; ltu pattern when op3 is an integer. Don't match registers since we can't
1094 ; make better code than the general incscc pattern.
1096 [(set (match_operand:SI 0 "register_operand" "=r")
1097 (minus:SI (match_operand:SI 1 "register_operand" "r")
1098 (leu:SI (match_operand:SI 2 "register_operand" "r")
1099 (match_operand:SI 3 "int11_operand" "I"))))]
1101 "addi %k3,%2,%%r0\;{subb|sub,b} %1,%%r0,%0"
1102 [(set_attr "type" "binary")
1103 (set_attr "length" "8")])
1106 [(set (match_operand:DI 0 "register_operand" "=r")
1107 (minus:DI (match_operand:DI 1 "register_operand" "r")
1108 (leu:DI (match_operand:DI 2 "register_operand" "r")
1109 (match_operand:DI 3 "int11_operand" "I"))))]
1111 "addi %k3,%2,%%r0\;sub,db %1,%%r0,%0"
1112 [(set_attr "type" "binary")
1113 (set_attr "length" "8")])
1116 [(set (match_operand:SI 0 "register_operand" "=r")
1117 (minus:SI (minus:SI (match_operand:SI 1 "register_operand" "r")
1118 (leu:SI (match_operand:SI 2 "register_operand" "r")
1119 (match_operand:SI 3 "int11_operand" "I")))
1120 (match_operand:SI 4 "register_operand" "r")))]
1122 "addi %k3,%2,%%r0\;{subb|sub,b} %1,%4,%0"
1123 [(set_attr "type" "binary")
1124 (set_attr "length" "8")])
1127 [(set (match_operand:DI 0 "register_operand" "=r")
1128 (minus:DI (minus:DI (match_operand:DI 1 "register_operand" "r")
1129 (leu:DI (match_operand:DI 2 "register_operand" "r")
1130 (match_operand:DI 3 "int11_operand" "I")))
1131 (match_operand:DI 4 "register_operand" "r")))]
1133 "addi %k3,%2,%%r0\;sub,db %1,%4,%0"
1134 [(set_attr "type" "binary")
1135 (set_attr "length" "8")])
1137 (define_insn "decscc"
1138 [(set (match_operand:SI 0 "register_operand" "=r,r")
1139 (minus:SI (match_operand:SI 1 "register_operand" "0,?r")
1140 (match_operator:SI 4 "comparison_operator"
1141 [(match_operand:SI 2 "register_operand" "r,r")
1142 (match_operand:SI 3 "arith11_operand" "rI,rI")])))]
1145 {com%I3clr|cmp%I3clr},%B4 %3,%2,%%r0\;addi -1,%0,%0
1146 {com%I3clr|cmp%I3clr},%B4 %3,%2,%%r0\;addi,tr -1,%1,%0\;copy %1,%0"
1147 [(set_attr "type" "binary,binary")
1148 (set_attr "length" "8,12")])
1151 [(set (match_operand:DI 0 "register_operand" "=r,r")
1152 (minus:DI (match_operand:DI 1 "register_operand" "0,?r")
1153 (match_operator:DI 4 "comparison_operator"
1154 [(match_operand:DI 2 "register_operand" "r,r")
1155 (match_operand:DI 3 "arith11_operand" "rI,rI")])))]
1158 cmp%I3clr,*%B4 %3,%2,%%r0\;addi -1,%0,%0
1159 cmp%I3clr,*%B4 %3,%2,%%r0\;addi,tr -1,%1,%0\;copy %1,%0"
1160 [(set_attr "type" "binary,binary")
1161 (set_attr "length" "8,12")])
1163 ; Patterns for max and min. (There is no need for an earlyclobber in the
1164 ; last alternative since the middle alternative will match if op0 == op1.)
1166 (define_insn "sminsi3"
1167 [(set (match_operand:SI 0 "register_operand" "=r,r,r")
1168 (smin:SI (match_operand:SI 1 "register_operand" "%0,0,r")
1169 (match_operand:SI 2 "arith11_operand" "r,I,M")))]
1172 {comclr|cmpclr},> %2,%0,%%r0\;copy %2,%0
1173 {comiclr|cmpiclr},> %2,%0,%%r0\;ldi %2,%0
1174 {comclr|cmpclr},> %1,%r2,%0\;copy %1,%0"
1175 [(set_attr "type" "multi,multi,multi")
1176 (set_attr "length" "8,8,8")])
1178 (define_insn "smindi3"
1179 [(set (match_operand:DI 0 "register_operand" "=r,r,r")
1180 (smin:DI (match_operand:DI 1 "register_operand" "%0,0,r")
1181 (match_operand:DI 2 "arith11_operand" "r,I,M")))]
1184 cmpclr,*> %2,%0,%%r0\;copy %2,%0
1185 cmpiclr,*> %2,%0,%%r0\;ldi %2,%0
1186 cmpclr,*> %1,%r2,%0\;copy %1,%0"
1187 [(set_attr "type" "multi,multi,multi")
1188 (set_attr "length" "8,8,8")])
1190 (define_insn "uminsi3"
1191 [(set (match_operand:SI 0 "register_operand" "=r,r")
1192 (umin:SI (match_operand:SI 1 "register_operand" "%0,0")
1193 (match_operand:SI 2 "arith11_operand" "r,I")))]
1196 {comclr|cmpclr},>> %2,%0,%%r0\;copy %2,%0
1197 {comiclr|cmpiclr},>> %2,%0,%%r0\;ldi %2,%0"
1198 [(set_attr "type" "multi,multi")
1199 (set_attr "length" "8,8")])
1201 (define_insn "umindi3"
1202 [(set (match_operand:DI 0 "register_operand" "=r,r")
1203 (umin:DI (match_operand:DI 1 "register_operand" "%0,0")
1204 (match_operand:DI 2 "arith11_operand" "r,I")))]
1207 cmpclr,*>> %2,%0,%%r0\;copy %2,%0
1208 cmpiclr,*>> %2,%0,%%r0\;ldi %2,%0"
1209 [(set_attr "type" "multi,multi")
1210 (set_attr "length" "8,8")])
1212 (define_insn "smaxsi3"
1213 [(set (match_operand:SI 0 "register_operand" "=r,r,r")
1214 (smax:SI (match_operand:SI 1 "register_operand" "%0,0,r")
1215 (match_operand:SI 2 "arith11_operand" "r,I,M")))]
1218 {comclr|cmpclr},< %2,%0,%%r0\;copy %2,%0
1219 {comiclr|cmpiclr},< %2,%0,%%r0\;ldi %2,%0
1220 {comclr|cmpclr},< %1,%r2,%0\;copy %1,%0"
1221 [(set_attr "type" "multi,multi,multi")
1222 (set_attr "length" "8,8,8")])
1224 (define_insn "smaxdi3"
1225 [(set (match_operand:DI 0 "register_operand" "=r,r,r")
1226 (smax:DI (match_operand:DI 1 "register_operand" "%0,0,r")
1227 (match_operand:DI 2 "arith11_operand" "r,I,M")))]
1230 cmpclr,*< %2,%0,%%r0\;copy %2,%0
1231 cmpiclr,*< %2,%0,%%r0\;ldi %2,%0
1232 cmpclr,*< %1,%r2,%0\;copy %1,%0"
1233 [(set_attr "type" "multi,multi,multi")
1234 (set_attr "length" "8,8,8")])
1236 (define_insn "umaxsi3"
1237 [(set (match_operand:SI 0 "register_operand" "=r,r")
1238 (umax:SI (match_operand:SI 1 "register_operand" "%0,0")
1239 (match_operand:SI 2 "arith11_operand" "r,I")))]
1242 {comclr|cmpclr},<< %2,%0,%%r0\;copy %2,%0
1243 {comiclr|cmpiclr},<< %2,%0,%%r0\;ldi %2,%0"
1244 [(set_attr "type" "multi,multi")
1245 (set_attr "length" "8,8")])
1247 (define_insn "umaxdi3"
1248 [(set (match_operand:DI 0 "register_operand" "=r,r")
1249 (umax:DI (match_operand:DI 1 "register_operand" "%0,0")
1250 (match_operand:DI 2 "arith11_operand" "r,I")))]
1253 cmpclr,*<< %2,%0,%%r0\;copy %2,%0
1254 cmpiclr,*<< %2,%0,%%r0\;ldi %2,%0"
1255 [(set_attr "type" "multi,multi")
1256 (set_attr "length" "8,8")])
1258 (define_insn "abssi2"
1259 [(set (match_operand:SI 0 "register_operand" "=r")
1260 (abs:SI (match_operand:SI 1 "register_operand" "r")))]
1262 "or,>= %%r0,%1,%0\;subi 0,%0,%0"
1263 [(set_attr "type" "multi")
1264 (set_attr "length" "8")])
1266 (define_insn "absdi2"
1267 [(set (match_operand:DI 0 "register_operand" "=r")
1268 (abs:DI (match_operand:DI 1 "register_operand" "r")))]
1270 "or,*>= %%r0,%1,%0\;subi 0,%0,%0"
1271 [(set_attr "type" "multi")
1272 (set_attr "length" "8")])
1274 ;;; Experimental conditional move patterns
1276 (define_expand "movsicc"
1277 [(set (match_operand:SI 0 "register_operand" "")
1279 (match_operator 1 "comparison_operator"
1282 (match_operand:SI 2 "reg_or_cint_move_operand" "")
1283 (match_operand:SI 3 "reg_or_cint_move_operand" "")))]
1287 enum rtx_code code = GET_CODE (operands[1]);
1289 if (hppa_branch_type != CMP_SI)
1292 if (GET_MODE (hppa_compare_op0) != GET_MODE (hppa_compare_op1)
1293 || GET_MODE (hppa_compare_op0) != GET_MODE (operands[0]))
1296 /* operands[1] is currently the result of compare_from_rtx. We want to
1297 emit a compare of the original operands. */
1298 operands[1] = gen_rtx_fmt_ee (code, SImode, hppa_compare_op0, hppa_compare_op1);
1299 operands[4] = hppa_compare_op0;
1300 operands[5] = hppa_compare_op1;
1303 ;; We used to accept any register for op1.
1305 ;; However, it loses sometimes because the compiler will end up using
1306 ;; different registers for op0 and op1 in some critical cases. local-alloc
1307 ;; will not tie op0 and op1 because op0 is used in multiple basic blocks.
1309 ;; If/when global register allocation supports tying we should allow any
1310 ;; register for op1 again.
1312 [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
1314 (match_operator 2 "comparison_operator"
1315 [(match_operand:SI 3 "register_operand" "r,r,r,r")
1316 (match_operand:SI 4 "arith11_operand" "rI,rI,rI,rI")])
1317 (match_operand:SI 1 "reg_or_cint_move_operand" "0,J,N,K")
1321 {com%I4clr|cmp%I4clr},%S2 %4,%3,%%r0\;ldi 0,%0
1322 {com%I4clr|cmp%I4clr},%B2 %4,%3,%0\;ldi %1,%0
1323 {com%I4clr|cmp%I4clr},%B2 %4,%3,%0\;ldil L'%1,%0
1324 {com%I4clr|cmp%I4clr},%B2 %4,%3,%0\;{zdepi|depwi,z} %Z1,%0"
1325 [(set_attr "type" "multi,multi,multi,nullshift")
1326 (set_attr "length" "8,8,8,8")])
1329 [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r,r,r,r")
1331 (match_operator 5 "comparison_operator"
1332 [(match_operand:SI 3 "register_operand" "r,r,r,r,r,r,r,r")
1333 (match_operand:SI 4 "arith11_operand" "rI,rI,rI,rI,rI,rI,rI,rI")])
1334 (match_operand:SI 1 "reg_or_cint_move_operand" "0,0,0,0,r,J,N,K")
1335 (match_operand:SI 2 "reg_or_cint_move_operand" "r,J,N,K,0,0,0,0")))]
1338 {com%I4clr|cmp%I4clr},%S5 %4,%3,%%r0\;copy %2,%0
1339 {com%I4clr|cmp%I4clr},%S5 %4,%3,%%r0\;ldi %2,%0
1340 {com%I4clr|cmp%I4clr},%S5 %4,%3,%%r0\;ldil L'%2,%0
1341 {com%I4clr|cmp%I4clr},%S5 %4,%3,%%r0\;{zdepi|depwi,z} %Z2,%0
1342 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;copy %1,%0
1343 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;ldi %1,%0
1344 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;ldil L'%1,%0
1345 {com%I4clr|cmp%I4clr},%B5 %4,%3,%%r0\;{zdepi|depwi,z} %Z1,%0"
1346 [(set_attr "type" "multi,multi,multi,nullshift,multi,multi,multi,nullshift")
1347 (set_attr "length" "8,8,8,8,8,8,8,8")])
1349 (define_expand "movdicc"
1350 [(set (match_operand:DI 0 "register_operand" "")
1352 (match_operator 1 "comparison_operator"
1355 (match_operand:DI 2 "reg_or_cint_move_operand" "")
1356 (match_operand:DI 3 "reg_or_cint_move_operand" "")))]
1360 enum rtx_code code = GET_CODE (operands[1]);
1362 if (hppa_branch_type != CMP_SI)
1365 if (GET_MODE (hppa_compare_op0) != GET_MODE (hppa_compare_op1)
1366 || GET_MODE (hppa_compare_op0) != GET_MODE (operands[0]))
1369 /* operands[1] is currently the result of compare_from_rtx. We want to
1370 emit a compare of the original operands. */
1371 operands[1] = gen_rtx_fmt_ee (code, DImode, hppa_compare_op0, hppa_compare_op1);
1372 operands[4] = hppa_compare_op0;
1373 operands[5] = hppa_compare_op1;
1376 ; We need the first constraint alternative in order to avoid
1377 ; earlyclobbers on all other alternatives.
1379 [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r")
1381 (match_operator 2 "comparison_operator"
1382 [(match_operand:DI 3 "register_operand" "r,r,r,r,r")
1383 (match_operand:DI 4 "arith11_operand" "rI,rI,rI,rI,rI")])
1384 (match_operand:DI 1 "reg_or_cint_move_operand" "0,r,J,N,K")
1388 cmp%I4clr,*%S2 %4,%3,%%r0\;ldi 0,%0
1389 cmp%I4clr,*%B2 %4,%3,%0\;copy %1,%0
1390 cmp%I4clr,*%B2 %4,%3,%0\;ldi %1,%0
1391 cmp%I4clr,*%B2 %4,%3,%0\;ldil L'%1,%0
1392 cmp%I4clr,*%B2 %4,%3,%0\;depdi,z %z1,%0"
1393 [(set_attr "type" "multi,multi,multi,multi,nullshift")
1394 (set_attr "length" "8,8,8,8,8")])
1397 [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r,r,r,r")
1399 (match_operator 5 "comparison_operator"
1400 [(match_operand:DI 3 "register_operand" "r,r,r,r,r,r,r,r")
1401 (match_operand:DI 4 "arith11_operand" "rI,rI,rI,rI,rI,rI,rI,rI")])
1402 (match_operand:DI 1 "reg_or_cint_move_operand" "0,0,0,0,r,J,N,K")
1403 (match_operand:DI 2 "reg_or_cint_move_operand" "r,J,N,K,0,0,0,0")))]
1406 cmp%I4clr,*%S5 %4,%3,%%r0\;copy %2,%0
1407 cmp%I4clr,*%S5 %4,%3,%%r0\;ldi %2,%0
1408 cmp%I4clr,*%S5 %4,%3,%%r0\;ldil L'%2,%0
1409 cmp%I4clr,*%S5 %4,%3,%%r0\;depdi,z %z2,%0
1410 cmp%I4clr,*%B5 %4,%3,%%r0\;copy %1,%0
1411 cmp%I4clr,*%B5 %4,%3,%%r0\;ldi %1,%0
1412 cmp%I4clr,*%B5 %4,%3,%%r0\;ldil L'%1,%0
1413 cmp%I4clr,*%B5 %4,%3,%%r0\;depdi,z %z1,%0"
1414 [(set_attr "type" "multi,multi,multi,nullshift,multi,multi,multi,nullshift")
1415 (set_attr "length" "8,8,8,8,8,8,8,8")])
1417 ;; Conditional Branches
1419 (define_expand "beq"
1421 (if_then_else (eq (match_dup 1) (match_dup 2))
1422 (label_ref (match_operand 0 "" ""))
1427 if (hppa_branch_type != CMP_SI)
1429 emit_insn (gen_cmp_fp (EQ, hppa_compare_op0, hppa_compare_op1));
1430 emit_bcond_fp (NE, operands[0]);
1433 /* set up operands from compare. */
1434 operands[1] = hppa_compare_op0;
1435 operands[2] = hppa_compare_op1;
1436 /* fall through and generate default code */
1439 (define_expand "bne"
1441 (if_then_else (ne (match_dup 1) (match_dup 2))
1442 (label_ref (match_operand 0 "" ""))
1447 if (hppa_branch_type != CMP_SI)
1449 emit_insn (gen_cmp_fp (NE, hppa_compare_op0, hppa_compare_op1));
1450 emit_bcond_fp (NE, operands[0]);
1453 operands[1] = hppa_compare_op0;
1454 operands[2] = hppa_compare_op1;
1457 (define_expand "bgt"
1459 (if_then_else (gt (match_dup 1) (match_dup 2))
1460 (label_ref (match_operand 0 "" ""))
1465 if (hppa_branch_type != CMP_SI)
1467 emit_insn (gen_cmp_fp (GT, hppa_compare_op0, hppa_compare_op1));
1468 emit_bcond_fp (NE, operands[0]);
1471 operands[1] = hppa_compare_op0;
1472 operands[2] = hppa_compare_op1;
1475 (define_expand "blt"
1477 (if_then_else (lt (match_dup 1) (match_dup 2))
1478 (label_ref (match_operand 0 "" ""))
1483 if (hppa_branch_type != CMP_SI)
1485 emit_insn (gen_cmp_fp (LT, hppa_compare_op0, hppa_compare_op1));
1486 emit_bcond_fp (NE, operands[0]);
1489 operands[1] = hppa_compare_op0;
1490 operands[2] = hppa_compare_op1;
1493 (define_expand "bge"
1495 (if_then_else (ge (match_dup 1) (match_dup 2))
1496 (label_ref (match_operand 0 "" ""))
1501 if (hppa_branch_type != CMP_SI)
1503 emit_insn (gen_cmp_fp (GE, hppa_compare_op0, hppa_compare_op1));
1504 emit_bcond_fp (NE, operands[0]);
1507 operands[1] = hppa_compare_op0;
1508 operands[2] = hppa_compare_op1;
1511 (define_expand "ble"
1513 (if_then_else (le (match_dup 1) (match_dup 2))
1514 (label_ref (match_operand 0 "" ""))
1519 if (hppa_branch_type != CMP_SI)
1521 emit_insn (gen_cmp_fp (LE, hppa_compare_op0, hppa_compare_op1));
1522 emit_bcond_fp (NE, operands[0]);
1525 operands[1] = hppa_compare_op0;
1526 operands[2] = hppa_compare_op1;
1529 (define_expand "bgtu"
1531 (if_then_else (gtu (match_dup 1) (match_dup 2))
1532 (label_ref (match_operand 0 "" ""))
1537 if (hppa_branch_type != CMP_SI)
1539 operands[1] = hppa_compare_op0;
1540 operands[2] = hppa_compare_op1;
1543 (define_expand "bltu"
1545 (if_then_else (ltu (match_dup 1) (match_dup 2))
1546 (label_ref (match_operand 0 "" ""))
1551 if (hppa_branch_type != CMP_SI)
1553 operands[1] = hppa_compare_op0;
1554 operands[2] = hppa_compare_op1;
1557 (define_expand "bgeu"
1559 (if_then_else (geu (match_dup 1) (match_dup 2))
1560 (label_ref (match_operand 0 "" ""))
1565 if (hppa_branch_type != CMP_SI)
1567 operands[1] = hppa_compare_op0;
1568 operands[2] = hppa_compare_op1;
1571 (define_expand "bleu"
1573 (if_then_else (leu (match_dup 1) (match_dup 2))
1574 (label_ref (match_operand 0 "" ""))
1579 if (hppa_branch_type != CMP_SI)
1581 operands[1] = hppa_compare_op0;
1582 operands[2] = hppa_compare_op1;
1585 (define_expand "bltgt"
1587 (if_then_else (ltgt (match_dup 1) (match_dup 2))
1588 (label_ref (match_operand 0 "" ""))
1593 if (hppa_branch_type == CMP_SI)
1595 emit_insn (gen_cmp_fp (LTGT, hppa_compare_op0, hppa_compare_op1));
1596 emit_bcond_fp (NE, operands[0]);
1600 (define_expand "bunle"
1602 (if_then_else (unle (match_dup 1) (match_dup 2))
1603 (label_ref (match_operand 0 "" ""))
1608 if (hppa_branch_type == CMP_SI)
1610 emit_insn (gen_cmp_fp (UNLE, hppa_compare_op0, hppa_compare_op1));
1611 emit_bcond_fp (NE, operands[0]);
1615 (define_expand "bunlt"
1617 (if_then_else (unlt (match_dup 1) (match_dup 2))
1618 (label_ref (match_operand 0 "" ""))
1623 if (hppa_branch_type == CMP_SI)
1625 emit_insn (gen_cmp_fp (UNLT, hppa_compare_op0, hppa_compare_op1));
1626 emit_bcond_fp (NE, operands[0]);
1630 (define_expand "bunge"
1632 (if_then_else (unge (match_dup 1) (match_dup 2))
1633 (label_ref (match_operand 0 "" ""))
1638 if (hppa_branch_type == CMP_SI)
1640 emit_insn (gen_cmp_fp (UNGE, hppa_compare_op0, hppa_compare_op1));
1641 emit_bcond_fp (NE, operands[0]);
1645 (define_expand "bungt"
1647 (if_then_else (ungt (match_dup 1) (match_dup 2))
1648 (label_ref (match_operand 0 "" ""))
1653 if (hppa_branch_type == CMP_SI)
1655 emit_insn (gen_cmp_fp (UNGT, hppa_compare_op0, hppa_compare_op1));
1656 emit_bcond_fp (NE, operands[0]);
1660 (define_expand "buneq"
1662 (if_then_else (uneq (match_dup 1) (match_dup 2))
1663 (label_ref (match_operand 0 "" ""))
1668 if (hppa_branch_type == CMP_SI)
1670 emit_insn (gen_cmp_fp (UNEQ, hppa_compare_op0, hppa_compare_op1));
1671 emit_bcond_fp (NE, operands[0]);
1675 (define_expand "bunordered"
1677 (if_then_else (unordered (match_dup 1) (match_dup 2))
1678 (label_ref (match_operand 0 "" ""))
1683 if (hppa_branch_type == CMP_SI)
1685 emit_insn (gen_cmp_fp (UNORDERED, hppa_compare_op0, hppa_compare_op1));
1686 emit_bcond_fp (NE, operands[0]);
1690 (define_expand "bordered"
1692 (if_then_else (ordered (match_dup 1) (match_dup 2))
1693 (label_ref (match_operand 0 "" ""))
1698 if (hppa_branch_type == CMP_SI)
1700 emit_insn (gen_cmp_fp (ORDERED, hppa_compare_op0, hppa_compare_op1));
1701 emit_bcond_fp (NE, operands[0]);
1705 ;; Match the branch patterns.
1708 ;; Note a long backward conditional branch with an annulled delay slot
1709 ;; has a length of 12.
1713 (match_operator 3 "comparison_operator"
1714 [(match_operand:SI 1 "reg_or_0_operand" "rM")
1715 (match_operand:SI 2 "arith5_operand" "rL")])
1716 (label_ref (match_operand 0 "" ""))
1721 return output_cbranch (operands, 0, insn);
1723 [(set_attr "type" "cbranch")
1724 (set (attr "length")
1725 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1726 (const_int MAX_12BIT_OFFSET))
1728 (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1729 (const_int MAX_17BIT_OFFSET))
1731 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1733 (eq (symbol_ref "flag_pic") (const_int 0))
1737 ;; Match the negated branch.
1742 (match_operator 3 "comparison_operator"
1743 [(match_operand:SI 1 "reg_or_0_operand" "rM")
1744 (match_operand:SI 2 "arith5_operand" "rL")])
1746 (label_ref (match_operand 0 "" ""))))]
1750 return output_cbranch (operands, 1, insn);
1752 [(set_attr "type" "cbranch")
1753 (set (attr "length")
1754 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1755 (const_int MAX_12BIT_OFFSET))
1757 (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1758 (const_int MAX_17BIT_OFFSET))
1760 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1762 (eq (symbol_ref "flag_pic") (const_int 0))
1769 (match_operator 3 "comparison_operator"
1770 [(match_operand:DI 1 "reg_or_0_operand" "rM")
1771 (match_operand:DI 2 "reg_or_0_operand" "rM")])
1772 (label_ref (match_operand 0 "" ""))
1777 return output_cbranch (operands, 0, insn);
1779 [(set_attr "type" "cbranch")
1780 (set (attr "length")
1781 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1782 (const_int MAX_12BIT_OFFSET))
1784 (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1785 (const_int MAX_17BIT_OFFSET))
1787 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1789 (eq (symbol_ref "flag_pic") (const_int 0))
1793 ;; Match the negated branch.
1798 (match_operator 3 "comparison_operator"
1799 [(match_operand:DI 1 "reg_or_0_operand" "rM")
1800 (match_operand:DI 2 "reg_or_0_operand" "rM")])
1802 (label_ref (match_operand 0 "" ""))))]
1806 return output_cbranch (operands, 1, insn);
1808 [(set_attr "type" "cbranch")
1809 (set (attr "length")
1810 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1811 (const_int MAX_12BIT_OFFSET))
1813 (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1814 (const_int MAX_17BIT_OFFSET))
1816 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1818 (eq (symbol_ref "flag_pic") (const_int 0))
1824 (match_operator 3 "cmpib_comparison_operator"
1825 [(match_operand:DI 1 "reg_or_0_operand" "rM")
1826 (match_operand:DI 2 "arith5_operand" "rL")])
1827 (label_ref (match_operand 0 "" ""))
1832 return output_cbranch (operands, 0, insn);
1834 [(set_attr "type" "cbranch")
1835 (set (attr "length")
1836 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1837 (const_int MAX_12BIT_OFFSET))
1839 (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1840 (const_int MAX_17BIT_OFFSET))
1842 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1844 (eq (symbol_ref "flag_pic") (const_int 0))
1848 ;; Match the negated branch.
1853 (match_operator 3 "cmpib_comparison_operator"
1854 [(match_operand:DI 1 "reg_or_0_operand" "rM")
1855 (match_operand:DI 2 "arith5_operand" "rL")])
1857 (label_ref (match_operand 0 "" ""))))]
1861 return output_cbranch (operands, 1, insn);
1863 [(set_attr "type" "cbranch")
1864 (set (attr "length")
1865 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1866 (const_int MAX_12BIT_OFFSET))
1868 (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
1869 (const_int MAX_17BIT_OFFSET))
1871 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1873 (eq (symbol_ref "flag_pic") (const_int 0))
1877 ;; Branch on Bit patterns.
1881 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
1883 (match_operand:SI 1 "uint5_operand" ""))
1885 (label_ref (match_operand 2 "" ""))
1890 return output_bb (operands, 0, insn, 0);
1892 [(set_attr "type" "cbranch")
1893 (set (attr "length")
1894 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1895 (const_int MAX_12BIT_OFFSET))
1897 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1898 (const_int MAX_17BIT_OFFSET))
1900 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1902 (eq (symbol_ref "flag_pic") (const_int 0))
1909 (ne (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
1911 (match_operand:DI 1 "uint32_operand" ""))
1913 (label_ref (match_operand 2 "" ""))
1918 return output_bb (operands, 0, insn, 0);
1920 [(set_attr "type" "cbranch")
1921 (set (attr "length")
1922 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1923 (const_int MAX_12BIT_OFFSET))
1925 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1926 (const_int MAX_17BIT_OFFSET))
1928 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1930 (eq (symbol_ref "flag_pic") (const_int 0))
1937 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
1939 (match_operand:SI 1 "uint5_operand" ""))
1942 (label_ref (match_operand 2 "" ""))))]
1946 return output_bb (operands, 1, insn, 0);
1948 [(set_attr "type" "cbranch")
1949 (set (attr "length")
1950 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1951 (const_int MAX_12BIT_OFFSET))
1953 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1954 (const_int MAX_17BIT_OFFSET))
1956 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1958 (eq (symbol_ref "flag_pic") (const_int 0))
1965 (ne (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
1967 (match_operand:DI 1 "uint32_operand" ""))
1970 (label_ref (match_operand 2 "" ""))))]
1974 return output_bb (operands, 1, insn, 0);
1976 [(set_attr "type" "cbranch")
1977 (set (attr "length")
1978 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1979 (const_int MAX_12BIT_OFFSET))
1981 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
1982 (const_int MAX_17BIT_OFFSET))
1984 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
1986 (eq (symbol_ref "flag_pic") (const_int 0))
1993 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
1995 (match_operand:SI 1 "uint5_operand" ""))
1997 (label_ref (match_operand 2 "" ""))
2002 return output_bb (operands, 0, insn, 1);
2004 [(set_attr "type" "cbranch")
2005 (set (attr "length")
2006 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2007 (const_int MAX_12BIT_OFFSET))
2009 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2010 (const_int MAX_17BIT_OFFSET))
2012 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2014 (eq (symbol_ref "flag_pic") (const_int 0))
2021 (eq (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
2023 (match_operand:DI 1 "uint32_operand" ""))
2025 (label_ref (match_operand 2 "" ""))
2030 return output_bb (operands, 0, insn, 1);
2032 [(set_attr "type" "cbranch")
2033 (set (attr "length")
2034 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2035 (const_int MAX_12BIT_OFFSET))
2037 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2038 (const_int MAX_17BIT_OFFSET))
2040 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2042 (eq (symbol_ref "flag_pic") (const_int 0))
2049 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
2051 (match_operand:SI 1 "uint5_operand" ""))
2054 (label_ref (match_operand 2 "" ""))))]
2058 return output_bb (operands, 1, insn, 1);
2060 [(set_attr "type" "cbranch")
2061 (set (attr "length")
2062 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2063 (const_int MAX_12BIT_OFFSET))
2065 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2066 (const_int MAX_17BIT_OFFSET))
2068 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2070 (eq (symbol_ref "flag_pic") (const_int 0))
2077 (eq (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
2079 (match_operand:DI 1 "uint32_operand" ""))
2082 (label_ref (match_operand 2 "" ""))))]
2086 return output_bb (operands, 1, insn, 1);
2088 [(set_attr "type" "cbranch")
2089 (set (attr "length")
2090 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2091 (const_int MAX_12BIT_OFFSET))
2093 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2094 (const_int MAX_17BIT_OFFSET))
2096 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2098 (eq (symbol_ref "flag_pic") (const_int 0))
2102 ;; Branch on Variable Bit patterns.
2106 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
2108 (match_operand:SI 1 "register_operand" "q"))
2110 (label_ref (match_operand 2 "" ""))
2115 return output_bvb (operands, 0, insn, 0);
2117 [(set_attr "type" "cbranch")
2118 (set (attr "length")
2119 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2120 (const_int MAX_12BIT_OFFSET))
2122 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2123 (const_int MAX_17BIT_OFFSET))
2125 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2127 (eq (symbol_ref "flag_pic") (const_int 0))
2134 (ne (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
2136 (match_operand:DI 1 "register_operand" "q"))
2138 (label_ref (match_operand 2 "" ""))
2143 return output_bvb (operands, 0, insn, 0);
2145 [(set_attr "type" "cbranch")
2146 (set (attr "length")
2147 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2148 (const_int MAX_12BIT_OFFSET))
2150 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2151 (const_int MAX_17BIT_OFFSET))
2153 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2155 (eq (symbol_ref "flag_pic") (const_int 0))
2162 (ne (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
2164 (match_operand:SI 1 "register_operand" "q"))
2167 (label_ref (match_operand 2 "" ""))))]
2171 return output_bvb (operands, 1, insn, 0);
2173 [(set_attr "type" "cbranch")
2174 (set (attr "length")
2175 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2176 (const_int MAX_12BIT_OFFSET))
2178 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2179 (const_int MAX_17BIT_OFFSET))
2181 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2183 (eq (symbol_ref "flag_pic") (const_int 0))
2190 (ne (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
2192 (match_operand:DI 1 "register_operand" "q"))
2195 (label_ref (match_operand 2 "" ""))))]
2199 return output_bvb (operands, 1, insn, 0);
2201 [(set_attr "type" "cbranch")
2202 (set (attr "length")
2203 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2204 (const_int MAX_12BIT_OFFSET))
2206 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2207 (const_int MAX_17BIT_OFFSET))
2209 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2211 (eq (symbol_ref "flag_pic") (const_int 0))
2218 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
2220 (match_operand:SI 1 "register_operand" "q"))
2222 (label_ref (match_operand 2 "" ""))
2227 return output_bvb (operands, 0, insn, 1);
2229 [(set_attr "type" "cbranch")
2230 (set (attr "length")
2231 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2232 (const_int MAX_12BIT_OFFSET))
2234 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2235 (const_int MAX_17BIT_OFFSET))
2237 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2239 (eq (symbol_ref "flag_pic") (const_int 0))
2246 (eq (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
2248 (match_operand:DI 1 "register_operand" "q"))
2250 (label_ref (match_operand 2 "" ""))
2255 return output_bvb (operands, 0, insn, 1);
2257 [(set_attr "type" "cbranch")
2258 (set (attr "length")
2259 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2260 (const_int MAX_12BIT_OFFSET))
2262 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2263 (const_int MAX_17BIT_OFFSET))
2265 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2267 (eq (symbol_ref "flag_pic") (const_int 0))
2274 (eq (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
2276 (match_operand:SI 1 "register_operand" "q"))
2279 (label_ref (match_operand 2 "" ""))))]
2283 return output_bvb (operands, 1, insn, 1);
2285 [(set_attr "type" "cbranch")
2286 (set (attr "length")
2287 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2288 (const_int MAX_12BIT_OFFSET))
2290 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2291 (const_int MAX_17BIT_OFFSET))
2293 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2295 (eq (symbol_ref "flag_pic") (const_int 0))
2302 (eq (zero_extract:DI (match_operand:DI 0 "register_operand" "r")
2304 (match_operand:DI 1 "register_operand" "q"))
2307 (label_ref (match_operand 2 "" ""))))]
2311 return output_bvb (operands, 1, insn, 1);
2313 [(set_attr "type" "cbranch")
2314 (set (attr "length")
2315 (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2316 (const_int MAX_12BIT_OFFSET))
2318 (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
2319 (const_int MAX_17BIT_OFFSET))
2321 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2323 (eq (symbol_ref "flag_pic") (const_int 0))
2327 ;; Floating point branches
2329 ;; ??? Nullification is handled differently from other branches.
2330 ;; If nullification is specified, the delay slot is nullified on any
2331 ;; taken branch regardless of branch direction.
2333 [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0))
2334 (label_ref (match_operand 0 "" ""))
2336 "!TARGET_SOFT_FLOAT"
2339 int length = get_attr_length (insn);
2341 int nullify, xdelay;
2344 return \"ftest\;b%* %l0\";
2346 if (dbr_sequence_length () == 0 || INSN_ANNULLED_BRANCH_P (insn))
2350 xoperands[0] = GEN_INT (length - 8);
2356 xoperands[0] = GEN_INT (length - 4);
2360 output_asm_insn (\"ftest\;add,tr %%r0,%%r0,%%r0\;b,n .+%0\", xoperands);
2362 output_asm_insn (\"ftest\;add,tr %%r0,%%r0,%%r0\;b .+%0\", xoperands);
2363 return output_lbranch (operands[0], insn, xdelay);
2365 [(set_attr "type" "fbranch")
2366 (set (attr "length")
2367 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
2368 (const_int MAX_17BIT_OFFSET))
2370 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2372 (eq (symbol_ref "flag_pic") (const_int 0))
2377 [(set (pc) (if_then_else (ne (reg:CCFP 0) (const_int 0))
2379 (label_ref (match_operand 0 "" ""))))]
2380 "!TARGET_SOFT_FLOAT"
2383 int length = get_attr_length (insn);
2385 int nullify, xdelay;
2388 return \"ftest\;add,tr %%r0,%%r0,%%r0\;b%* %0\";
2390 if (dbr_sequence_length () == 0 || INSN_ANNULLED_BRANCH_P (insn))
2394 xoperands[0] = GEN_INT (length - 4);
2400 xoperands[0] = GEN_INT (length);
2404 output_asm_insn (\"ftest\;b,n .+%0\", xoperands);
2406 output_asm_insn (\"ftest\;b .+%0\", xoperands);
2407 return output_lbranch (operands[0], insn, xdelay);
2409 [(set_attr "type" "fbranch")
2410 (set (attr "length")
2411 (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
2412 (const_int MAX_17BIT_OFFSET))
2414 (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
2416 (eq (symbol_ref "flag_pic") (const_int 0))
2420 ;; Move instructions
2422 (define_expand "movsi"
2423 [(set (match_operand:SI 0 "general_operand" "")
2424 (match_operand:SI 1 "general_operand" ""))]
2428 if (emit_move_sequence (operands, SImode, 0))
2432 ;; Handle SImode input reloads requiring %r1 as a scratch register.
2433 (define_expand "reload_insi_r1"
2434 [(set (match_operand:SI 0 "register_operand" "=Z")
2435 (match_operand:SI 1 "non_hard_reg_operand" ""))
2436 (clobber (match_operand:SI 2 "register_operand" "=&a"))]
2440 if (emit_move_sequence (operands, SImode, operands[2]))
2443 /* We don't want the clobber emitted, so handle this ourselves. */
2444 emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
2448 ;; Handle SImode input reloads requiring a general register as a
2449 ;; scratch register.
2450 (define_expand "reload_insi"
2451 [(set (match_operand:SI 0 "register_operand" "=Z")
2452 (match_operand:SI 1 "non_hard_reg_operand" ""))
2453 (clobber (match_operand:SI 2 "register_operand" "=&r"))]
2457 if (emit_move_sequence (operands, SImode, operands[2]))
2460 /* We don't want the clobber emitted, so handle this ourselves. */
2461 emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
2465 ;; Handle SImode output reloads requiring a general register as a
2466 ;; scratch register.
2467 (define_expand "reload_outsi"
2468 [(set (match_operand:SI 0 "non_hard_reg_operand" "")
2469 (match_operand:SI 1 "register_operand" "Z"))
2470 (clobber (match_operand:SI 2 "register_operand" "=&r"))]
2474 if (emit_move_sequence (operands, SImode, operands[2]))
2477 /* We don't want the clobber emitted, so handle this ourselves. */
2478 emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
2483 [(set (match_operand:SI 0 "move_dest_operand"
2484 "=r,r,r,r,r,r,Q,!*q,!r,!*f,*f,T,!r,!f")
2485 (match_operand:SI 1 "move_src_operand"
2486 "A,r,J,N,K,RQ,rM,!rM,!*q,!*fM,RT,*f,!f,!r"))]
2487 "(register_operand (operands[0], SImode)
2488 || reg_or_0_operand (operands[1], SImode))
2489 && !TARGET_SOFT_FLOAT
2496 {zdepi|depwi,z} %Z1,%0
2500 {mfctl|mfctl,w} %%sar,%0
2504 {fstws|fstw} %1,-16(%%sp)\n\t{ldws|ldw} -16(%%sp),%0
2505 {stws|stw} %1,-16(%%sp)\n\t{fldws|fldw} -16(%%sp),%0"
2506 [(set_attr "type" "load,move,move,move,shift,load,store,move,move,fpalu,fpload,fpstore,move,move")
2507 (set_attr "pa_combine_type" "addmove")
2508 (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4,8,8")])
2511 [(set (match_operand:SI 0 "move_dest_operand"
2512 "=r,r,r,r,r,r,Q,!*q,!r,!*f,*f,T")
2513 (match_operand:SI 1 "move_src_operand"
2514 "A,r,J,N,K,RQ,rM,!rM,!*q,!*fM,RT,*f"))]
2515 "(register_operand (operands[0], SImode)
2516 || reg_or_0_operand (operands[1], SImode))
2517 && !TARGET_SOFT_FLOAT
2524 {zdepi|depwi,z} %Z1,%0
2528 {mfctl|mfctl,w} %%sar,%0
2532 [(set_attr "type" "load,move,move,move,shift,load,store,move,move,fpalu,fpload,fpstore")
2533 (set_attr "pa_combine_type" "addmove")
2534 (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4")])
2537 [(set (match_operand:SI 0 "indexed_memory_operand" "=R")
2538 (match_operand:SI 1 "register_operand" "f"))]
2540 && !TARGET_DISABLE_INDEXING
2541 && reload_completed"
2543 [(set_attr "type" "fpstore")
2544 (set_attr "pa_combine_type" "addmove")
2545 (set_attr "length" "4")])
2547 ; Rewrite RTL using an indexed store. This will allow the insn that
2548 ; computes the address to be deleted if the register it sets is dead.
2550 [(set (match_operand:SI 0 "register_operand" "")
2551 (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "")
2553 (match_operand:SI 2 "register_operand" "")))
2554 (set (mem:SI (match_dup 0))
2555 (match_operand:SI 3 "register_operand" ""))]
2557 && !TARGET_DISABLE_INDEXING
2558 && REG_OK_FOR_BASE_P (operands[2])
2559 && FP_REGNO_P (REGNO (operands[3]))"
2560 [(set (mem:SI (plus:SI (mult:SI (match_dup 1) (const_int 4)) (match_dup 2)))
2562 (set (match_dup 0) (plus:SI (mult:SI (match_dup 1) (const_int 4))
2567 [(set (match_operand:SI 0 "register_operand" "")
2568 (plus:SI (match_operand:SI 2 "register_operand" "")
2569 (mult:SI (match_operand:SI 1 "register_operand" "")
2571 (set (mem:SI (match_dup 0))
2572 (match_operand:SI 3 "register_operand" ""))]
2574 && !TARGET_DISABLE_INDEXING
2575 && REG_OK_FOR_BASE_P (operands[2])
2576 && FP_REGNO_P (REGNO (operands[3]))"
2577 [(set (mem:SI (plus:SI (mult:SI (match_dup 1) (const_int 4)) (match_dup 2)))
2579 (set (match_dup 0) (plus:SI (mult:SI (match_dup 1) (const_int 4))
2584 [(set (match_operand:DI 0 "register_operand" "")
2585 (plus:DI (mult:DI (match_operand:DI 1 "register_operand" "")
2587 (match_operand:DI 2 "register_operand" "")))
2588 (set (mem:SI (match_dup 0))
2589 (match_operand:SI 3 "register_operand" ""))]
2591 && !TARGET_DISABLE_INDEXING
2593 && REG_OK_FOR_BASE_P (operands[2])
2594 && FP_REGNO_P (REGNO (operands[3]))"
2595 [(set (mem:SI (plus:DI (mult:DI (match_dup 1) (const_int 4)) (match_dup 2)))
2597 (set (match_dup 0) (plus:DI (mult:DI (match_dup 1) (const_int 4))
2602 [(set (match_operand:DI 0 "register_operand" "")
2603 (plus:DI (match_operand:DI 2 "register_operand" "")
2604 (mult:DI (match_operand:DI 1 "register_operand" "")
2606 (set (mem:SI (match_dup 0))
2607 (match_operand:SI 3 "register_operand" ""))]
2609 && !TARGET_DISABLE_INDEXING
2611 && REG_OK_FOR_BASE_P (operands[2])
2612 && FP_REGNO_P (REGNO (operands[3]))"
2613 [(set (mem:SI (plus:DI (mult:DI (match_dup 1) (const_int 4)) (match_dup 2)))
2615 (set (match_dup 0) (plus:DI (mult:DI (match_dup 1) (const_int 4))
2620 [(set (match_operand:SI 0 "register_operand" "")
2621 (plus:SI (match_operand:SI 1 "register_operand" "")
2622 (match_operand:SI 2 "register_operand" "")))
2623 (set (mem:SI (match_dup 0))
2624 (match_operand:SI 3 "register_operand" ""))]
2626 && !TARGET_DISABLE_INDEXING
2627 && TARGET_NO_SPACE_REGS
2628 && REG_OK_FOR_INDEX_P (operands[1])
2629 && REG_OK_FOR_BASE_P (operands[2])
2630 && FP_REGNO_P (REGNO (operands[3]))"
2631 [(set (mem:SI (plus:SI (match_dup 1) (match_dup 2)))
2633 (set (match_dup 0) (plus:SI (match_dup 1) (match_dup 2)))]
2637 [(set (match_operand:SI 0 "register_operand" "")
2638 (plus:SI (match_operand:SI 1 "register_operand" "")
2639 (match_operand:SI 2 "register_operand" "")))
2640 (set (mem:SI (match_dup 0))
2641 (match_operand:SI 3 "register_operand" ""))]
2643 && !TARGET_DISABLE_INDEXING
2644 && TARGET_NO_SPACE_REGS
2645 && REG_OK_FOR_BASE_P (operands[1])
2646 && REG_OK_FOR_INDEX_P (operands[2])
2647 && FP_REGNO_P (REGNO (operands[3]))"
2648 [(set (mem:SI (plus:SI (match_dup 2) (match_dup 1)))
2650 (set (match_dup 0) (plus:SI (match_dup 2) (match_dup 1)))]
2654 [(set (match_operand:DI 0 "register_operand" "")
2655 (plus:DI (match_operand:DI 1 "register_operand" "")
2656 (match_operand:DI 2 "register_operand" "")))
2657 (set (mem:SI (match_dup 0))
2658 (match_operand:SI 3 "register_operand" ""))]
2660 && !TARGET_DISABLE_INDEXING
2662 && TARGET_NO_SPACE_REGS
2663 && REG_OK_FOR_INDEX_P (operands[1])
2664 && REG_OK_FOR_BASE_P (operands[2])
2665 && FP_REGNO_P (REGNO (operands[3]))"
2666 [(set (mem:SI (plus:DI (match_dup 1) (match_dup 2)))
2668 (set (match_dup 0) (plus:DI (match_dup 1) (match_dup 2)))]
2672 [(set (match_operand:DI 0 "register_operand" "")
2673 (plus:DI (match_operand:DI 1 "register_operand" "")
2674 (match_operand:DI 2 "register_operand" "")))
2675 (set (mem:SI (match_dup 0))
2676 (match_operand:SI 3 "register_operand" ""))]
2678 && !TARGET_DISABLE_INDEXING
2680 && TARGET_NO_SPACE_REGS
2681 && REG_OK_FOR_BASE_P (operands[1])
2682 && REG_OK_FOR_INDEX_P (operands[2])
2683 && FP_REGNO_P (REGNO (operands[3]))"
2684 [(set (mem:SI (plus:DI (match_dup 2) (match_dup 1)))
2686 (set (match_dup 0) (plus:DI (match_dup 2) (match_dup 1)))]
2690 [(set (match_operand:SI 0 "move_dest_operand"
2691 "=r,r,r,r,r,r,Q,!*q,!r")
2692 (match_operand:SI 1 "move_src_operand"
2693 "A,r,J,N,K,RQ,rM,!rM,!*q"))]
2694 "(register_operand (operands[0], SImode)
2695 || reg_or_0_operand (operands[1], SImode))
2696 && TARGET_SOFT_FLOAT"
2702 {zdepi|depwi,z} %Z1,%0
2706 {mfctl|mfctl,w} %%sar,%0"
2707 [(set_attr "type" "load,move,move,move,move,load,store,move,move")
2708 (set_attr "pa_combine_type" "addmove")
2709 (set_attr "length" "4,4,4,4,4,4,4,4,4")])
2711 ;; Load or store with base-register modification.
2713 [(set (match_operand:SI 0 "register_operand" "=r")
2714 (mem:SI (plus:DI (match_operand:DI 1 "register_operand" "+r")
2715 (match_operand:DI 2 "int5_operand" "L"))))
2717 (plus:DI (match_dup 1) (match_dup 2)))]
2720 [(set_attr "type" "load")
2721 (set_attr "length" "4")])
2723 ; And a zero extended variant.
2725 [(set (match_operand:DI 0 "register_operand" "=r")
2726 (zero_extend:DI (mem:SI
2728 (match_operand:DI 1 "register_operand" "+r")
2729 (match_operand:DI 2 "int5_operand" "L")))))
2731 (plus:DI (match_dup 1) (match_dup 2)))]
2734 [(set_attr "type" "load")
2735 (set_attr "length" "4")])
2737 (define_expand "pre_load"
2738 [(parallel [(set (match_operand:SI 0 "register_operand" "")
2739 (mem (plus (match_operand 1 "register_operand" "")
2740 (match_operand 2 "pre_cint_operand" ""))))
2742 (plus (match_dup 1) (match_dup 2)))])]
2748 emit_insn (gen_pre_ldd (operands[0], operands[1], operands[2]));
2751 emit_insn (gen_pre_ldw (operands[0], operands[1], operands[2]));
2755 (define_insn "pre_ldw"
2756 [(set (match_operand:SI 0 "register_operand" "=r")
2757 (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "+r")
2758 (match_operand:SI 2 "pre_cint_operand" ""))))
2760 (plus:SI (match_dup 1) (match_dup 2)))]
2764 if (INTVAL (operands[2]) < 0)
2765 return \"{ldwm|ldw,mb} %2(%1),%0\";
2766 return \"{ldws|ldw},mb %2(%1),%0\";
2768 [(set_attr "type" "load")
2769 (set_attr "length" "4")])
2771 (define_insn "pre_ldd"
2772 [(set (match_operand:DI 0 "register_operand" "=r")
2773 (mem:DI (plus:DI (match_operand:DI 1 "register_operand" "+r")
2774 (match_operand:DI 2 "pre_cint_operand" ""))))
2776 (plus:DI (match_dup 1) (match_dup 2)))]
2779 [(set_attr "type" "load")
2780 (set_attr "length" "4")])
2783 [(set (mem:SI (plus:SI (match_operand:SI 0 "register_operand" "+r")
2784 (match_operand:SI 1 "pre_cint_operand" "")))
2785 (match_operand:SI 2 "reg_or_0_operand" "rM"))
2787 (plus:SI (match_dup 0) (match_dup 1)))]
2791 if (INTVAL (operands[1]) < 0)
2792 return \"{stwm|stw,mb} %r2,%1(%0)\";
2793 return \"{stws|stw},mb %r2,%1(%0)\";
2795 [(set_attr "type" "store")
2796 (set_attr "length" "4")])
2799 [(set (match_operand:SI 0 "register_operand" "=r")
2800 (mem:SI (match_operand:SI 1 "register_operand" "+r")))
2802 (plus:SI (match_dup 1)
2803 (match_operand:SI 2 "post_cint_operand" "")))]
2807 if (INTVAL (operands[2]) > 0)
2808 return \"{ldwm|ldw,ma} %2(%1),%0\";
2809 return \"{ldws|ldw},ma %2(%1),%0\";
2811 [(set_attr "type" "load")
2812 (set_attr "length" "4")])
2814 (define_expand "post_store"
2815 [(parallel [(set (mem (match_operand 0 "register_operand" ""))
2816 (match_operand 1 "reg_or_0_operand" ""))
2819 (match_operand 2 "post_cint_operand" "")))])]
2825 emit_insn (gen_post_std (operands[0], operands[1], operands[2]));
2828 emit_insn (gen_post_stw (operands[0], operands[1], operands[2]));
2832 (define_insn "post_stw"
2833 [(set (mem:SI (match_operand:SI 0 "register_operand" "+r"))
2834 (match_operand:SI 1 "reg_or_0_operand" "rM"))
2836 (plus:SI (match_dup 0)
2837 (match_operand:SI 2 "post_cint_operand" "")))]
2841 if (INTVAL (operands[2]) > 0)
2842 return \"{stwm|stw,ma} %r1,%2(%0)\";
2843 return \"{stws|stw},ma %r1,%2(%0)\";
2845 [(set_attr "type" "store")
2846 (set_attr "length" "4")])
2848 (define_insn "post_std"
2849 [(set (mem:DI (match_operand:DI 0 "register_operand" "+r"))
2850 (match_operand:DI 1 "reg_or_0_operand" "rM"))
2852 (plus:DI (match_dup 0)
2853 (match_operand:DI 2 "post_cint_operand" "")))]
2856 [(set_attr "type" "store")
2857 (set_attr "length" "4")])
2859 ;; For loading the address of a label while generating PIC code.
2860 ;; Note since this pattern can be created at reload time (via movsi), all
2861 ;; the same rules for movsi apply here. (no new pseudos, no temporaries).
2863 [(set (match_operand 0 "pmode_register_operand" "=a")
2864 (match_operand 1 "pic_label_operand" ""))]
2870 xoperands[0] = operands[0];
2871 xoperands[1] = operands[1];
2872 xoperands[2] = gen_label_rtx ();
2874 (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
2875 CODE_LABEL_NUMBER (xoperands[2]));
2876 output_asm_insn (\"mfia %0\", xoperands);
2878 /* If we're trying to load the address of a label that happens to be
2879 close, then we can use a shorter sequence. */
2880 if (GET_CODE (operands[1]) == LABEL_REF
2881 && !LABEL_REF_NONLOCAL_P (operands[1])
2882 && INSN_ADDRESSES_SET_P ()
2883 && abs (INSN_ADDRESSES (INSN_UID (XEXP (operands[1], 0)))
2884 - INSN_ADDRESSES (INSN_UID (insn))) < 8100)
2885 output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands);
2888 output_asm_insn (\"addil L%%%1-%2,%0\", xoperands);
2889 output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands);
2893 [(set_attr "type" "multi")
2894 (set_attr "length" "12")]) ; 8 or 12
2897 [(set (match_operand 0 "pmode_register_operand" "=a")
2898 (match_operand 1 "pic_label_operand" ""))]
2904 xoperands[0] = operands[0];
2905 xoperands[1] = operands[1];
2906 xoperands[2] = gen_label_rtx ();
2908 output_asm_insn (\"bl .+8,%0\", xoperands);
2909 output_asm_insn (\"depi 0,31,2,%0\", xoperands);
2910 (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
2911 CODE_LABEL_NUMBER (xoperands[2]));
2913 /* If we're trying to load the address of a label that happens to be
2914 close, then we can use a shorter sequence. */
2915 if (GET_CODE (operands[1]) == LABEL_REF
2916 && !LABEL_REF_NONLOCAL_P (operands[1])
2917 && INSN_ADDRESSES_SET_P ()
2918 && abs (INSN_ADDRESSES (INSN_UID (XEXP (operands[1], 0)))
2919 - INSN_ADDRESSES (INSN_UID (insn))) < 8100)
2920 output_asm_insn (\"ldo %1-%2(%0),%0\", xoperands);
2923 output_asm_insn (\"addil L%%%1-%2,%0\", xoperands);
2924 output_asm_insn (\"ldo R%%%1-%2(%0),%0\", xoperands);
2928 [(set_attr "type" "multi")
2929 (set_attr "length" "16")]) ; 12 or 16
2932 [(set (match_operand:SI 0 "register_operand" "=a")
2933 (plus:SI (match_operand:SI 1 "register_operand" "r")
2934 (high:SI (match_operand 2 "" ""))))]
2935 "symbolic_operand (operands[2], Pmode)
2936 && ! function_label_operand (operands[2], Pmode)
2939 [(set_attr "type" "binary")
2940 (set_attr "length" "4")])
2943 [(set (match_operand:DI 0 "register_operand" "=a")
2944 (plus:DI (match_operand:DI 1 "register_operand" "r")
2945 (high:DI (match_operand 2 "" ""))))]
2946 "symbolic_operand (operands[2], Pmode)
2947 && ! function_label_operand (operands[2], Pmode)
2951 [(set_attr "type" "binary")
2952 (set_attr "length" "4")])
2954 ;; Always use addil rather than ldil;add sequences. This allows the
2955 ;; HP linker to eliminate the dp relocation if the symbolic operand
2956 ;; lives in the TEXT space.
2958 [(set (match_operand:SI 0 "register_operand" "=a")
2959 (high:SI (match_operand 1 "" "")))]
2960 "symbolic_operand (operands[1], Pmode)
2961 && ! function_label_operand (operands[1], Pmode)
2962 && ! read_only_operand (operands[1], Pmode)
2966 if (TARGET_LONG_LOAD_STORE)
2967 return \"addil NLR'%H1,%%r27\;ldo N'%H1(%%r1),%%r1\";
2969 return \"addil LR'%H1,%%r27\";
2971 [(set_attr "type" "binary")
2972 (set (attr "length")
2973 (if_then_else (eq (symbol_ref "TARGET_LONG_LOAD_STORE") (const_int 0))
2978 ;; This is for use in the prologue/epilogue code. We need it
2979 ;; to add large constants to a stack pointer or frame pointer.
2980 ;; Because of the additional %r1 pressure, we probably do not
2981 ;; want to use this in general code, so make it available
2982 ;; only after reload.
2984 [(set (match_operand:SI 0 "register_operand" "=!a,*r")
2985 (plus:SI (match_operand:SI 1 "register_operand" "r,r")
2986 (high:SI (match_operand 2 "const_int_operand" ""))))]
2990 ldil L'%G2,%0\;{addl|add,l} %0,%1,%0"
2991 [(set_attr "type" "binary,binary")
2992 (set_attr "length" "4,8")])
2995 [(set (match_operand:DI 0 "register_operand" "=!a,*r")
2996 (plus:DI (match_operand:DI 1 "register_operand" "r,r")
2997 (high:DI (match_operand 2 "const_int_operand" ""))))]
2998 "reload_completed && TARGET_64BIT"
3001 ldil L'%G2,%0\;{addl|add,l} %0,%1,%0"
3002 [(set_attr "type" "binary,binary")
3003 (set_attr "length" "4,8")])
3006 [(set (match_operand:SI 0 "register_operand" "=r")
3007 (high:SI (match_operand 1 "" "")))]
3008 "(!flag_pic || !symbolic_operand (operands[1], Pmode))
3009 && !is_function_label_plus_const (operands[1])"
3012 if (symbolic_operand (operands[1], Pmode))
3013 return \"ldil LR'%H1,%0\";
3015 return \"ldil L'%G1,%0\";
3017 [(set_attr "type" "move")
3018 (set_attr "length" "4")])
3021 [(set (match_operand:DI 0 "register_operand" "=r")
3022 (high:DI (match_operand 1 "const_int_operand" "")))]
3025 [(set_attr "type" "move")
3026 (set_attr "length" "4")])
3029 [(set (match_operand:DI 0 "register_operand" "=r")
3030 (lo_sum:DI (match_operand:DI 1 "register_operand" "r")
3031 (match_operand:DI 2 "const_int_operand" "i")))]
3034 [(set_attr "type" "move")
3035 (set_attr "length" "4")])
3038 [(set (match_operand:SI 0 "register_operand" "=r")
3039 (lo_sum:SI (match_operand:SI 1 "register_operand" "r")
3040 (match_operand:SI 2 "immediate_operand" "i")))]
3041 "!is_function_label_plus_const (operands[2])"
3044 gcc_assert (!flag_pic || !symbolic_operand (operands[2], Pmode));
3046 if (symbolic_operand (operands[2], Pmode))
3047 return \"ldo RR'%G2(%1),%0\";
3049 return \"ldo R'%G2(%1),%0\";
3051 [(set_attr "type" "move")
3052 (set_attr "length" "4")])
3054 ;; Now that a symbolic_address plus a constant is broken up early
3055 ;; in the compilation phase (for better CSE) we need a special
3056 ;; combiner pattern to load the symbolic address plus the constant
3057 ;; in only 2 instructions. (For cases where the symbolic address
3058 ;; was not a common subexpression.)
3060 [(set (match_operand:SI 0 "register_operand" "")
3061 (match_operand:SI 1 "symbolic_operand" ""))
3062 (clobber (match_operand:SI 2 "register_operand" ""))]
3063 "! (flag_pic && pic_label_operand (operands[1], SImode))"
3064 [(set (match_dup 2) (high:SI (match_dup 1)))
3065 (set (match_dup 0) (lo_sum:SI (match_dup 2) (match_dup 1)))]
3068 ;; hppa_legitimize_address goes to a great deal of trouble to
3069 ;; create addresses which use indexing. In some cases, this
3070 ;; is a lose because there isn't any store instructions which
3071 ;; allow indexed addresses (with integer register source).
3073 ;; These define_splits try to turn a 3 insn store into
3074 ;; a 2 insn store with some creative RTL rewriting.
3076 [(set (mem:SI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "")
3077 (match_operand:SI 1 "shadd_operand" ""))
3078 (plus:SI (match_operand:SI 2 "register_operand" "")
3079 (match_operand:SI 3 "const_int_operand" ""))))
3080 (match_operand:SI 4 "register_operand" ""))
3081 (clobber (match_operand:SI 5 "register_operand" ""))]
3083 [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1))
3085 (set (mem:SI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))]
3089 [(set (mem:HI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "")
3090 (match_operand:SI 1 "shadd_operand" ""))
3091 (plus:SI (match_operand:SI 2 "register_operand" "")
3092 (match_operand:SI 3 "const_int_operand" ""))))
3093 (match_operand:HI 4 "register_operand" ""))
3094 (clobber (match_operand:SI 5 "register_operand" ""))]
3096 [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1))
3098 (set (mem:HI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))]
3102 [(set (mem:QI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "")
3103 (match_operand:SI 1 "shadd_operand" ""))
3104 (plus:SI (match_operand:SI 2 "register_operand" "")
3105 (match_operand:SI 3 "const_int_operand" ""))))
3106 (match_operand:QI 4 "register_operand" ""))
3107 (clobber (match_operand:SI 5 "register_operand" ""))]
3109 [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1))
3111 (set (mem:QI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))]
3114 (define_expand "movhi"
3115 [(set (match_operand:HI 0 "general_operand" "")
3116 (match_operand:HI 1 "general_operand" ""))]
3120 if (emit_move_sequence (operands, HImode, 0))
3125 [(set (match_operand:HI 0 "move_dest_operand"
3126 "=r,r,r,r,r,Q,!*q,!r,!*f,!r,!f")
3127 (match_operand:HI 1 "move_src_operand"
3128 "r,J,N,K,RQ,rM,!rM,!*q,!*fM,!f,!r"))]
3129 "(register_operand (operands[0], HImode)
3130 || reg_or_0_operand (operands[1], HImode))
3131 && !TARGET_SOFT_FLOAT
3137 {zdepi|depwi,z} %Z1,%0
3141 {mfctl|mfctl,w} %sar,%0
3143 {fstws|fstw} %1,-16(%%sp)\n\t{ldws|ldw} -16(%%sp),%0
3144 {stws|stw} %1,-16(%%sp)\n\t{fldws|fldw} -16(%%sp),%0"
3145 [(set_attr "type" "move,move,move,shift,load,store,move,move,move,move,move")
3146 (set_attr "pa_combine_type" "addmove")
3147 (set_attr "length" "4,4,4,4,4,4,4,4,4,8,8")])
3150 [(set (match_operand:HI 0 "move_dest_operand"
3151 "=r,r,r,r,r,Q,!*q,!r,!*f")
3152 (match_operand:HI 1 "move_src_operand"
3153 "r,J,N,K,RQ,rM,!rM,!*q,!*fM"))]
3154 "(register_operand (operands[0], HImode)
3155 || reg_or_0_operand (operands[1], HImode))
3156 && !TARGET_SOFT_FLOAT
3162 {zdepi|depwi,z} %Z1,%0
3166 {mfctl|mfctl,w} %sar,%0
3168 [(set_attr "type" "move,move,move,shift,load,store,move,move,move")
3169 (set_attr "pa_combine_type" "addmove")
3170 (set_attr "length" "4,4,4,4,4,4,4,4,4")])
3173 [(set (match_operand:HI 0 "move_dest_operand"
3174 "=r,r,r,r,r,Q,!*q,!r")
3175 (match_operand:HI 1 "move_src_operand"
3176 "r,J,N,K,RQ,rM,!rM,!*q"))]
3177 "(register_operand (operands[0], HImode)
3178 || reg_or_0_operand (operands[1], HImode))
3179 && TARGET_SOFT_FLOAT"
3184 {zdepi|depwi,z} %Z1,%0
3188 {mfctl|mfctl,w} %sar,%0"
3189 [(set_attr "type" "move,move,move,shift,load,store,move,move")
3190 (set_attr "pa_combine_type" "addmove")
3191 (set_attr "length" "4,4,4,4,4,4,4,4")])
3194 [(set (match_operand:HI 0 "register_operand" "=r")
3195 (mem:HI (plus:SI (match_operand:SI 1 "register_operand" "+r")
3196 (match_operand:SI 2 "int5_operand" "L"))))
3198 (plus:SI (match_dup 1) (match_dup 2)))]
3200 "{ldhs|ldh},mb %2(%1),%0"
3201 [(set_attr "type" "load")
3202 (set_attr "length" "4")])
3205 [(set (match_operand:HI 0 "register_operand" "=r")
3206 (mem:HI (plus:DI (match_operand:DI 1 "register_operand" "+r")
3207 (match_operand:DI 2 "int5_operand" "L"))))
3209 (plus:DI (match_dup 1) (match_dup 2)))]
3212 [(set_attr "type" "load")
3213 (set_attr "length" "4")])
3215 ; And a zero extended variant.
3217 [(set (match_operand:DI 0 "register_operand" "=r")
3218 (zero_extend:DI (mem:HI
3220 (match_operand:DI 1 "register_operand" "+r")
3221 (match_operand:DI 2 "int5_operand" "L")))))
3223 (plus:DI (match_dup 1) (match_dup 2)))]
3226 [(set_attr "type" "load")
3227 (set_attr "length" "4")])
3230 [(set (match_operand:SI 0 "register_operand" "=r")
3231 (zero_extend:SI (mem:HI
3233 (match_operand:SI 1 "register_operand" "+r")
3234 (match_operand:SI 2 "int5_operand" "L")))))
3236 (plus:SI (match_dup 1) (match_dup 2)))]
3238 "{ldhs|ldh},mb %2(%1),%0"
3239 [(set_attr "type" "load")
3240 (set_attr "length" "4")])
3243 [(set (match_operand:SI 0 "register_operand" "=r")
3244 (zero_extend:SI (mem:HI
3246 (match_operand:DI 1 "register_operand" "+r")
3247 (match_operand:DI 2 "int5_operand" "L")))))
3249 (plus:DI (match_dup 1) (match_dup 2)))]
3252 [(set_attr "type" "load")
3253 (set_attr "length" "4")])
3256 [(set (mem:HI (plus:SI (match_operand:SI 0 "register_operand" "+r")
3257 (match_operand:SI 1 "int5_operand" "L")))
3258 (match_operand:HI 2 "reg_or_0_operand" "rM"))
3260 (plus:SI (match_dup 0) (match_dup 1)))]
3262 "{sths|sth},mb %r2,%1(%0)"
3263 [(set_attr "type" "store")
3264 (set_attr "length" "4")])
3267 [(set (mem:HI (plus:DI (match_operand:DI 0 "register_operand" "+r")
3268 (match_operand:DI 1 "int5_operand" "L")))
3269 (match_operand:HI 2 "reg_or_0_operand" "rM"))
3271 (plus:DI (match_dup 0) (match_dup 1)))]
3274 [(set_attr "type" "store")
3275 (set_attr "length" "4")])
3278 [(set (match_operand:HI 0 "register_operand" "=r")
3279 (plus:HI (match_operand:HI 1 "register_operand" "r")
3280 (match_operand 2 "const_int_operand" "J")))]
3283 [(set_attr "type" "binary")
3284 (set_attr "pa_combine_type" "addmove")
3285 (set_attr "length" "4")])
3287 (define_expand "movqi"
3288 [(set (match_operand:QI 0 "general_operand" "")
3289 (match_operand:QI 1 "general_operand" ""))]
3293 if (emit_move_sequence (operands, QImode, 0))
3298 [(set (match_operand:QI 0 "move_dest_operand"
3299 "=r,r,r,r,r,Q,!*q,!r,!*f,!r,!f")
3300 (match_operand:QI 1 "move_src_operand"
3301 "r,J,N,K,RQ,rM,!rM,!*q,!*fM,!f,!r"))]
3302 "(register_operand (operands[0], QImode)
3303 || reg_or_0_operand (operands[1], QImode))
3304 && !TARGET_SOFT_FLOAT
3310 {zdepi|depwi,z} %Z1,%0
3314 {mfctl|mfctl,w} %%sar,%0
3316 {fstws|fstw} %1,-16(%%sp)\n\t{ldws|ldw} -16(%%sp),%0
3317 {stws|stw} %1,-16(%%sp)\n\t{fldws|fldw} -16(%%sp),%0"
3318 [(set_attr "type" "move,move,move,shift,load,store,move,move,move,move,move")
3319 (set_attr "pa_combine_type" "addmove")
3320 (set_attr "length" "4,4,4,4,4,4,4,4,4,8,8")])
3323 [(set (match_operand:QI 0 "move_dest_operand"
3324 "=r,r,r,r,r,Q,!*q,!r,!*f")
3325 (match_operand:QI 1 "move_src_operand"
3326 "r,J,N,K,RQ,rM,!rM,!*q,!*fM"))]
3327 "(register_operand (operands[0], QImode)
3328 || reg_or_0_operand (operands[1], QImode))
3329 && !TARGET_SOFT_FLOAT
3335 {zdepi|depwi,z} %Z1,%0
3339 {mfctl|mfctl,w} %%sar,%0
3341 [(set_attr "type" "move,move,move,shift,load,store,move,move,move")
3342 (set_attr "pa_combine_type" "addmove")
3343 (set_attr "length" "4,4,4,4,4,4,4,4,4")])
3346 [(set (match_operand:QI 0 "move_dest_operand"
3347 "=r,r,r,r,r,Q,!*q,!r")
3348 (match_operand:QI 1 "move_src_operand"
3349 "r,J,N,K,RQ,rM,!rM,!*q"))]
3350 "(register_operand (operands[0], QImode)
3351 || reg_or_0_operand (operands[1], QImode))
3352 && TARGET_SOFT_FLOAT"
3357 {zdepi|depwi,z} %Z1,%0
3361 {mfctl|mfctl,w} %%sar,%0"
3362 [(set_attr "type" "move,move,move,shift,load,store,move,move")
3363 (set_attr "pa_combine_type" "addmove")
3364 (set_attr "length" "4,4,4,4,4,4,4,4")])
3367 [(set (match_operand:QI 0 "register_operand" "=r")
3368 (mem:QI (plus:SI (match_operand:SI 1 "register_operand" "+r")
3369 (match_operand:SI 2 "int5_operand" "L"))))
3370 (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))]
3372 "{ldbs|ldb},mb %2(%1),%0"
3373 [(set_attr "type" "load")
3374 (set_attr "length" "4")])
3377 [(set (match_operand:QI 0 "register_operand" "=r")
3378 (mem:QI (plus:DI (match_operand:DI 1 "register_operand" "+r")
3379 (match_operand:DI 2 "int5_operand" "L"))))
3380 (set (match_dup 1) (plus:DI (match_dup 1) (match_dup 2)))]
3383 [(set_attr "type" "load")
3384 (set_attr "length" "4")])
3386 ; Now the same thing with zero extensions.
3388 [(set (match_operand:DI 0 "register_operand" "=r")
3389 (zero_extend:DI (mem:QI (plus:DI
3390 (match_operand:DI 1 "register_operand" "+r")
3391 (match_operand:DI 2 "int5_operand" "L")))))
3392 (set (match_dup 1) (plus:DI (match_dup 1) (match_dup 2)))]
3395 [(set_attr "type" "load")
3396 (set_attr "length" "4")])
3399 [(set (match_operand:SI 0 "register_operand" "=r")
3400 (zero_extend:SI (mem:QI (plus:SI
3401 (match_operand:SI 1 "register_operand" "+r")
3402 (match_operand:SI 2 "int5_operand" "L")))))
3403 (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))]
3405 "{ldbs|ldb},mb %2(%1),%0"
3406 [(set_attr "type" "load")
3407 (set_attr "length" "4")])
3410 [(set (match_operand:SI 0 "register_operand" "=r")
3411 (zero_extend:SI (mem:QI (plus:DI
3412 (match_operand:DI 1 "register_operand" "+r")
3413 (match_operand:DI 2 "int5_operand" "L")))))
3414 (set (match_dup 1) (plus:DI (match_dup 1) (match_dup 2)))]
3417 [(set_attr "type" "load")
3418 (set_attr "length" "4")])
3421 [(set (match_operand:HI 0 "register_operand" "=r")
3422 (zero_extend:HI (mem:QI (plus:SI
3423 (match_operand:SI 1 "register_operand" "+r")
3424 (match_operand:SI 2 "int5_operand" "L")))))
3425 (set (match_dup 1) (plus:SI (match_dup 1) (match_dup 2)))]
3427 "{ldbs|ldb},mb %2(%1),%0"
3428 [(set_attr "type" "load")
3429 (set_attr "length" "4")])
3432 [(set (match_operand:HI 0 "register_operand" "=r")
3433 (zero_extend:HI (mem:QI (plus:DI
3434 (match_operand:DI 1 "register_operand" "+r")
3435 (match_operand:DI 2 "int5_operand" "L")))))
3436 (set (match_dup 1) (plus:DI (match_dup 1) (match_dup 2)))]
3439 [(set_attr "type" "load")
3440 (set_attr "length" "4")])
3443 [(set (mem:QI (plus:SI (match_operand:SI 0 "register_operand" "+r")
3444 (match_operand:SI 1 "int5_operand" "L")))
3445 (match_operand:QI 2 "reg_or_0_operand" "rM"))
3447 (plus:SI (match_dup 0) (match_dup 1)))]
3449 "{stbs|stb},mb %r2,%1(%0)"
3450 [(set_attr "type" "store")
3451 (set_attr "length" "4")])
3454 [(set (mem:QI (plus:DI (match_operand:DI 0 "register_operand" "+r")
3455 (match_operand:DI 1 "int5_operand" "L")))
3456 (match_operand:QI 2 "reg_or_0_operand" "rM"))
3458 (plus:DI (match_dup 0) (match_dup 1)))]
3461 [(set_attr "type" "store")
3462 (set_attr "length" "4")])