1 ;; Mips.md Machine Description for MIPS based processors
2 ;; Contributed by A. Lichnewsky, lich@inria.inria.fr
3 ;; Changes by Michael Meissner, meissner@osf.org
4 ;; Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
6 ;; This file is part of GNU CC.
8 ;; GNU CC is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; GNU CC is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU CC; see the file COPYING. If not, write to
20 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 ;; ....................
28 ;; ....................
30 ;; Classification of each insn.
31 ;; branch conditional branch
32 ;; jump unconditional jump
33 ;; call unconditional call
34 ;; load load instruction(s)
35 ;; store store instruction(s)
36 ;; move data movement within same register set
37 ;; xfer transfer to/from coprocessor
38 ;; hilo transfer of hi/lo registers
39 ;; arith integer arithmetic instruction
40 ;; darith double precision integer arithmetic instructions
41 ;; imul integer multiply
42 ;; idiv integer divide
43 ;; icmp integer compare
44 ;; fadd floating point add/subtract
45 ;; fmul floating point multiply
46 ;; fdiv floating point divide
47 ;; fabs floating point absolute value
48 ;; fneg floating point negation
49 ;; fcmp floating point compare
50 ;; fcvt floating point convert
51 ;; fsqrt floating point square root
52 ;; multi multiword sequence (or user asm statements)
56 "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,idiv,icmp,fadd,fmul,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop"
57 (const_string "unknown"))
59 ;; Main data type used by the insn
60 (define_attr "mode" "unknown,none,QI,HI,SI,DI,SF,DF,FPSW" (const_string "unknown"))
62 ;; # instructions (4 bytes each)
63 (define_attr "length" "" (const_int 1))
65 ;; whether or not an instruction has a mandatory delay slot
66 (define_attr "dslot" "no,yes"
67 (if_then_else (eq_attr "type" "branch,jump,call,load,xfer,hilo,fcmp")
71 ;; Attribute describing the processor. This attribute must match exactly
72 ;; with the processor_type enumeration in mips.h.
74 ;; Attribute describing the processor
75 ;; (define_attr "cpu" "default,r3000,r6000,r4000"
77 ;; (cond [(eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R3000")) (const_string "r3000")
78 ;; (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R4000")) (const_string "r4000")
79 ;; (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R6000")) (const_string "r6000")]
80 ;; (const_string "default"))))
82 (define_attr "cpu" "default,r3000,r6000,r4000"
83 (const (symbol_ref "mips_cpu_attr")))
85 ;; Attribute defining whether or not we can use the branch-likely instructions
88 (define_attr "branch_likely" "no,yes"
90 (if_then_else (ge (symbol_ref "mips_isa") (const_int 2))
92 (const_string "no"))))
95 ;; Describe a user's asm statement.
96 (define_asm_attributes
97 [(set_attr "type" "multi")])
101 ;; .........................
103 ;; Delay slots, can't describe load/fcmp/xfer delay slots here
105 ;; .........................
107 (define_delay (eq_attr "type" "branch")
108 [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
110 (and (eq_attr "branch_likely" "yes") (and (eq_attr "dslot" "no") (eq_attr "length" "1")))])
112 (define_delay (eq_attr "type" "call,jump")
113 [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
119 ;; .........................
123 ;; .........................
125 ; (define_function_unit NAME MULTIPLICITY SIMULTANEITY
126 ; TEST READY-DELAY BUSY-DELAY [CONFLICT-LIST])
128 ;; Make the default case (PROCESSOR_DEFAULT) handle the worst case
130 (define_function_unit "memory" 1 0
131 (and (eq_attr "type" "load") (eq_attr "cpu" "!r3000"))
134 (define_function_unit "memory" 1 0
135 (and (eq_attr "type" "load") (eq_attr "cpu" "r3000"))
138 (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0)
140 (define_function_unit "addr" 1 0 (eq_attr "type" "fcmp") 2 0)
142 (define_function_unit "memory" 1 0 (eq_attr "type" "xfer") 2 0)
143 (define_function_unit "memory" 1 0 (eq_attr "type" "hilo") 3 0)
145 (define_function_unit "imuldiv" 1 1
146 (and (eq_attr "type" "imul") (eq_attr "cpu" "!r3000,r4000"))
149 (define_function_unit "imuldiv" 1 1
150 (and (eq_attr "type" "imul") (eq_attr "cpu" "r3000"))
153 (define_function_unit "imuldiv" 1 1
154 (and (eq_attr "type" "imul") (eq_attr "cpu" "r4000"))
157 (define_function_unit "imuldiv" 1 1
158 (and (eq_attr "type" "idiv") (eq_attr "cpu" "!r3000,r4000"))
161 (define_function_unit "imuldiv" 1 1
162 (and (eq_attr "type" "idiv") (eq_attr "cpu" "r3000"))
165 (define_function_unit "imuldiv" 1 1
166 (and (eq_attr "type" "idiv") (eq_attr "cpu" "r4000"))
169 (define_function_unit "adder" 1 1
170 (and (eq_attr "type" "fadd") (eq_attr "cpu" "!r3000,r6000"))
173 (define_function_unit "adder" 1 1
174 (and (eq_attr "type" "fadd") (eq_attr "cpu" "r3000"))
177 (define_function_unit "adder" 1 1
178 (and (eq_attr "type" "fadd") (eq_attr "cpu" "r6000"))
181 (define_function_unit "adder" 1 1
182 (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "!r3000"))
185 (define_function_unit "adder" 1 1
186 (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000"))
189 (define_function_unit "mult" 1 1
190 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000")))
193 (define_function_unit "mult" 1 1
194 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000")))
197 (define_function_unit "mult" 1 1
198 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000")))
201 (define_function_unit "mult" 1 1
202 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000")))
205 (define_function_unit "mult" 1 1
206 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000")))
209 (define_function_unit "mult" 1 1
210 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000")))
213 (define_function_unit "divide" 1 1
214 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000")))
217 (define_function_unit "divide" 1 1
218 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000")))
221 (define_function_unit "divide" 1 1
222 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000")))
225 (define_function_unit "divide" 1 1
226 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000")))
229 (define_function_unit "divide" 1 1
230 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000")))
233 (define_function_unit "divide" 1 1
234 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000")))
237 (define_function_unit "divide" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 108)
238 (define_function_unit "divide" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 224)
241 ;; The following functional units do not use the cpu type, and use
242 ;; much less memory in genattrtab.c.
244 ;; (define_function_unit "memory" 1 0 (eq_attr "type" "load") 3 0)
245 ;; (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0)
247 ;; (define_function_unit "fp_comp" 1 0 (eq_attr "type" "fcmp") 2 0)
249 ;; (define_function_unit "transfer" 1 0 (eq_attr "type" "xfer") 2 0)
250 ;; (define_function_unit "transfer" 1 0 (eq_attr "type" "hilo") 3 0)
252 ;; (define_function_unit "imuldiv" 1 1 (eq_attr "type" "imul") 17 34)
253 ;; (define_function_unit "imuldiv" 1 1 (eq_attr "type" "idiv") 38 76)
255 ;; (define_function_unit "adder" 1 1 (eq_attr "type" "fadd") 4 8)
256 ;; (define_function_unit "adder" 1 1 (eq_attr "type" "fabs,fneg") 2 4)
258 ;; (define_function_unit "mult" 1 1 (and (eq_attr "type" "fmul") (eq_attr "mode" "SF")) 7 14)
259 ;; (define_function_unit "mult" 1 1 (and (eq_attr "type" "fmul") (eq_attr "mode" "DF")) 8 16)
261 ;; (define_function_unit "divide" 1 1 (and (eq_attr "type" "fdiv") (eq_attr "mode" "SF")) 23 46)
262 ;; (define_function_unit "divide" 1 1 (and (eq_attr "type" "fdiv") (eq_attr "mode" "DF")) 36 72)
264 ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 108)
265 ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 224)
269 ;; ....................
273 ;; ....................
276 (define_insn "adddf3"
277 [(set (match_operand:DF 0 "register_operand" "=f")
278 (plus:DF (match_operand:DF 1 "register_operand" "f")
279 (match_operand:DF 2 "register_operand" "f")))]
282 [(set_attr "type" "fadd")
283 (set_attr "mode" "DF")
284 (set_attr "length" "1")])
286 (define_insn "addsf3"
287 [(set (match_operand:SF 0 "register_operand" "=f")
288 (plus:SF (match_operand:SF 1 "register_operand" "f")
289 (match_operand:SF 2 "register_operand" "f")))]
292 [(set_attr "type" "fadd")
293 (set_attr "mode" "SF")
294 (set_attr "length" "1")])
296 (define_insn "addsi3"
297 [(set (match_operand:SI 0 "register_operand" "=d")
298 (plus:SI (match_operand:SI 1 "arith_operand" "%d")
299 (match_operand:SI 2 "arith_operand" "dI")))]
303 return (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
304 ? \"subu\\t%0,%1,%n2\"
305 : \"addu\\t%0,%1,%2\";
307 [(set_attr "type" "arith")
308 (set_attr "mode" "SI")
309 (set_attr "length" "1")])
311 (define_expand "adddi3"
312 [(parallel [(set (match_operand:DI 0 "register_operand" "")
313 (plus:DI (match_operand:DI 1 "register_operand" "")
314 (match_operand:DI 2 "arith_operand" "")))
315 (clobber (match_dup 3))])]
316 "!TARGET_DEBUG_G_MODE"
319 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == -32768)
320 operands[2] = force_reg (SImode, operands[2]);
322 operands[3] = gen_reg_rtx (SImode);
325 (define_insn "adddi3_internal_1"
326 [(set (match_operand:DI 0 "register_operand" "=d,&d")
327 (plus:DI (match_operand:DI 1 "register_operand" "0,d")
328 (match_operand:DI 2 "register_operand" "d,d")))
329 (clobber (match_operand:SI 3 "register_operand" "=d,d"))]
330 "!TARGET_DEBUG_G_MODE"
333 return (REGNO (operands[0]) == REGNO (operands[1])
334 && REGNO (operands[0]) == REGNO (operands[2]))
335 ? \"srl\\t%3,%L0,31\;sll\\t%M0,%M0,1\;sll\\t%L0,%L1,1\;addu\\t%M0,%M0,%3\"
336 : \"addu\\t%L0,%L1,%L2\;sltu\\t%3,%L0,%L2\;addu\\t%M0,%M1,%M2\;addu\\t%M0,%M0,%3\";
338 [(set_attr "type" "darith")
339 (set_attr "mode" "DI")
340 (set_attr "length" "4")])
343 [(set (match_operand:DI 0 "register_operand" "")
344 (plus:DI (match_operand:DI 1 "register_operand" "")
345 (match_operand:DI 2 "register_operand" "")))
346 (clobber (match_operand:SI 3 "register_operand" ""))]
347 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
348 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
349 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
350 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))
351 && (REGNO (operands[0]) != REGNO (operands[1])
352 || REGNO (operands[0]) != REGNO (operands[2]))"
354 [(set (subreg:SI (match_dup 0) 0)
355 (plus:SI (subreg:SI (match_dup 1) 0)
356 (subreg:SI (match_dup 2) 0)))
359 (ltu:SI (subreg:SI (match_dup 0) 0)
360 (subreg:SI (match_dup 2) 0)))
362 (set (subreg:SI (match_dup 0) 1)
363 (plus:SI (subreg:SI (match_dup 1) 1)
364 (subreg:SI (match_dup 2) 1)))
366 (set (subreg:SI (match_dup 0) 1)
367 (plus:SI (subreg:SI (match_dup 0) 1)
372 [(set (match_operand:DI 0 "register_operand" "")
373 (plus:DI (match_operand:DI 1 "register_operand" "")
374 (match_operand:DI 2 "register_operand" "")))
375 (clobber (match_operand:SI 3 "register_operand" ""))]
376 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
377 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
378 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
379 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))
380 && (REGNO (operands[0]) != REGNO (operands[1])
381 || REGNO (operands[0]) != REGNO (operands[2]))"
383 [(set (subreg:SI (match_dup 0) 1)
384 (plus:SI (subreg:SI (match_dup 1) 1)
385 (subreg:SI (match_dup 2) 1)))
388 (ltu:SI (subreg:SI (match_dup 0) 1)
389 (subreg:SI (match_dup 2) 1)))
391 (set (subreg:SI (match_dup 0) 0)
392 (plus:SI (subreg:SI (match_dup 1) 0)
393 (subreg:SI (match_dup 2) 0)))
395 (set (subreg:SI (match_dup 0) 0)
396 (plus:SI (subreg:SI (match_dup 0) 0)
400 (define_insn "adddi3_internal_2"
401 [(set (match_operand:DI 0 "register_operand" "=d,d,d")
402 (plus:DI (match_operand:DI 1 "register_operand" "%d,%d,%d")
403 (match_operand:DI 2 "small_int" "P,J,N")))
404 (clobber (match_operand:SI 3 "register_operand" "=d,d,d"))]
405 "!TARGET_DEBUG_G_MODE && INTVAL (operands[2]) != -32768"
407 addu\\t%L0,%L1,%2\;sltu\\t%3,%L0,%2\;addu\\t%M0,%M1,%3
408 move\\t%L0,%L1\;move\\t%M0,%M1
409 subu\\t%L0,%L1,%n2\;sltu\\t%3,%L0,%2\;subu\\t%M0,%M1,1\;addu\\t%M0,%M0,%3"
410 [(set_attr "type" "darith")
411 (set_attr "mode" "DI")
412 (set_attr "length" "3,2,4")])
415 [(set (match_operand:DI 0 "register_operand" "")
416 (plus:DI (match_operand:DI 1 "register_operand" "")
417 (match_operand:DI 2 "small_int" "")))
418 (clobber (match_operand:SI 3 "register_operand" "=d"))]
419 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
420 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
421 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
422 && INTVAL (operands[2]) > 0"
424 [(set (subreg:SI (match_dup 0) 0)
425 (plus:SI (subreg:SI (match_dup 1) 0)
429 (ltu:SI (subreg:SI (match_dup 0) 0)
432 (set (subreg:SI (match_dup 0) 1)
433 (plus:SI (subreg:SI (match_dup 1) 1)
438 [(set (match_operand:DI 0 "register_operand" "")
439 (plus:DI (match_operand:DI 1 "register_operand" "")
440 (match_operand:DI 2 "small_int" "")))
441 (clobber (match_operand:SI 3 "register_operand" "=d"))]
442 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
443 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
444 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
445 && INTVAL (operands[2]) > 0"
447 [(set (subreg:SI (match_dup 0) 1)
448 (plus:SI (subreg:SI (match_dup 1) 1)
452 (ltu:SI (subreg:SI (match_dup 0) 1)
455 (set (subreg:SI (match_dup 0) 0)
456 (plus:SI (subreg:SI (match_dup 1) 0)
461 ;; ....................
465 ;; ....................
468 (define_insn "subdf3"
469 [(set (match_operand:DF 0 "register_operand" "=f")
470 (minus:DF (match_operand:DF 1 "register_operand" "f")
471 (match_operand:DF 2 "register_operand" "f")))]
474 [(set_attr "type" "fadd")
475 (set_attr "mode" "DF")
476 (set_attr "length" "1")])
478 (define_insn "subsf3"
479 [(set (match_operand:SF 0 "register_operand" "=f")
480 (minus:SF (match_operand:SF 1 "register_operand" "f")
481 (match_operand:SF 2 "register_operand" "f")))]
484 [(set_attr "type" "fadd")
485 (set_attr "mode" "SF")
486 (set_attr "length" "1")])
488 (define_insn "subsi3"
489 [(set (match_operand:SI 0 "register_operand" "=d")
490 (minus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
491 (match_operand:SI 2 "arith_operand" "dI")))]
495 return (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
496 ? \"addu\\t%0,%z1,%n2\"
497 : \"subu\\t%0,%z1,%2\";
499 [(set_attr "type" "arith")
500 (set_attr "mode" "SI")
501 (set_attr "length" "1")])
503 (define_expand "subdi3"
504 [(parallel [(set (match_operand:DI 0 "register_operand" "=d")
505 (minus:DI (match_operand:DI 1 "register_operand" "d")
506 (match_operand:DI 2 "register_operand" "d")))
507 (clobber (match_dup 3))])]
508 "!TARGET_DEBUG_G_MODE"
509 "operands[3] = gen_reg_rtx (SImode);")
511 (define_insn "subdi3_internal"
512 [(set (match_operand:DI 0 "register_operand" "=d")
513 (minus:DI (match_operand:DI 1 "register_operand" "d")
514 (match_operand:DI 2 "register_operand" "d")))
515 (clobber (match_operand:SI 3 "register_operand" "=d"))]
516 "!TARGET_DEBUG_G_MODE"
517 "sltu\\t%3,%L1,%L2\;subu\\t%L0,%L1,%L2\;subu\\t%M0,%M1,%M2\;subu\\t%M0,%M0,%3"
518 [(set_attr "type" "darith")
519 (set_attr "mode" "DI")
520 (set_attr "length" "4")])
523 [(set (match_operand:DI 0 "register_operand" "")
524 (minus:DI (match_operand:DI 1 "register_operand" "")
525 (match_operand:DI 2 "register_operand" "")))
526 (clobber (match_operand:SI 3 "register_operand" ""))]
527 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
528 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
529 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
530 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
533 (ltu:SI (subreg:SI (match_dup 1) 0)
534 (subreg:SI (match_dup 2) 0)))
536 (set (subreg:SI (match_dup 0) 0)
537 (minus:SI (subreg:SI (match_dup 1) 0)
538 (subreg:SI (match_dup 2) 0)))
540 (set (subreg:SI (match_dup 0) 1)
541 (minus:SI (subreg:SI (match_dup 1) 1)
542 (subreg:SI (match_dup 2) 1)))
544 (set (subreg:SI (match_dup 0) 1)
545 (minus:SI (subreg:SI (match_dup 0) 1)
550 [(set (match_operand:DI 0 "register_operand" "")
551 (minus:DI (match_operand:DI 1 "register_operand" "")
552 (match_operand:DI 2 "register_operand" "")))
553 (clobber (match_operand:SI 3 "register_operand" ""))]
554 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
555 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
556 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
557 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
560 (ltu:SI (subreg:SI (match_dup 1) 1)
561 (subreg:SI (match_dup 2) 1)))
563 (set (subreg:SI (match_dup 0) 1)
564 (minus:SI (subreg:SI (match_dup 1) 1)
565 (subreg:SI (match_dup 2) 1)))
567 (set (subreg:SI (match_dup 0) 0)
568 (minus:SI (subreg:SI (match_dup 1) 0)
569 (subreg:SI (match_dup 2) 0)))
571 (set (subreg:SI (match_dup 0) 0)
572 (minus:SI (subreg:SI (match_dup 0) 0)
576 (define_insn "subdi3_internal_2"
577 [(set (match_operand:DI 0 "register_operand" "=d,d,d")
578 (minus:DI (match_operand:DI 1 "register_operand" "d,d,d")
579 (match_operand:DI 2 "small_int" "P,J,N")))
580 (clobber (match_operand:SI 3 "register_operand" "=d,d,d"))]
581 "!TARGET_DEBUG_G_MODE && INTVAL (operands[2]) != -32768"
583 sltu\\t%3,%L1,%2\;subu\\t%L0,%L1,%2\;subu\\t%M0,%M1,%3
584 move\\t%L0,%L1\;move\\t%M0,%M1
585 sltu\\t%3,%L1,%2\;subu\\t%L0,%L1,%2\;subu\\t%M0,%M1,1\;subu\\t%M0,%M0,%3"
586 [(set_attr "type" "darith")
587 (set_attr "mode" "DI")
588 (set_attr "length" "3,2,4")])
591 [(set (match_operand:DI 0 "register_operand" "")
592 (minus:DI (match_operand:DI 1 "register_operand" "")
593 (match_operand:DI 2 "small_int" "")))
594 (clobber (match_operand:SI 3 "register_operand" ""))]
595 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
596 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
597 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
598 && INTVAL (operands[2]) > 0"
601 (ltu:SI (subreg:SI (match_dup 1) 0)
604 (set (subreg:SI (match_dup 0) 0)
605 (minus:SI (subreg:SI (match_dup 1) 0)
608 (set (subreg:SI (match_dup 0) 1)
609 (minus:SI (subreg:SI (match_dup 1) 1)
614 [(set (match_operand:DI 0 "register_operand" "")
615 (minus:DI (match_operand:DI 1 "register_operand" "")
616 (match_operand:DI 2 "small_int" "")))
617 (clobber (match_operand:SI 3 "register_operand" ""))]
618 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
619 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
620 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
621 && INTVAL (operands[2]) > 0"
624 (ltu:SI (subreg:SI (match_dup 1) 1)
627 (set (subreg:SI (match_dup 0) 1)
628 (minus:SI (subreg:SI (match_dup 1) 1)
631 (set (subreg:SI (match_dup 0) 0)
632 (minus:SI (subreg:SI (match_dup 1) 0)
638 ;; ....................
642 ;; ....................
645 (define_insn "muldf3"
646 [(set (match_operand:DF 0 "register_operand" "=f")
647 (mult:DF (match_operand:DF 1 "register_operand" "f")
648 (match_operand:DF 2 "register_operand" "f")))]
651 [(set_attr "type" "fmul")
652 (set_attr "mode" "DF")
653 (set_attr "length" "1")])
655 (define_insn "mulsf3"
656 [(set (match_operand:SF 0 "register_operand" "=f")
657 (mult:SF (match_operand:SF 1 "register_operand" "f")
658 (match_operand:SF 2 "register_operand" "f")))]
661 [(set_attr "type" "fmul")
662 (set_attr "mode" "SF")
663 (set_attr "length" "1")])
665 (define_insn "mulsi3"
666 [(set (match_operand:SI 0 "register_operand" "=d")
667 (mult:SI (match_operand:SI 1 "register_operand" "d")
668 (match_operand:SI 2 "register_operand" "d")))
669 (clobber (reg:SI 64))
670 (clobber (reg:SI 65))]
676 xoperands[0] = operands[0];
677 xoperands[1] = gen_rtx (REG, SImode, LO_REGNUM);
679 output_asm_insn (\"mult\\t%1,%2\", operands);
680 output_asm_insn (mips_move_1word (xoperands, insn), xoperands);
683 [(set_attr "type" "imul")
684 (set_attr "mode" "SI")
685 (set_attr "length" "3")]) ;; mult + mflo + delay
688 [(set (match_operand:SI 0 "register_operand" "")
689 (mult:SI (match_operand:SI 1 "register_operand" "")
690 (match_operand:SI 2 "register_operand" "")))
691 (clobber (reg:SI 64))
692 (clobber (reg:SI 65))]
693 "!TARGET_DEBUG_D_MODE"
694 [(parallel [(set (reg:SI 65) ;; low register
695 (mult:SI (match_dup 1)
697 (clobber (reg:SI 64))])
702 (define_insn "mulsi3_internal"
703 [(set (reg:SI 65) ;; low register
704 (mult:SI (match_operand:SI 0 "register_operand" "d")
705 (match_operand:SI 1 "register_operand" "d")))
706 (clobber (reg:SI 64))]
709 [(set_attr "type" "imul")
710 (set_attr "mode" "SI")
711 (set_attr "length" "1")])
713 (define_insn "mulsidi3"
714 [(set (match_operand:DI 0 "register_operand" "=d")
715 (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
716 (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))))
717 (clobber (reg:DI 64))]
723 xoperands[0] = operands[0];
724 xoperands[1] = gen_rtx (REG, DImode, MD_REG_FIRST);
726 output_asm_insn (\"mult\\t%1,%2\", operands);
727 output_asm_insn (mips_move_2words (xoperands, insn), xoperands);
730 [(set_attr "type" "imul")
731 (set_attr "mode" "SI")
732 (set_attr "length" "4")]) ;; mult + mflo + mfhi + delay
734 (define_insn "umulsidi3"
735 [(set (match_operand:DI 0 "register_operand" "=d")
736 (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
737 (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))))
738 (clobber (reg:DI 64))]
744 xoperands[0] = operands[0];
745 xoperands[1] = gen_rtx (REG, DImode, MD_REG_FIRST);
747 output_asm_insn (\"multu\\t%1,%2\", operands);
748 output_asm_insn (mips_move_2words (xoperands, insn), xoperands);
751 [(set_attr "type" "imul")
752 (set_attr "mode" "SI")
753 (set_attr "length" "4")]) ;; mult + mflo + mfhi + delay
757 ;; ....................
759 ;; DIVISION and REMAINDER
761 ;; ....................
764 (define_insn "divdf3"
765 [(set (match_operand:DF 0 "register_operand" "=f")
766 (div:DF (match_operand:DF 1 "register_operand" "f")
767 (match_operand:DF 2 "register_operand" "f")))]
770 [(set_attr "type" "fdiv")
771 (set_attr "mode" "DF")
772 (set_attr "length" "1")])
774 (define_insn "divsf3"
775 [(set (match_operand:SF 0 "register_operand" "=f")
776 (div:SF (match_operand:SF 1 "register_operand" "f")
777 (match_operand:SF 2 "register_operand" "f")))]
780 [(set_attr "type" "fdiv")
781 (set_attr "mode" "SF")
782 (set_attr "length" "1")])
784 ;; If optimizing, prefer the divmod functions over separate div and
785 ;; mod functions, since this will allow using one instruction for both
786 ;; the quotient and remainder. At present, the divmod is not moved out
787 ;; of loops if it is constant within the loop, so allow -mdebugc to
788 ;; use the old method of doing things.
790 ;; 64 is the multiply/divide hi register
791 ;; 65 is the multiply/divide lo register
793 (define_insn "divmodsi4"
794 [(set (match_operand:SI 0 "register_operand" "=d")
795 (div:SI (match_operand:SI 1 "register_operand" "d")
796 (match_operand:SI 2 "register_operand" "d")))
797 (set (match_operand:SI 3 "register_operand" "=d")
798 (mod:SI (match_dup 1)
800 (clobber (reg:SI 64))
801 (clobber (reg:SI 65))]
805 if (find_reg_note (insn, REG_UNUSED, operands[3]))
806 return \"div\\t%0,%1,%2\";
808 if (find_reg_note (insn, REG_UNUSED, operands[0]))
809 return \"rem\\t%3,%1,%2\";
811 return \"div\\t%0,%1,%2\;mfhi\\t%3\";
813 [(set_attr "type" "idiv")
814 (set_attr "mode" "SI")
815 (set_attr "length" "13")]) ;; various tests for dividing by 0 and such
817 (define_insn "udivmodsi4"
818 [(set (match_operand:SI 0 "register_operand" "=d")
819 (udiv:SI (match_operand:SI 1 "register_operand" "d")
820 (match_operand:SI 2 "register_operand" "d")))
821 (set (match_operand:SI 3 "register_operand" "=d")
822 (umod:SI (match_dup 1)
824 (clobber (reg:SI 64))
825 (clobber (reg:SI 65))]
829 if (find_reg_note (insn, REG_UNUSED, operands[3]))
830 return \"divu\\t%0,%1,%2\";
832 if (find_reg_note (insn, REG_UNUSED, operands[0]))
833 return \"remu\\t%3,%1,%2\";
835 return \"divu\\t%0,%1,%2\;mfhi\\t%3\";
837 [(set_attr "type" "idiv")
838 (set_attr "mode" "SI")
839 (set_attr "length" "13")]) ;; various tests for dividing by 0 and such
841 (define_insn "divsi3"
842 [(set (match_operand:SI 0 "register_operand" "=d")
843 (div:SI (match_operand:SI 1 "register_operand" "d")
844 (match_operand:SI 2 "register_operand" "d")))
845 (clobber (reg:SI 64))
846 (clobber (reg:SI 65))]
849 [(set_attr "type" "idiv")
850 (set_attr "mode" "SI")
851 (set_attr "length" "13")]) ;; various tests for dividing by 0 and such
853 (define_insn "modsi3"
854 [(set (match_operand:SI 0 "register_operand" "=d")
855 (mod:SI (match_operand:SI 1 "register_operand" "d")
856 (match_operand:SI 2 "register_operand" "d")))
857 (clobber (reg:SI 64))
858 (clobber (reg:SI 65))]
861 [(set_attr "type" "idiv")
862 (set_attr "mode" "SI")
863 (set_attr "length" "14")]) ;; various tests for dividing by 0 and such
865 (define_insn "udivsi3"
866 [(set (match_operand:SI 0 "register_operand" "=d")
867 (udiv:SI (match_operand:SI 1 "register_operand" "d")
868 (match_operand:SI 2 "register_operand" "d")))
869 (clobber (reg:SI 64))
870 (clobber (reg:SI 65))]
873 [(set_attr "type" "idiv")
874 (set_attr "mode" "SI")
875 (set_attr "length" "14")]) ;; various tests for dividing by 0 and such
877 (define_insn "umodsi3"
878 [(set (match_operand:SI 0 "register_operand" "=d")
879 (umod:SI (match_operand:SI 1 "register_operand" "d")
880 (match_operand:SI 2 "register_operand" "d")))
881 (clobber (reg:SI 64))
882 (clobber (reg:SI 65))]
885 [(set_attr "type" "idiv")
886 (set_attr "mode" "SI")
887 (set_attr "length" "14")]) ;; various tests for dividing by 0 and such
891 ;; ....................
895 ;; ....................
897 (define_insn "sqrtdf2"
898 [(set (match_operand:DF 0 "register_operand" "=f")
899 (sqrt:DF (match_operand:DF 1 "register_operand" "f")))]
900 "TARGET_HARD_FLOAT && HAVE_SQRT_P()"
902 [(set_attr "type" "fabs")
903 (set_attr "mode" "DF")
904 (set_attr "length" "1")])
906 (define_insn "sqrtsf2"
907 [(set (match_operand:SF 0 "register_operand" "=f")
908 (sqrt:SF (match_operand:SF 1 "register_operand" "f")))]
909 "TARGET_HARD_FLOAT && HAVE_SQRT_P()"
911 [(set_attr "type" "fabs")
912 (set_attr "mode" "SF")
913 (set_attr "length" "1")])
917 ;; ....................
921 ;; ....................
923 ;; Do not use the integer abs macro instruction, since that signals an
924 ;; exception on -2147483648 (sigh).
926 (define_insn "abssi2"
927 [(set (match_operand:SI 0 "register_operand" "=d")
928 (abs:SI (match_operand:SI 1 "register_operand" "d")))]
933 dslots_jump_filled++;
934 operands[2] = const0_rtx;
936 return (REGNO (operands[0]) == REGNO (operands[1]))
937 ? \"bgez\\t%1,1f%#\\n\\tsubu\\t%0,%z2,%0\\n1:\"
938 : \"%(bgez\\t%1,1f\\n\\tmove\\t%0,%1\\n\\tsubu\\t%0,%z2,%0\\n1:%)\";
940 [(set_attr "type" "multi")
941 (set_attr "mode" "SI")
942 (set_attr "length" "3")])
944 (define_insn "absdf2"
945 [(set (match_operand:DF 0 "register_operand" "=f")
946 (abs:DF (match_operand:DF 1 "register_operand" "f")))]
949 [(set_attr "type" "fabs")
950 (set_attr "mode" "DF")
951 (set_attr "length" "1")])
953 (define_insn "abssf2"
954 [(set (match_operand:SF 0 "register_operand" "=f")
955 (abs:SF (match_operand:SF 1 "register_operand" "f")))]
958 [(set_attr "type" "fabs")
959 (set_attr "mode" "SF")
960 (set_attr "length" "1")])
964 ;; ....................
966 ;; FIND FIRST BIT INSTRUCTION
968 ;; ....................
971 (define_insn "ffssi2"
972 [(set (match_operand:SI 0 "register_operand" "=&d")
973 (ffs:SI (match_operand:SI 1 "register_operand" "d")))
974 (clobber (match_scratch:SI 2 "d"))
975 (clobber (match_scratch:SI 3 "d"))]
979 dslots_jump_total += 2;
980 dslots_jump_filled += 2;
981 operands[4] = const0_rtx;
983 if (optimize && find_reg_note (insn, REG_DEAD, operands[1]))
986 \\tbeq\\t%1,%z4,2f\\n\\
987 1:\\tand\\t%2,%1,0x0001\\n\\
988 \\taddu\\t%0,%0,1\\n\\
989 \\tbeq\\t%2,%z4,1b\\n\\
990 \\tsrl\\t%1,%1,1\\n\\
996 \\tbeq\\t%3,%z4,2f\\n\\
997 1:\\tand\\t%2,%3,0x0001\\n\\
998 \\taddu\\t%0,%0,1\\n\\
999 \\tbeq\\t%2,%z4,1b\\n\\
1000 \\tsrl\\t%3,%3,1\\n\\
1003 [(set_attr "type" "multi")
1004 (set_attr "mode" "SI")
1005 (set_attr "length" "6")])
1009 ;; ....................
1011 ;; NEGATION and ONE'S COMPLEMENT
1013 ;; ....................
1015 (define_insn "negsi2"
1016 [(set (match_operand:SI 0 "register_operand" "=d")
1017 (neg:SI (match_operand:SI 1 "register_operand" "d")))]
1021 operands[2] = const0_rtx;
1022 return \"subu\\t%0,%z2,%1\";
1024 [(set_attr "type" "arith")
1025 (set_attr "mode" "SI")
1026 (set_attr "length" "1")])
1028 (define_expand "negdi3"
1029 [(parallel [(set (match_operand:DI 0 "register_operand" "=d")
1030 (neg:DI (match_operand:DI 1 "register_operand" "d")))
1031 (clobber (match_dup 2))])]
1032 "!TARGET_DEBUG_G_MODE"
1033 "operands[2] = gen_reg_rtx (SImode);")
1035 (define_insn "negdi3_internal"
1036 [(set (match_operand:DI 0 "register_operand" "=d")
1037 (neg:DI (match_operand:DI 1 "register_operand" "d")))
1038 (clobber (match_operand:SI 2 "register_operand" "=d"))]
1039 "!TARGET_DEBUG_G_MODE"
1042 operands[3] = const0_rtx;
1043 return \"subu\\t%L0,%z3,%L1\;subu\\t%M0,%z3,%M1\;sltu\\t%2,%z3,%L0\;subu\\t%M0,%M0,%2\";
1045 [(set_attr "type" "darith")
1046 (set_attr "mode" "DI")
1047 (set_attr "length" "4")])
1049 (define_insn "negdf2"
1050 [(set (match_operand:DF 0 "register_operand" "=f")
1051 (neg:DF (match_operand:DF 1 "register_operand" "f")))]
1054 [(set_attr "type" "fneg")
1055 (set_attr "mode" "DF")
1056 (set_attr "length" "1")])
1058 (define_insn "negsf2"
1059 [(set (match_operand:SF 0 "register_operand" "=f")
1060 (neg:SF (match_operand:SF 1 "register_operand" "f")))]
1063 [(set_attr "type" "fneg")
1064 (set_attr "mode" "SF")
1065 (set_attr "length" "1")])
1067 (define_insn "one_cmplsi2"
1068 [(set (match_operand:SI 0 "register_operand" "=d")
1069 (not:SI (match_operand:SI 1 "register_operand" "d")))]
1073 operands[2] = const0_rtx;
1074 return \"nor\\t%0,%z2,%1\";
1076 [(set_attr "type" "arith")
1077 (set_attr "mode" "SI")
1078 (set_attr "length" "1")])
1080 (define_insn "one_cmpldi2"
1081 [(set (match_operand:DI 0 "register_operand" "=d")
1082 (not:SI (match_operand:DI 1 "register_operand" "d")))]
1086 operands[2] = const0_rtx;
1087 return \"nor\\t%M0,%z2,%M1\;nor\\t%L0,%z2,%L1\";
1089 [(set_attr "type" "darith")
1090 (set_attr "mode" "DI")
1091 (set_attr "length" "2")])
1094 [(set (match_operand:DI 0 "register_operand" "")
1095 (not:DI (match_operand:DI 1 "register_operand" "")))]
1096 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1097 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1098 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))"
1100 [(set (subreg:SI (match_dup 0) 0) (not:SI (subreg:SI (match_dup 1) 0)))
1101 (set (subreg:SI (match_dup 0) 1) (not:SI (subreg:SI (match_dup 1) 1)))]
1104 ;; Simple hack to recognize the "nor" instruction on the MIPS
1105 ;; This must appear before the normal or patterns, so that the
1106 ;; combiner will correctly fold things.
1108 (define_insn "norsi3"
1109 [(set (match_operand:SI 0 "register_operand" "=d")
1110 (not:SI (ior:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
1111 (match_operand:SI 2 "reg_or_0_operand" "dJ"))))]
1114 [(set_attr "type" "arith")
1115 (set_attr "mode" "SI")
1116 (set_attr "length" "1")])
1118 (define_insn "nordi3"
1119 [(set (match_operand:DI 0 "register_operand" "=d")
1120 (not:DI (ior:DI (match_operand:DI 1 "register_operand" "d")
1121 (match_operand:DI 2 "register_operand" "d"))))]
1123 "nor\\t%M0,%M1,%M2\;nor\\t%L0,%L1,%L2"
1124 [(set_attr "type" "darith")
1125 (set_attr "mode" "DI")
1126 (set_attr "length" "2")])
1129 [(set (match_operand:DI 0 "register_operand" "")
1130 (not:DI (ior:DI (match_operand:DI 1 "register_operand" "")
1131 (match_operand:DI 2 "register_operand" ""))))]
1132 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1133 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1134 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1135 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1137 [(set (subreg:SI (match_dup 0) 0) (not:SI (ior:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0))))
1138 (set (subreg:SI (match_dup 0) 1) (not:SI (ior:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1))))]
1143 ;; ....................
1147 ;; ....................
1150 (define_insn "andsi3"
1151 [(set (match_operand:SI 0 "register_operand" "=d,d")
1152 (and:SI (match_operand:SI 1 "uns_arith_operand" "%d,d")
1153 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
1158 [(set_attr "type" "arith")
1159 (set_attr "mode" "SI")
1160 (set_attr "length" "1")])
1162 (define_insn "anddi3"
1163 [(set (match_operand:DI 0 "register_operand" "=d")
1164 (and:DI (match_operand:DI 1 "register_operand" "d")
1165 (match_operand:DI 2 "register_operand" "d")))]
1166 "!TARGET_DEBUG_G_MODE"
1167 "and\\t%M0,%M1,%M2\;and\\t%L0,%L1,%L2"
1168 [(set_attr "type" "darith")
1169 (set_attr "mode" "DI")
1170 (set_attr "length" "2")])
1173 [(set (match_operand:DI 0 "register_operand" "")
1174 (and:DI (match_operand:DI 1 "register_operand" "")
1175 (match_operand:DI 2 "register_operand" "")))]
1176 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1177 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1178 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1179 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1181 [(set (subreg:SI (match_dup 0) 0) (and:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
1182 (set (subreg:SI (match_dup 0) 1) (and:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1)))]
1185 (define_insn "iorsi3"
1186 [(set (match_operand:SI 0 "register_operand" "=d,d")
1187 (ior:SI (match_operand:SI 1 "uns_arith_operand" "%d,d")
1188 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
1193 [(set_attr "type" "arith")
1194 (set_attr "mode" "SI")
1195 (set_attr "length" "1")])
1197 (define_insn "iordi3"
1198 [(set (match_operand:DI 0 "register_operand" "=d")
1199 (ior:DI (match_operand:DI 1 "register_operand" "d")
1200 (match_operand:DI 2 "register_operand" "d")))]
1201 "!TARGET_DEBUG_G_MODE"
1202 "or\\t%M0,%M1,%M2\;or\\t%L0,%L1,%L2"
1203 [(set_attr "type" "darith")
1204 (set_attr "mode" "DI")
1205 (set_attr "length" "2")])
1208 [(set (match_operand:DI 0 "register_operand" "")
1209 (ior:DI (match_operand:DI 1 "register_operand" "")
1210 (match_operand:DI 2 "register_operand" "")))]
1211 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1212 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1213 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1214 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1216 [(set (subreg:SI (match_dup 0) 0) (ior:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
1217 (set (subreg:SI (match_dup 0) 1) (ior:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1)))]
1220 (define_insn "xorsi3"
1221 [(set (match_operand:SI 0 "register_operand" "=d,d")
1222 (xor:SI (match_operand:SI 1 "uns_arith_operand" "%d,d")
1223 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
1228 [(set_attr "type" "arith")
1229 (set_attr "mode" "SI")
1230 (set_attr "length" "1")])
1232 (define_insn "xordi3"
1233 [(set (match_operand:DI 0 "register_operand" "=d")
1234 (xor:DI (match_operand:DI 1 "register_operand" "d")
1235 (match_operand:DI 2 "register_operand" "d")))]
1236 "!TARGET_DEBUG_G_MODE"
1237 "xor\\t%M0,%M1,%M2\;xor\\t%L0,%L1,%L2"
1238 [(set_attr "type" "darith")
1239 (set_attr "mode" "DI")
1240 (set_attr "length" "2")])
1243 [(set (match_operand:DI 0 "register_operand" "")
1244 (xor:DI (match_operand:DI 1 "register_operand" "")
1245 (match_operand:DI 2 "register_operand" "")))]
1246 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1247 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1248 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1249 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1251 [(set (subreg:SI (match_dup 0) 0) (xor:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
1252 (set (subreg:SI (match_dup 0) 1) (xor:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1)))]
1257 ;; ....................
1261 ;; ....................
1263 (define_insn "truncdfsf2"
1264 [(set (match_operand:SF 0 "register_operand" "=f")
1265 (float_truncate:SF (match_operand:DF 1 "register_operand" "f")))]
1268 [(set_attr "type" "fcvt")
1269 (set_attr "mode" "SF")
1270 (set_attr "length" "1")])
1274 ;; ....................
1278 ;; ....................
1281 ;; Those for integer source operand
1282 ;; are ordered widest source type first.
1284 (define_insn "zero_extendhisi2"
1285 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
1286 (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "d,R,m")))]
1290 if (which_alternative == 0)
1291 return \"andi\\t%0,%1,0xffff\";
1293 return mips_move_1word (operands, insn, TRUE);
1295 [(set_attr "type" "arith,load,load")
1296 (set_attr "mode" "SI")
1297 (set_attr "length" "1,1,2")])
1299 (define_insn "zero_extendqihi2"
1300 [(set (match_operand:HI 0 "register_operand" "=d,d,d")
1301 (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
1305 if (which_alternative == 0)
1306 return \"andi\\t%0,%1,0x00ff\";
1308 return mips_move_1word (operands, insn, TRUE);
1310 [(set_attr "type" "arith,load,load")
1311 (set_attr "mode" "HI")
1312 (set_attr "length" "1,1,2")])
1314 (define_insn "zero_extendqisi2"
1315 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
1316 (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
1320 if (which_alternative == 0)
1321 return \"andi\\t%0,%1,0x00ff\";
1323 return mips_move_1word (operands, insn, TRUE);
1325 [(set_attr "type" "arith,load,load")
1326 (set_attr "mode" "SI")
1327 (set_attr "length" "1,1,2")])
1331 ;; ....................
1335 ;; ....................
1338 ;; Those for integer source operand
1339 ;; are ordered widest source type first.
1341 ;; These patterns originally accepted general_operands, however, slightly
1342 ;; better code is generated by only accepting register_operands, and then
1343 ;; letting combine generate the lh and lb insns.
1345 (define_expand "extendhisi2"
1346 [(set (match_operand:SI 0 "register_operand" "")
1347 (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
1351 if (optimize && GET_CODE (operands[1]) == MEM)
1352 operands[1] = force_not_mem (operands[1]);
1354 if (GET_CODE (operands[1]) != MEM)
1356 rtx op1 = gen_lowpart (SImode, operands[1]);
1357 rtx temp = gen_reg_rtx (SImode);
1358 rtx shift = gen_rtx (CONST_INT, VOIDmode, 16);
1360 emit_insn (gen_ashlsi3 (temp, op1, shift));
1361 emit_insn (gen_ashrsi3 (operands[0], temp, shift));
1366 (define_insn "extendhisi2_internal"
1367 [(set (match_operand:SI 0 "register_operand" "=d,d")
1368 (sign_extend:SI (match_operand:HI 1 "memory_operand" "R,m")))]
1370 "* return mips_move_1word (operands, insn, FALSE);"
1371 [(set_attr "type" "load")
1372 (set_attr "mode" "SI")
1373 (set_attr "length" "1,2")])
1375 (define_expand "extendqihi2"
1376 [(set (match_operand:HI 0 "register_operand" "")
1377 (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
1381 if (optimize && GET_CODE (operands[1]) == MEM)
1382 operands[1] = force_not_mem (operands[1]);
1384 if (GET_CODE (operands[1]) != MEM)
1386 rtx op0 = gen_lowpart (SImode, operands[0]);
1387 rtx op1 = gen_lowpart (SImode, operands[1]);
1388 rtx temp = gen_reg_rtx (SImode);
1389 rtx shift = gen_rtx (CONST_INT, VOIDmode, 24);
1391 emit_insn (gen_ashlsi3 (temp, op1, shift));
1392 emit_insn (gen_ashrsi3 (op0, temp, shift));
1397 (define_insn "extendqihi2_internal"
1398 [(set (match_operand:HI 0 "register_operand" "=d,d")
1399 (sign_extend:HI (match_operand:QI 1 "memory_operand" "R,m")))]
1401 "* return mips_move_1word (operands, insn, FALSE);"
1402 [(set_attr "type" "load")
1403 (set_attr "mode" "SI")
1404 (set_attr "length" "1,2")])
1407 (define_expand "extendqisi2"
1408 [(set (match_operand:SI 0 "register_operand" "")
1409 (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
1413 if (optimize && GET_CODE (operands[1]) == MEM)
1414 operands[1] = force_not_mem (operands[1]);
1416 if (GET_CODE (operands[1]) != MEM)
1418 rtx op1 = gen_lowpart (SImode, operands[1]);
1419 rtx temp = gen_reg_rtx (SImode);
1420 rtx shift = gen_rtx (CONST_INT, VOIDmode, 24);
1422 emit_insn (gen_ashlsi3 (temp, op1, shift));
1423 emit_insn (gen_ashrsi3 (operands[0], temp, shift));
1428 (define_insn "extendqisi2_insn"
1429 [(set (match_operand:SI 0 "register_operand" "=d,d")
1430 (sign_extend:SI (match_operand:QI 1 "memory_operand" "R,m")))]
1432 "* return mips_move_1word (operands, insn, FALSE);"
1433 [(set_attr "type" "load")
1434 (set_attr "mode" "SI")
1435 (set_attr "length" "1,2")])
1438 (define_insn "extendsfdf2"
1439 [(set (match_operand:DF 0 "register_operand" "=f")
1440 (float_extend:DF (match_operand:SF 1 "register_operand" "f")))]
1443 [(set_attr "type" "fcvt")
1444 (set_attr "mode" "DF")
1445 (set_attr "length" "1")])
1450 ;; ....................
1454 ;; ....................
1456 (define_insn "fix_truncdfsi2"
1457 [(set (match_operand:SI 0 "general_operand" "=d,*f,R,o")
1458 (fix:SI (match_operand:DF 1 "register_operand" "f,*f,f,f")))
1459 (clobber (match_scratch:SI 2 "=d,*d,d,d"))
1460 (clobber (match_scratch:DF 3 "=f,*X,f,f"))]
1466 if (which_alternative == 1)
1467 return \"trunc.w.d %0,%1,%2\";
1469 output_asm_insn (\"trunc.w.d %3,%1,%2\", operands);
1471 xoperands[0] = operands[0];
1472 xoperands[1] = operands[3];
1473 output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands);
1476 [(set_attr "type" "fcvt")
1477 (set_attr "mode" "DF")
1478 (set_attr "length" "11,9,10,11")])
1481 (define_insn "fix_truncsfsi2"
1482 [(set (match_operand:SI 0 "general_operand" "=d,*f,R,o")
1483 (fix:SI (match_operand:SF 1 "register_operand" "f,*f,f,f")))
1484 (clobber (match_scratch:SI 2 "=d,*d,d,d"))
1485 (clobber (match_scratch:SF 3 "=f,*X,f,f"))]
1491 if (which_alternative == 1)
1492 return \"trunc.w.s %0,%1,%2\";
1494 output_asm_insn (\"trunc.w.s %3,%1,%2\", operands);
1496 xoperands[0] = operands[0];
1497 xoperands[1] = operands[3];
1498 output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands);
1501 [(set_attr "type" "fcvt")
1502 (set_attr "mode" "SF")
1503 (set_attr "length" "11,9,10,11")])
1506 (define_insn "floatsidf2"
1507 [(set (match_operand:DF 0 "register_operand" "=f,f,f")
1508 (float:DF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))]
1512 dslots_load_total++;
1513 if (GET_CODE (operands[1]) == MEM)
1514 return \"l.s\\t%0,%1%#\;cvt.d.w\\t%0,%0\";
1516 return \"mtc1\\t%1,%0%#\;cvt.d.w\\t%0,%0\";
1518 [(set_attr "type" "fcvt")
1519 (set_attr "mode" "DF")
1520 (set_attr "length" "3,4,3")])
1523 (define_insn "floatsisf2"
1524 [(set (match_operand:SF 0 "register_operand" "=f,f,f")
1525 (float:SF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))]
1529 dslots_load_total++;
1530 if (GET_CODE (operands[1]) == MEM)
1531 return \"l.s\\t%0,%1%#\;cvt.s.w\\t%0,%0\";
1533 return \"mtc1\\t%1,%0%#\;cvt.s.w\\t%0,%0\";
1535 [(set_attr "type" "fcvt")
1536 (set_attr "mode" "SF")
1537 (set_attr "length" "3,4,3")])
1540 (define_expand "fixuns_truncdfsi2"
1541 [(set (match_operand:SI 0 "register_operand" "")
1542 (unsigned_fix:SI (match_operand:DF 1 "register_operand" "")))]
1546 rtx reg1 = gen_reg_rtx (DFmode);
1547 rtx reg2 = gen_reg_rtx (DFmode);
1548 rtx reg3 = gen_reg_rtx (SImode);
1549 rtx label1 = gen_label_rtx ();
1550 rtx label2 = gen_label_rtx ();
1551 REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 31);
1553 if (reg1) /* turn off complaints about unreached code */
1555 extern rtx gen_cmpdf ();
1556 emit_move_insn (reg1, immed_real_const_1 (offset, DFmode));
1557 do_pending_stack_adjust ();
1559 emit_insn (gen_cmpdf (operands[1], reg1));
1560 emit_jump_insn (gen_bge (label1));
1562 emit_insn (gen_fix_truncdfsi2 (operands[0], operands[1]));
1563 emit_jump_insn (gen_rtx (SET, VOIDmode, pc_rtx,
1564 gen_rtx (LABEL_REF, VOIDmode, label2)));
1567 emit_label (label1);
1568 emit_move_insn (reg2, gen_rtx (MINUS, DFmode, operands[1], reg1));
1569 emit_move_insn (reg3, gen_rtx (CONST_INT, VOIDmode, 0x80000000));
1571 emit_insn (gen_fix_truncdfsi2 (operands[0], reg2));
1572 emit_insn (gen_iorsi3 (operands[0], operands[0], reg3));
1574 emit_label (label2);
1576 /* allow REG_NOTES to be set on last insn (labels don't have enough
1577 fields, and can't be used for REG_NOTES anyway). */
1578 emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx));
1584 (define_expand "fixuns_truncsfsi2"
1585 [(set (match_operand:SI 0 "register_operand" "")
1586 (unsigned_fix:SI (match_operand:SF 1 "register_operand" "")))]
1590 rtx reg1 = gen_reg_rtx (SFmode);
1591 rtx reg2 = gen_reg_rtx (SFmode);
1592 rtx reg3 = gen_reg_rtx (SImode);
1593 rtx label1 = gen_label_rtx ();
1594 rtx label2 = gen_label_rtx ();
1595 REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 31);
1597 if (reg1) /* turn off complaints about unreached code */
1599 extern rtx gen_cmpsf ();
1600 emit_move_insn (reg1, immed_real_const_1 (offset, SFmode));
1601 do_pending_stack_adjust ();
1603 emit_insn (gen_cmpsf (operands[1], reg1));
1604 emit_jump_insn (gen_bge (label1));
1606 emit_insn (gen_fix_truncsfsi2 (operands[0], operands[1]));
1607 emit_jump_insn (gen_rtx (SET, VOIDmode, pc_rtx,
1608 gen_rtx (LABEL_REF, VOIDmode, label2)));
1611 emit_label (label1);
1612 emit_move_insn (reg2, gen_rtx (MINUS, SFmode, operands[1], reg1));
1613 emit_move_insn (reg3, gen_rtx (CONST_INT, VOIDmode, 0x80000000));
1615 emit_insn (gen_fix_truncsfsi2 (operands[0], reg2));
1616 emit_insn (gen_iorsi3 (operands[0], operands[0], reg3));
1618 emit_label (label2);
1620 /* allow REG_NOTES to be set on last insn (labels don't have enough
1621 fields, and can't be used for REG_NOTES anyway). */
1622 emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx));
1629 ;; ....................
1633 ;; ....................
1635 ;; unaligned word moves generated by the block moves.
1637 (define_expand "movsi_unaligned"
1638 [(set (match_operand:SI 0 "general_operand" "")
1639 (unspec [(match_operand:SI 1 "general_operand" "")] 0))]
1643 extern rtx gen_movsi_ulw ();
1644 extern rtx gen_movsi ();
1647 if (GET_CODE (operands[0]) == MEM)
1649 rtx reg = gen_reg_rtx (SImode);
1650 rtx insn = emit_insn (gen_movsi_ulw (reg, operands[1]));
1651 rtx addr = XEXP (operands[0], 0);
1652 if (CONSTANT_P (addr))
1653 REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_EQUIV, addr, REG_NOTES (insn));
1655 if (reg_or_0_operand (operands[1], SImode))
1661 /* Generate appropriate load, store. If not a load or store,
1662 do a normal movsi. */
1663 if (GET_CODE (operands[0]) != MEM && GET_CODE (operands[1]) != MEM)
1665 emit_insn (gen_movsi (operands[0], operands[1]));
1669 /* Fall through and generate normal code. */
1672 (define_insn "movsi_ulw"
1673 [(set (match_operand:SI 0 "register_operand" "=&d,&d,d,d")
1674 (unspec [(match_operand:SI 1 "general_operand" "R,o,dIKL,M")] 0))]
1678 extern rtx eliminate_constant_term ();
1685 if (which_alternative != 0)
1686 return mips_move_1word (operands, insn, FALSE);
1689 mips_count_memory_refs (operands[1], 2);
1691 /* The stack/frame pointers are always aligned, so we can convert
1692 to the faster lw if we are referencing an aligned stack location. */
1694 offset = const0_rtx;
1695 addr = XEXP (operands[1], 0);
1696 mem_addr = eliminate_constant_term (addr, &offset);
1698 if ((INTVAL (offset) & (UNITS_PER_WORD-1)) == 0
1699 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
1700 ret = \"lw\\t%0,%1\";
1704 ret = \"ulw\\t%0,%1\";
1707 enum rtx_code code = GET_CODE (addr);
1709 if (code == CONST || code == SYMBOL_REF || code == LABEL_REF)
1711 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 1);
1712 ret = \"%[la\\t%2,%1\;ulw\\t%0,0(%2)%]\";
1717 return mips_fill_delay_slot (ret, DELAY_LOAD, operands, insn);
1719 [(set_attr "type" "load,load,move,arith")
1720 (set_attr "mode" "SI")
1721 (set_attr "length" "2,4,1,2")])
1723 (define_insn "movsi_usw"
1724 [(set (match_operand:SI 0 "memory_operand" "=R,o")
1725 (unspec [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")] 0))]
1729 extern rtx eliminate_constant_term ();
1730 rtx offset = const0_rtx;
1731 rtx addr = XEXP (operands[0], 0);
1732 rtx mem_addr = eliminate_constant_term (addr, &offset);
1735 mips_count_memory_refs (operands[0], 2);
1737 /* The stack/frame pointers are always aligned, so we can convert
1738 to the faster sw if we are referencing an aligned stack location. */
1740 if ((INTVAL (offset) & (UNITS_PER_WORD-1)) == 0
1741 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
1742 return \"sw\\t%1,%0\";
1747 enum rtx_code code = GET_CODE (XEXP (operands[0], 0));
1749 if (code == CONST || code == SYMBOL_REF || code == LABEL_REF)
1751 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 1);
1752 return \"%[la\\t%2,%0\;usw\\t%z1,0(%2)%]\";
1756 return \"usw\\t%z1,%0\";
1758 [(set_attr "type" "store")
1759 (set_attr "mode" "SI")
1760 (set_attr "length" "2,4")])
1762 ;; 64-bit integer moves
1764 ;; Unlike most other insns, the move insns can't be split with
1765 ;; different predicates, because register spilling and other parts of
1766 ;; the compiler, have memoized the insn number already.
1768 (define_insn "movdi"
1769 [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,R,o,*d,*x")
1770 (match_operand:DI 1 "general_operand" "d,iF,R,o,d,d,*x,*d"))]
1772 "* return mips_move_2words (operands, insn); "
1773 [(set_attr "type" "move,arith,load,load,store,store,hilo,hilo")
1774 (set_attr "mode" "DI")
1775 (set_attr "length" "2,4,2,4,2,4,2,2")])
1778 [(set (match_operand:DI 0 "register_operand" "")
1779 (match_operand:DI 1 "register_operand" ""))]
1780 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1781 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1782 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))"
1784 [(set (subreg:SI (match_dup 0) 0) (subreg:SI (match_dup 1) 0))
1785 (set (subreg:SI (match_dup 0) 1) (subreg:SI (match_dup 1) 1))]
1789 ;; 32-bit Integer moves
1792 [(set (match_operand:SI 0 "register_operand" "")
1793 (match_operand:SI 1 "large_int" ""))]
1794 "!TARGET_DEBUG_D_MODE"
1798 (ior:SI (match_dup 0)
1802 operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) & 0xffff0000);
1803 operands[3] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) & 0x0000ffff);
1806 ;; Unlike most other insns, the move insns can't be split with
1807 ;; different predicates, because register spilling and other parts of
1808 ;; the compiler, have memoized the insn number already.
1810 (define_expand "movsi"
1811 [(set (match_operand:SI 0 "nonimmediate_operand" "")
1812 (match_operand:SI 1 "general_operand" ""))]
1816 ;; The difference between these two is whether or not ints are allowed
1817 ;; in FP registers (off by default, use -mdebugh to enable).
1819 (define_insn "movsi_internal1"
1820 [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*f*z,*f,*f,*f,*R,*m,*x,*d")
1821 (match_operand:SI 1 "general_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*f*z,*d,*f,*R,*m,*f,*f,*d,*x"))]
1822 "TARGET_DEBUG_H_MODE"
1823 "* return mips_move_1word (operands, insn, TRUE);"
1824 [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,move,load,load,store,store,hilo,hilo")
1825 (set_attr "mode" "SI")
1826 (set_attr "length" "1,2,1,2,1,2,1,2,1,1,1,1,2,1,2,1,1")])
1828 (define_insn "movsi_internal2"
1829 [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*z,*d,*x")
1830 (match_operand:SI 1 "general_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*z,*d,*x,*d"))]
1831 "!TARGET_DEBUG_H_MODE"
1832 "* return mips_move_1word (operands, insn, TRUE);"
1833 [(set_attr "type" "move,load,arith,arith,load,load,store,store,xfer,xfer,hilo,hilo")
1834 (set_attr "mode" "SI")
1835 (set_attr "length" "1,2,1,2,1,2,1,2,1,1,1,1")])
1838 ;; 16-bit Integer moves
1840 ;; Unlike most other insns, the move insns can't be split with
1841 ;; different predicates, because register spilling and other parts of
1842 ;; the compiler, have memoized the insn number already.
1843 ;; Unsigned loads are used because BYTE_LOADS_ZERO_EXTEND is defined
1845 (define_expand "movhi"
1846 [(set (match_operand:HI 0 "nonimmediate_operand" "")
1847 (match_operand:HI 1 "general_operand" ""))]
1851 ;; The difference between these two is whether or not ints are allowed
1852 ;; in FP registers (off by default, use -mdebugh to enable).
1854 (define_insn "movhi_internal1"
1855 [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f,*f*z,*x,*d")
1856 (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))]
1857 "TARGET_DEBUG_H_MODE"
1858 "* return mips_move_1word (operands, insn, TRUE);"
1859 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,hilo,hilo")
1860 (set_attr "mode" "HI")
1861 (set_attr "length" "1,1,1,2,1,2,1,1,1,1,1")])
1863 (define_insn "movhi_internal2"
1864 [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*z,*x,*d")
1865 (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*z,*d,*d,*x"))]
1866 "!TARGET_DEBUG_H_MODE"
1867 "* return mips_move_1word (operands, insn, TRUE);"
1868 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,hilo,hilo")
1869 (set_attr "mode" "HI")
1870 (set_attr "length" "1,1,1,2,1,2,1,1,1,1")])
1873 ;; 8-bit Integer moves
1875 ;; Unlike most other insns, the move insns can't be split with
1876 ;; different predicates, because register spilling and other parts of
1877 ;; the compiler, have memoized the insn number already.
1878 ;; Unsigned loads are used because BYTE_LOADS_ZERO_EXTEND is defined
1880 (define_expand "movqi"
1881 [(set (match_operand:QI 0 "nonimmediate_operand" "")
1882 (match_operand:QI 1 "general_operand" ""))]
1886 ;; The difference between these two is whether or not ints are allowed
1887 ;; in FP registers (off by default, use -mdebugh to enable).
1889 (define_insn "movqi_internal1"
1890 [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f*z,*f,*x,*d")
1891 (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*f*z,*d,*f,*d,*x"))]
1892 "TARGET_DEBUG_H_MODE"
1893 "* return mips_move_1word (operands, insn, TRUE);"
1894 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,hilo,hilo")
1895 (set_attr "mode" "QI")
1896 (set_attr "length" "1,1,1,2,1,2,1,1,1,1,1")])
1898 (define_insn "movqi_internal2"
1899 [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*z,*x,*d")
1900 (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*z,*d,*d,*x"))]
1901 "!TARGET_DEBUG_H_MODE"
1902 "* return mips_move_1word (operands, insn, TRUE);"
1903 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,hilo,hilo")
1904 (set_attr "mode" "QI")
1905 (set_attr "length" "1,1,1,2,1,2,1,1,1,1")])
1908 ;; 32-bit floating point moves
1910 (define_insn "movsf"
1911 [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,f,f,R,m,*f,*d,*d,*d,*d,*R,*m")
1912 (match_operand:SF 1 "general_operand" "f,G,R,Em,fG,fG,*d,*f,*G*d,*R,*E*m,*d,*d"))]
1914 "* return mips_move_1word (operands, insn, FALSE);"
1915 [(set_attr "type" "move,xfer,load,load,store,store,xfer,xfer,move,load,load,store,store")
1916 (set_attr "mode" "SF")
1917 (set_attr "length" "1,1,1,2,1,2,1,1,1,1,2,1,2")])
1919 ;; 64-bit floating point moves
1921 (define_insn "movdf"
1922 [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,R,o,f,*f,*d,*d,*d,*d,*R,*o")
1923 (match_operand:DF 1 "general_operand" "f,R,o,fG,fG,E,*d,*f,*d*G,*R,*o*E,*d,*d"))]
1925 "* return mips_move_2words (operands, insn); "
1926 [(set_attr "type" "move,load,load,store,store,load,xfer,xfer,move,load,load,store,store")
1927 (set_attr "mode" "DF")
1928 (set_attr "length" "1,2,4,2,4,4,2,2,2,2,4,2,4")])
1931 [(set (match_operand:DF 0 "register_operand" "")
1932 (match_operand:DF 1 "register_operand" ""))]
1933 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1934 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1935 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))"
1937 [(set (subreg:SI (match_dup 0) 0) (subreg:SI (match_dup 1) 0))
1938 (set (subreg:SI (match_dup 0) 1) (subreg:SI (match_dup 1) 1))]
1942 ;; Block moves, see mips.c for more details.
1943 ;; Argument 0 is the destination
1944 ;; Argument 1 is the source
1945 ;; Argument 2 is the length
1946 ;; Argument 3 is the alignment
1948 (define_expand "movstrsi"
1949 [(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" ""))
1950 (mem:BLK (match_operand:BLK 1 "general_operand" "")))
1951 (use (match_operand:SI 2 "arith32_operand" ""))
1952 (use (match_operand:SI 3 "immediate_operand" ""))])]
1956 if (operands[0]) /* avoid unused code messages */
1958 expand_block_move (operands);
1963 ;; Insn generated by block moves
1965 (define_insn "movstrsi_internal"
1966 [(set (match_operand:BLK 0 "memory_operand" "=Ro") ;; destination
1967 (match_operand:BLK 1 "memory_operand" "Ro")) ;; source
1968 (clobber (match_scratch:SI 4 "=&d")) ;; temp 1
1969 (clobber (match_scratch:SI 5 "=&d")) ;; temp 2
1970 (clobber (match_scratch:SI 6 "=&d")) ;; temp 3
1971 (clobber (match_scratch:SI 7 "=&d")) ;; temp 4
1972 (use (match_operand:SI 2 "small_int" "I")) ;; # bytes to move
1973 (use (match_operand:SI 3 "small_int" "I")) ;; alignment
1974 (use (const_int 0))] ;; normal block move
1976 "* return output_block_move (insn, operands, 4, BLOCK_MOVE_NORMAL);"
1977 [(set_attr "type" "multi")
1978 (set_attr "mode" "none")
1979 (set_attr "length" "20")])
1981 ;; Split a block move into 2 parts, the first part is everything
1982 ;; except for the last move, and the second part is just the last
1983 ;; store, which is exactly 1 instruction (ie, not a usw), so it can
1984 ;; fill a delay slot. This also prevents a bug in delayed branches
1985 ;; from showing up, which reuses one of the registers in our clobbers.
1988 [(set (mem:BLK (match_operand:SI 0 "register_operand" ""))
1989 (mem:BLK (match_operand:SI 1 "register_operand" "")))
1990 (clobber (match_operand:SI 4 "register_operand" ""))
1991 (clobber (match_operand:SI 5 "register_operand" ""))
1992 (clobber (match_operand:SI 6 "register_operand" ""))
1993 (clobber (match_operand:SI 7 "register_operand" ""))
1994 (use (match_operand:SI 2 "small_int" ""))
1995 (use (match_operand:SI 3 "small_int" ""))
1996 (use (const_int 0))]
1998 "reload_completed && !TARGET_DEBUG_D_MODE && INTVAL (operands[2]) > 0"
2000 ;; All but the last move
2001 [(parallel [(set (mem:BLK (match_dup 0))
2002 (mem:BLK (match_dup 1)))
2003 (clobber (match_dup 4))
2004 (clobber (match_dup 5))
2005 (clobber (match_dup 6))
2006 (clobber (match_dup 7))
2009 (use (const_int 1))])
2011 ;; The last store, so it can fill a delay slot
2012 (parallel [(set (mem:BLK (match_dup 0))
2013 (mem:BLK (match_dup 1)))
2014 (clobber (match_dup 4))
2015 (clobber (match_dup 5))
2016 (clobber (match_dup 6))
2017 (clobber (match_dup 7))
2020 (use (const_int 2))])]
2024 (define_insn "movstrsi_internal2"
2025 [(set (match_operand:BLK 0 "memory_operand" "=Ro") ;; destination
2026 (match_operand:BLK 1 "memory_operand" "Ro")) ;; source
2027 (clobber (match_scratch:SI 4 "=&d")) ;; temp 1
2028 (clobber (match_scratch:SI 5 "=&d")) ;; temp 2
2029 (clobber (match_scratch:SI 6 "=&d")) ;; temp 3
2030 (clobber (match_scratch:SI 7 "=&d")) ;; temp 4
2031 (use (match_operand:SI 2 "small_int" "I")) ;; # bytes to move
2032 (use (match_operand:SI 3 "small_int" "I")) ;; alignment
2033 (use (const_int 1))] ;; all but last store
2035 "* return output_block_move (insn, operands, 4, BLOCK_MOVE_NOT_LAST);"
2036 [(set_attr "type" "multi")
2037 (set_attr "mode" "none")
2038 (set_attr "length" "20")])
2040 (define_insn "movstrsi_internal3"
2041 [(set (match_operand:BLK 0 "memory_operand" "=Ro") ;; destination
2042 (match_operand:BLK 1 "memory_operand" "Ro")) ;; source
2043 (clobber (match_scratch:SI 4 "=&d")) ;; temp 1
2044 (clobber (match_scratch:SI 5 "=&d")) ;; temp 2
2045 (clobber (match_scratch:SI 6 "=&d")) ;; temp 3
2046 (clobber (match_scratch:SI 7 "=&d")) ;; temp 4
2047 (use (match_operand:SI 2 "small_int" "I")) ;; # bytes to move
2048 (use (match_operand:SI 3 "small_int" "I")) ;; alignment
2049 (use (const_int 2))] ;; just last store of block mvoe
2051 "* return output_block_move (insn, operands, 4, BLOCK_MOVE_LAST);"
2052 [(set_attr "type" "store")
2053 (set_attr "mode" "none")
2054 (set_attr "length" "1")])
2058 ;; ....................
2062 ;; ....................
2064 (define_insn "ashlsi3"
2065 [(set (match_operand:SI 0 "register_operand" "=d")
2066 (ashift:SI (match_operand:SI 1 "register_operand" "d")
2067 (match_operand:SI 2 "arith_operand" "dI")))]
2071 if (GET_CODE (operands[2]) == CONST_INT)
2072 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2074 return \"sll\\t%0,%1,%2\";
2076 [(set_attr "type" "arith")
2077 (set_attr "mode" "SI")
2078 (set_attr "length" "1")])
2081 (define_expand "ashldi3"
2082 [(parallel [(set (match_operand:DI 0 "register_operand" "")
2083 (ashift:DI (match_operand:DI 1 "register_operand" "")
2084 (match_operand:SI 2 "arith_operand" "")))
2085 (clobber (match_dup 3))])]
2086 "!TARGET_DEBUG_G_MODE"
2087 "operands[3] = gen_reg_rtx (SImode);")
2090 (define_insn "ashldi3_internal"
2091 [(set (match_operand:DI 0 "register_operand" "=&d")
2092 (ashift:DI (match_operand:DI 1 "register_operand" "d")
2093 (match_operand:SI 2 "register_operand" "d")))
2094 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2095 "!TARGET_DEBUG_G_MODE"
2098 operands[4] = const0_rtx;
2099 dslots_jump_total += 3;
2100 dslots_jump_filled += 2;
2102 return \"sll\\t%3,%2,26\\n\\
2103 \\tbgez\\t%3,1f\\n\\
2104 \\tsll\\t%M0,%L1,%2\\n\\
2106 \\tmove\\t%L0,%z4%)\\n\\
2109 \\t%(beq\\t%3,%z4,2f\\n\\
2110 \\tsll\\t%M0,%M1,%2%)\\n\\
2112 \\tsubu\\t%3,%z4,%2\\n\\
2113 \\tsrl\\t%3,%L1,%3\\n\\
2114 \\tor\\t%M0,%M0,%3\\n\\
2116 \\tsll\\t%L0,%L1,%2\\n\\
2119 [(set_attr "type" "darith")
2120 (set_attr "mode" "SI")
2121 (set_attr "length" "12")])
2124 (define_insn "ashldi3_internal2"
2125 [(set (match_operand:DI 0 "register_operand" "=d")
2126 (ashift:DI (match_operand:DI 1 "register_operand" "d")
2127 (match_operand:SI 2 "small_int" "IJK")))
2128 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2129 "!TARGET_DEBUG_G_MODE && (INTVAL (operands[2]) & 32) != 0"
2132 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2133 operands[4] = const0_rtx;
2134 return \"sll\\t%M0,%L1,%2\;move\\t%L0,%z4\";
2136 [(set_attr "type" "darith")
2137 (set_attr "mode" "DI")
2138 (set_attr "length" "2")])
2142 [(set (match_operand:DI 0 "register_operand" "")
2143 (ashift:DI (match_operand:DI 1 "register_operand" "")
2144 (match_operand:SI 2 "small_int" "")))
2145 (clobber (match_operand:SI 3 "register_operand" ""))]
2146 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2147 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2148 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2149 && (INTVAL (operands[2]) & 32) != 0"
2151 [(set (subreg:SI (match_dup 0) 1) (ashift:SI (subreg:SI (match_dup 1) 0) (match_dup 2)))
2152 (set (subreg:SI (match_dup 0) 0) (const_int 0))]
2154 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2158 [(set (match_operand:DI 0 "register_operand" "")
2159 (ashift:DI (match_operand:DI 1 "register_operand" "")
2160 (match_operand:SI 2 "small_int" "")))
2161 (clobber (match_operand:SI 3 "register_operand" ""))]
2162 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2163 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2164 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2165 && (INTVAL (operands[2]) & 32) != 0"
2167 [(set (subreg:SI (match_dup 0) 0) (ashift:SI (subreg:SI (match_dup 1) 1) (match_dup 2)))
2168 (set (subreg:SI (match_dup 0) 1) (const_int 0))]
2170 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2173 (define_insn "ashldi3_internal3"
2174 [(set (match_operand:DI 0 "register_operand" "=d")
2175 (ashift:DI (match_operand:DI 1 "register_operand" "d")
2176 (match_operand:SI 2 "small_int" "IJK")))
2177 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2178 "!TARGET_DEBUG_G_MODE
2179 && (INTVAL (operands[2]) & 63) < 32
2180 && (INTVAL (operands[2]) & 63) != 0"
2183 int amount = INTVAL (operands[2]);
2185 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2186 operands[4] = const0_rtx;
2187 operands[5] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2189 return \"sll\\t%M0,%M1,%2\;srl\\t%3,%L1,%5\;or\\t%M0,%M0,%3\;sll\\t%L0,%L1,%2\";
2191 [(set_attr "type" "darith")
2192 (set_attr "mode" "DI")
2193 (set_attr "length" "4")])
2197 [(set (match_operand:DI 0 "register_operand" "")
2198 (ashift:DI (match_operand:DI 1 "register_operand" "")
2199 (match_operand:SI 2 "small_int" "")))
2200 (clobber (match_operand:SI 3 "register_operand" ""))]
2201 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2202 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2203 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2204 && (INTVAL (operands[2]) & 63) < 32
2205 && (INTVAL (operands[2]) & 63) != 0"
2207 [(set (subreg:SI (match_dup 0) 1)
2208 (ashift:SI (subreg:SI (match_dup 1) 1)
2212 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2215 (set (subreg:SI (match_dup 0) 1)
2216 (ior:SI (subreg:SI (match_dup 0) 1)
2219 (set (subreg:SI (match_dup 0) 0)
2220 (ashift:SI (subreg:SI (match_dup 1) 0)
2224 int amount = INTVAL (operands[2]);
2225 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2226 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2231 [(set (match_operand:DI 0 "register_operand" "")
2232 (ashift:DI (match_operand:DI 1 "register_operand" "")
2233 (match_operand:SI 2 "small_int" "")))
2234 (clobber (match_operand:SI 3 "register_operand" ""))]
2235 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2236 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2237 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2238 && (INTVAL (operands[2]) & 63) < 32
2239 && (INTVAL (operands[2]) & 63) != 0"
2241 [(set (subreg:SI (match_dup 0) 0)
2242 (ashift:SI (subreg:SI (match_dup 1) 0)
2246 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2249 (set (subreg:SI (match_dup 0) 0)
2250 (ior:SI (subreg:SI (match_dup 0) 0)
2253 (set (subreg:SI (match_dup 0) 1)
2254 (ashift:SI (subreg:SI (match_dup 1) 1)
2258 int amount = INTVAL (operands[2]);
2259 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2260 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2264 (define_insn "ashrsi3"
2265 [(set (match_operand:SI 0 "register_operand" "=d")
2266 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
2267 (match_operand:SI 2 "arith_operand" "dI")))]
2271 if (GET_CODE (operands[2]) == CONST_INT)
2272 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2274 return \"sra\\t%0,%1,%2\";
2276 [(set_attr "type" "arith")
2277 (set_attr "mode" "SI")
2278 (set_attr "length" "1")])
2281 (define_expand "ashrdi3"
2282 [(parallel [(set (match_operand:DI 0 "register_operand" "")
2283 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2284 (match_operand:SI 2 "arith_operand" "")))
2285 (clobber (match_dup 3))])]
2286 "!TARGET_DEBUG_G_MODE"
2287 "operands[3] = gen_reg_rtx (SImode);")
2290 (define_insn "ashrdi3_internal"
2291 [(set (match_operand:DI 0 "register_operand" "=&d")
2292 (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
2293 (match_operand:SI 2 "register_operand" "d")))
2294 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2295 "!TARGET_DEBUG_G_MODE"
2298 operands[4] = const0_rtx;
2299 dslots_jump_total += 3;
2300 dslots_jump_filled += 2;
2302 return \"sll\\t%3,%2,26\\n\\
2303 \\tbgez\\t%3,1f\\n\\
2304 \\tsra\\t%L0,%M1,%2\\n\\
2306 \\tsra\\t%M0,%M1,31%)\\n\\
2309 \\t%(beq\\t%3,%z4,2f\\n\\
2310 \\tsrl\\t%L0,%L1,%2%)\\n\\
2312 \\tsubu\\t%3,%z4,%2\\n\\
2313 \\tsll\\t%3,%M1,%3\\n\\
2314 \\tor\\t%L0,%L0,%3\\n\\
2316 \\tsra\\t%M0,%M1,%2\\n\\
2319 [(set_attr "type" "darith")
2320 (set_attr "mode" "DI")
2321 (set_attr "length" "12")])
2324 (define_insn "ashrdi3_internal2"
2325 [(set (match_operand:DI 0 "register_operand" "=d")
2326 (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
2327 (match_operand:SI 2 "small_int" "IJK")))
2328 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2329 "!TARGET_DEBUG_G_MODE && (INTVAL (operands[2]) & 32) != 0"
2332 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2333 return \"sra\\t%L0,%M1,%2\;sra\\t%M0,%M1,31\";
2335 [(set_attr "type" "darith")
2336 (set_attr "mode" "DI")
2337 (set_attr "length" "2")])
2341 [(set (match_operand:DI 0 "register_operand" "")
2342 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2343 (match_operand:SI 2 "small_int" "")))
2344 (clobber (match_operand:SI 3 "register_operand" ""))]
2345 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2346 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2347 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2348 && (INTVAL (operands[2]) & 32) != 0"
2350 [(set (subreg:SI (match_dup 0) 0) (ashiftrt:SI (subreg:SI (match_dup 1) 1) (match_dup 2)))
2351 (set (subreg:SI (match_dup 0) 1) (ashiftrt:SI (subreg:SI (match_dup 1) 1) (const_int 31)))]
2353 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2357 [(set (match_operand:DI 0 "register_operand" "")
2358 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2359 (match_operand:SI 2 "small_int" "")))
2360 (clobber (match_operand:SI 3 "register_operand" ""))]
2361 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2362 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2363 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2364 && (INTVAL (operands[2]) & 32) != 0"
2366 [(set (subreg:SI (match_dup 0) 1) (ashiftrt:SI (subreg:SI (match_dup 1) 0) (match_dup 2)))
2367 (set (subreg:SI (match_dup 0) 0) (ashiftrt:SI (subreg:SI (match_dup 1) 0) (const_int 31)))]
2369 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2372 (define_insn "ashrdi3_internal3"
2373 [(set (match_operand:DI 0 "register_operand" "=d")
2374 (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
2375 (match_operand:SI 2 "small_int" "IJK")))
2376 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2377 "!TARGET_DEBUG_G_MODE
2378 && (INTVAL (operands[2]) & 63) < 32
2379 && (INTVAL (operands[2]) & 63) != 0"
2382 int amount = INTVAL (operands[2]);
2384 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2385 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2387 return \"srl\\t%L0,%L1,%2\;sll\\t%3,%M1,%4\;or\\t%L0,%L0,%3\;sra\\t%M0,%M1,%2\";
2389 [(set_attr "type" "darith")
2390 (set_attr "mode" "DI")
2391 (set_attr "length" "4")])
2395 [(set (match_operand:DI 0 "register_operand" "")
2396 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2397 (match_operand:SI 2 "small_int" "")))
2398 (clobber (match_operand:SI 3 "register_operand" ""))]
2399 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2400 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2401 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2402 && (INTVAL (operands[2]) & 63) < 32
2403 && (INTVAL (operands[2]) & 63) != 0"
2405 [(set (subreg:SI (match_dup 0) 0)
2406 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2410 (ashift:SI (subreg:SI (match_dup 1) 1)
2413 (set (subreg:SI (match_dup 0) 0)
2414 (ior:SI (subreg:SI (match_dup 0) 0)
2417 (set (subreg:SI (match_dup 0) 1)
2418 (ashiftrt:SI (subreg:SI (match_dup 1) 1)
2422 int amount = INTVAL (operands[2]);
2423 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2424 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2429 [(set (match_operand:DI 0 "register_operand" "")
2430 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2431 (match_operand:SI 2 "small_int" "")))
2432 (clobber (match_operand:SI 3 "register_operand" ""))]
2433 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2434 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2435 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2436 && (INTVAL (operands[2]) & 63) < 32
2437 && (INTVAL (operands[2]) & 63) != 0"
2439 [(set (subreg:SI (match_dup 0) 1)
2440 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2444 (ashift:SI (subreg:SI (match_dup 1) 0)
2447 (set (subreg:SI (match_dup 0) 1)
2448 (ior:SI (subreg:SI (match_dup 0) 1)
2451 (set (subreg:SI (match_dup 0) 0)
2452 (ashiftrt:SI (subreg:SI (match_dup 1) 0)
2456 int amount = INTVAL (operands[2]);
2457 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2458 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2462 (define_insn "lshrsi3"
2463 [(set (match_operand:SI 0 "register_operand" "=d")
2464 (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")
2465 (match_operand:SI 2 "arith_operand" "dI")))]
2469 if (GET_CODE (operands[2]) == CONST_INT)
2470 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2472 return \"srl\\t%0,%1,%2\";
2474 [(set_attr "type" "arith")
2475 (set_attr "mode" "SI")
2476 (set_attr "length" "1")])
2479 (define_expand "lshrdi3"
2480 [(parallel [(set (match_operand:DI 0 "register_operand" "")
2481 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2482 (match_operand:SI 2 "arith_operand" "")))
2483 (clobber (match_dup 3))])]
2484 "!TARGET_DEBUG_G_MODE"
2485 "operands[3] = gen_reg_rtx (SImode);")
2488 (define_insn "lshrdi3_internal"
2489 [(set (match_operand:DI 0 "register_operand" "=&d")
2490 (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
2491 (match_operand:SI 2 "register_operand" "d")))
2492 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2493 "!TARGET_DEBUG_G_MODE"
2496 operands[4] = const0_rtx;
2497 dslots_jump_total += 3;
2498 dslots_jump_filled += 2;
2500 return \"sll\\t%3,%2,26\\n\\
2501 \\tbgez\\t%3,1f\\n\\
2502 \\tsrl\\t%L0,%M1,%2\\n\\
2504 \\tmove\\t%M0,%z4%)\\n\\
2507 \\t%(beq\\t%3,%z4,2f\\n\\
2508 \\tsrl\\t%L0,%L1,%2%)\\n\\
2510 \\tsubu\\t%3,%z4,%2\\n\\
2511 \\tsll\\t%3,%M1,%3\\n\\
2512 \\tor\\t%L0,%L0,%3\\n\\
2514 \\tsrl\\t%M0,%M1,%2\\n\\
2517 [(set_attr "type" "darith")
2518 (set_attr "mode" "DI")
2519 (set_attr "length" "12")])
2522 (define_insn "lshrdi3_internal2"
2523 [(set (match_operand:DI 0 "register_operand" "=d")
2524 (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
2525 (match_operand:SI 2 "small_int" "IJK")))
2526 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2527 "!TARGET_DEBUG_G_MODE && (INTVAL (operands[2]) & 32) != 0"
2530 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2531 operands[4] = const0_rtx;
2532 return \"srl\\t%L0,%M1,%2\;move\\t%M0,%z4\";
2534 [(set_attr "type" "darith")
2535 (set_attr "mode" "DI")
2536 (set_attr "length" "2")])
2540 [(set (match_operand:DI 0 "register_operand" "")
2541 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2542 (match_operand:SI 2 "small_int" "")))
2543 (clobber (match_operand:SI 3 "register_operand" ""))]
2544 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2545 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2546 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2547 && (INTVAL (operands[2]) & 32) != 0"
2549 [(set (subreg:SI (match_dup 0) 0) (lshiftrt:SI (subreg:SI (match_dup 1) 1) (match_dup 2)))
2550 (set (subreg:SI (match_dup 0) 1) (const_int 0))]
2552 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2556 [(set (match_operand:DI 0 "register_operand" "")
2557 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2558 (match_operand:SI 2 "small_int" "")))
2559 (clobber (match_operand:SI 3 "register_operand" ""))]
2560 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2561 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2562 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2563 && (INTVAL (operands[2]) & 32) != 0"
2565 [(set (subreg:SI (match_dup 0) 1) (lshiftrt:SI (subreg:SI (match_dup 1) 0) (match_dup 2)))
2566 (set (subreg:SI (match_dup 0) 0) (const_int 0))]
2568 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2571 (define_insn "lshrdi3_internal3"
2572 [(set (match_operand:DI 0 "register_operand" "=d")
2573 (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
2574 (match_operand:SI 2 "small_int" "IJK")))
2575 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2576 "!TARGET_DEBUG_G_MODE
2577 && (INTVAL (operands[2]) & 63) < 32
2578 && (INTVAL (operands[2]) & 63) != 0"
2581 int amount = INTVAL (operands[2]);
2583 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2584 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2586 return \"srl\\t%L0,%L1,%2\;sll\\t%3,%M1,%4\;or\\t%L0,%L0,%3\;srl\\t%M0,%M1,%2\";
2588 [(set_attr "type" "darith")
2589 (set_attr "mode" "DI")
2590 (set_attr "length" "4")])
2594 [(set (match_operand:DI 0 "register_operand" "")
2595 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2596 (match_operand:SI 2 "small_int" "")))
2597 (clobber (match_operand:SI 3 "register_operand" ""))]
2598 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2599 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2600 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2601 && (INTVAL (operands[2]) & 63) < 32
2602 && (INTVAL (operands[2]) & 63) != 0"
2604 [(set (subreg:SI (match_dup 0) 0)
2605 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2609 (ashift:SI (subreg:SI (match_dup 1) 1)
2612 (set (subreg:SI (match_dup 0) 0)
2613 (ior:SI (subreg:SI (match_dup 0) 0)
2616 (set (subreg:SI (match_dup 0) 1)
2617 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2621 int amount = INTVAL (operands[2]);
2622 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2623 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2628 [(set (match_operand:DI 0 "register_operand" "")
2629 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2630 (match_operand:SI 2 "small_int" "")))
2631 (clobber (match_operand:SI 3 "register_operand" ""))]
2632 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2633 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2634 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2635 && (INTVAL (operands[2]) & 63) < 32
2636 && (INTVAL (operands[2]) & 63) != 0"
2638 [(set (subreg:SI (match_dup 0) 1)
2639 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2643 (ashift:SI (subreg:SI (match_dup 1) 0)
2646 (set (subreg:SI (match_dup 0) 1)
2647 (ior:SI (subreg:SI (match_dup 0) 1)
2650 (set (subreg:SI (match_dup 0) 0)
2651 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2655 int amount = INTVAL (operands[2]);
2656 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2657 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2662 ;; ....................
2666 ;; ....................
2668 ;; Flow here is rather complex:
2670 ;; 1) The cmp{si,sf,df} routine is called. It deposits the
2671 ;; arguments into the branch_cmp array, and the type into
2672 ;; branch_type. No RTL is generated.
2674 ;; 2) The appropriate branch define_expand is called, which then
2675 ;; creates the appropriate RTL for the comparison and branch.
2676 ;; Different CC modes are used, based on what type of branch is
2677 ;; done, so that we can constrain things appropriately. There
2678 ;; are assumptions in the rest of GCC that break if we fold the
2679 ;; operands into the branchs for integer operations, and use cc0
2680 ;; for floating point, so we use the fp status register instead.
2681 ;; If needed, an appropriate temporary is created to hold the
2682 ;; of the integer compare.
2684 (define_expand "cmpsi"
2686 (compare:CC (match_operand:SI 0 "register_operand" "")
2687 (match_operand:SI 1 "arith_operand" "")))]
2691 if (operands[0]) /* avoid unused code message */
2693 branch_cmp[0] = operands[0];
2694 branch_cmp[1] = operands[1];
2695 branch_type = CMP_SI;
2700 (define_expand "tstsi"
2702 (match_operand:SI 0 "register_operand" ""))]
2706 if (operands[0]) /* avoid unused code message */
2708 branch_cmp[0] = operands[0];
2709 branch_cmp[1] = const0_rtx;
2710 branch_type = CMP_SI;
2715 (define_expand "cmpdf"
2717 (compare:CC_FP (match_operand:DF 0 "register_operand" "")
2718 (match_operand:DF 1 "register_operand" "")))]
2722 if (operands[0]) /* avoid unused code message */
2724 branch_cmp[0] = operands[0];
2725 branch_cmp[1] = operands[1];
2726 branch_type = CMP_DF;
2731 (define_expand "cmpsf"
2733 (compare:CC_FP (match_operand:SF 0 "register_operand" "")
2734 (match_operand:SF 1 "register_operand" "")))]
2738 if (operands[0]) /* avoid unused code message */
2740 branch_cmp[0] = operands[0];
2741 branch_cmp[1] = operands[1];
2742 branch_type = CMP_SF;
2749 ;; ....................
2751 ;; CONDITIONAL BRANCHES
2753 ;; ....................
2755 (define_insn "branch_fp_ne"
2757 (if_then_else (ne:CC_FP (reg:CC_FP 66)
2759 (match_operand 0 "pc_or_label_operand" "")
2760 (match_operand 1 "pc_or_label_operand" "")))]
2764 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2765 return (operands[0] != pc_rtx) ? \"%*bc1t%?\\t%0\" : \"%*bc1f%?\\t%1\";
2767 [(set_attr "type" "branch")
2768 (set_attr "mode" "none")
2769 (set_attr "length" "1")])
2771 (define_insn "branch_fp_ne_rev"
2773 (if_then_else (ne:CC_REV_FP (reg:CC_REV_FP 66)
2775 (match_operand 0 "pc_or_label_operand" "")
2776 (match_operand 1 "pc_or_label_operand" "")))]
2780 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2781 return (operands[0] != pc_rtx) ? \"%*bc1f%?\\t%0\" : \"%*bc1t%?\\t%1\";
2783 [(set_attr "type" "branch")
2784 (set_attr "mode" "none")
2785 (set_attr "length" "1")])
2787 (define_insn "branch_fp_eq"
2789 (if_then_else (eq:CC_FP (reg:CC_FP 66)
2791 (match_operand 0 "pc_or_label_operand" "")
2792 (match_operand 1 "pc_or_label_operand" "")))]
2796 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2797 return (operands[0] != pc_rtx) ? \"%*bc1f%?\\t%0\" : \"%*bc1t%?\\t%1\";
2799 [(set_attr "type" "branch")
2800 (set_attr "mode" "none")
2801 (set_attr "length" "1")])
2803 (define_insn "branch_fp_eq_rev"
2805 (if_then_else (eq:CC_REV_FP (reg:CC_REV_FP 66)
2807 (match_operand 0 "pc_or_label_operand" "")
2808 (match_operand 1 "pc_or_label_operand" "")))]
2812 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2813 return (operands[0] != pc_rtx) ? \"%*bc1t%?\\t%0\" : \"%*bc1f%?\\t%1\";
2815 [(set_attr "type" "branch")
2816 (set_attr "mode" "none")
2817 (set_attr "length" "1")])
2820 (define_insn "branch_zero"
2822 (if_then_else (match_operator:SI 0 "cmp_op"
2823 [(match_operand:SI 1 "register_operand" "d")
2825 (match_operand 2 "pc_or_label_operand" "")
2826 (match_operand 3 "pc_or_label_operand" "")))]
2830 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2831 if (operands[2] != pc_rtx)
2833 switch (GET_CODE (operands[0]))
2835 case EQ: return \"%*beq%?\\t%z1,%.,%2\";
2836 case NE: return \"%*bne%?\\t%z1,%.,%2\";
2837 case GTU: return \"%*bne%?\\t%z1,%.,%2\";
2838 case LEU: return \"%*beq%?\\t%z1,%.,%2\";
2839 case GEU: return \"%*j\\t%2\";
2840 case LTU: return \"%*bne%?\\t%.,%.,%2\";
2843 return \"%*b%C0z%?\\t%z1,%2\";
2846 { /* inverted jump */
2847 switch (GET_CODE (operands[0]))
2849 case EQ: return \"%*bne%?\\t%z1,%.,%3\";
2850 case NE: return \"%*beq%?\\t%z1,%.,%3\";
2851 case GTU: return \"%*beq%?\\t%z1,%.,%3\";
2852 case LEU: return \"%*bne%?\\t%z1,%.,%3\";
2853 case GEU: return \"%*beq%?\\t%.,%.,%3\";
2854 case LTU: return \"%*j\\t%3\";
2857 return \"%*b%N0z%?\\t%z1,%3\";
2860 [(set_attr "type" "branch")
2861 (set_attr "mode" "none")
2862 (set_attr "length" "1")])
2865 (define_insn "branch_equality"
2867 (if_then_else (match_operator:SI 0 "equality_op"
2868 [(match_operand:SI 1 "register_operand" "d")
2869 (match_operand:SI 2 "register_operand" "d")])
2870 (match_operand 3 "pc_or_label_operand" "")
2871 (match_operand 4 "pc_or_label_operand" "")))]
2875 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2876 return (operands[3] != pc_rtx)
2877 ? \"%*b%C0%?\\t%z1,%z2,%3\"
2878 : \"%*b%N0%?\\t%z1,%z2,%4\";
2880 [(set_attr "type" "branch")
2881 (set_attr "mode" "none")
2882 (set_attr "length" "1")])
2885 (define_expand "beq"
2887 (if_then_else (eq:CC_EQ (cc0)
2889 (label_ref (match_operand 0 "" ""))
2894 if (operands[0]) /* avoid unused code warning */
2896 gen_conditional_branch (operands, EQ);
2901 (define_expand "bne"
2903 (if_then_else (ne:CC_EQ (cc0)
2905 (label_ref (match_operand 0 "" ""))
2910 if (operands[0]) /* avoid unused code warning */
2912 gen_conditional_branch (operands, NE);
2917 (define_expand "bgt"
2919 (if_then_else (gt:CC (cc0)
2921 (label_ref (match_operand 0 "" ""))
2926 if (operands[0]) /* avoid unused code warning */
2928 gen_conditional_branch (operands, GT);
2933 (define_expand "bge"
2935 (if_then_else (ge:CC (cc0)
2937 (label_ref (match_operand 0 "" ""))
2942 if (operands[0]) /* avoid unused code warning */
2944 gen_conditional_branch (operands, GE);
2949 (define_expand "blt"
2951 (if_then_else (lt:CC (cc0)
2953 (label_ref (match_operand 0 "" ""))
2958 if (operands[0]) /* avoid unused code warning */
2960 gen_conditional_branch (operands, LT);
2965 (define_expand "ble"
2967 (if_then_else (le:CC (cc0)
2969 (label_ref (match_operand 0 "" ""))
2974 if (operands[0]) /* avoid unused code warning */
2976 gen_conditional_branch (operands, LE);
2981 (define_expand "bgtu"
2983 (if_then_else (gtu:CC (cc0)
2985 (label_ref (match_operand 0 "" ""))
2990 if (operands[0]) /* avoid unused code warning */
2992 gen_conditional_branch (operands, GTU);
2997 (define_expand "bgeu"
2999 (if_then_else (geu:CC (cc0)
3001 (label_ref (match_operand 0 "" ""))
3006 if (operands[0]) /* avoid unused code warning */
3008 gen_conditional_branch (operands, GEU);
3014 (define_expand "bltu"
3016 (if_then_else (ltu:CC (cc0)
3018 (label_ref (match_operand 0 "" ""))
3023 if (operands[0]) /* avoid unused code warning */
3025 gen_conditional_branch (operands, LTU);
3030 (define_expand "bleu"
3032 (if_then_else (leu:CC (cc0)
3034 (label_ref (match_operand 0 "" ""))
3039 if (operands[0]) /* avoid unused code warning */
3041 gen_conditional_branch (operands, LEU);
3048 ;; ....................
3050 ;; SETTING A REGISTER FROM A COMPARISON
3052 ;; ....................
3054 (define_expand "seq"
3055 [(set (match_operand:SI 0 "register_operand" "=d")
3056 (eq:SI (match_dup 1)
3061 extern rtx force_reg ();
3063 if (branch_type != CMP_SI)
3066 /* set up operands from compare. */
3067 operands[1] = branch_cmp[0];
3068 operands[2] = branch_cmp[1];
3070 if (!TARGET_DEBUG_C_MODE)
3072 gen_int_relational (EQ, operands[0], operands[1], operands[2], (int *)0);
3076 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
3077 operands[2] = force_reg (SImode, operands[2]);
3079 /* fall through and generate default code */
3083 (define_insn "seq_si_zero"
3084 [(set (match_operand:SI 0 "register_operand" "=d")
3085 (eq:SI (match_operand:SI 1 "register_operand" "d")
3089 [(set_attr "type" "arith")
3090 (set_attr "mode" "SI")
3091 (set_attr "length" "1")])
3093 (define_insn "seq_si"
3094 [(set (match_operand:SI 0 "register_operand" "=d,d")
3095 (eq:SI (match_operand:SI 1 "register_operand" "%d,d")
3096 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
3097 "TARGET_DEBUG_C_MODE"
3099 xor\\t%0,%1,%2\;sltu\\t%0,%0,1
3100 xori\\t%0,%1,%2\;sltu\\t%0,%0,1"
3101 [(set_attr "type" "arith")
3102 (set_attr "mode" "SI")
3103 (set_attr "length" "2")])
3106 [(set (match_operand:SI 0 "register_operand" "")
3107 (eq:SI (match_operand:SI 1 "register_operand" "")
3108 (match_operand:SI 2 "uns_arith_operand" "")))]
3109 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
3110 && (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
3112 (xor:SI (match_dup 1)
3115 (ltu:SI (match_dup 0)
3119 (define_expand "sne"
3120 [(set (match_operand:SI 0 "register_operand" "=d")
3121 (ne:SI (match_dup 1)
3126 extern rtx force_reg ();
3128 if (branch_type != CMP_SI)
3131 /* set up operands from compare. */
3132 operands[1] = branch_cmp[0];
3133 operands[2] = branch_cmp[1];
3135 if (!TARGET_DEBUG_C_MODE)
3137 gen_int_relational (NE, operands[0], operands[1], operands[2], (int *)0);
3141 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
3142 operands[2] = force_reg (SImode, operands[2]);
3144 /* fall through and generate default code */
3147 (define_insn "sne_si_zero"
3148 [(set (match_operand:SI 0 "register_operand" "=d")
3149 (ne:SI (match_operand:SI 1 "register_operand" "d")
3153 [(set_attr "type" "arith")
3154 (set_attr "mode" "SI")
3155 (set_attr "length" "1")])
3157 (define_insn "sne_si"
3158 [(set (match_operand:SI 0 "register_operand" "=d,d")
3159 (ne:SI (match_operand:SI 1 "register_operand" "%d,d")
3160 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
3161 "TARGET_DEBUG_C_MODE"
3163 xor\\t%0,%1,%2\;sltu\\t%0,%.,%0
3164 xori\\t%0,%1,%x2\;sltu\\t%0,%.,%0"
3165 [(set_attr "type" "arith")
3166 (set_attr "mode" "SI")
3167 (set_attr "length" "2")])
3170 [(set (match_operand:SI 0 "register_operand" "")
3171 (ne:SI (match_operand:SI 1 "register_operand" "")
3172 (match_operand:SI 2 "uns_arith_operand" "")))]
3173 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
3174 && (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
3176 (xor:SI (match_dup 1)
3179 (gtu:SI (match_dup 0)
3183 (define_expand "sgt"
3184 [(set (match_operand:SI 0 "register_operand" "=d")
3185 (gt:SI (match_dup 1)
3190 extern rtx force_reg ();
3192 if (branch_type != CMP_SI)
3195 /* set up operands from compare. */
3196 operands[1] = branch_cmp[0];
3197 operands[2] = branch_cmp[1];
3199 if (!TARGET_DEBUG_C_MODE)
3201 gen_int_relational (GT, operands[0], operands[1], operands[2], (int *)0);
3205 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) != 0)
3206 operands[2] = force_reg (SImode, operands[2]);
3208 /* fall through and generate default code */
3211 (define_insn "sgt_si"
3212 [(set (match_operand:SI 0 "register_operand" "=d")
3213 (gt:SI (match_operand:SI 1 "register_operand" "d")
3214 (match_operand:SI 2 "reg_or_0_operand" "dJ")))]
3217 [(set_attr "type" "arith")
3218 (set_attr "mode" "SI")
3219 (set_attr "length" "1")])
3221 (define_expand "sge"
3222 [(set (match_operand:SI 0 "register_operand" "=d")
3223 (ge:SI (match_dup 1)
3228 if (branch_type != CMP_SI)
3231 /* set up operands from compare. */
3232 operands[1] = branch_cmp[0];
3233 operands[2] = branch_cmp[1];
3235 if (!TARGET_DEBUG_C_MODE)
3237 gen_int_relational (GE, operands[0], operands[1], operands[2], (int *)0);
3241 /* fall through and generate default code */
3244 (define_insn "sge_si"
3245 [(set (match_operand:SI 0 "register_operand" "=d")
3246 (ge:SI (match_operand:SI 1 "register_operand" "d")
3247 (match_operand:SI 2 "arith_operand" "dI")))]
3248 "TARGET_DEBUG_C_MODE"
3249 "slt\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
3250 [(set_attr "type" "arith")
3251 (set_attr "mode" "SI")
3252 (set_attr "length" "2")])
3255 [(set (match_operand:SI 0 "register_operand" "")
3256 (ge:SI (match_operand:SI 1 "register_operand" "")
3257 (match_operand:SI 2 "arith_operand" "")))]
3258 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3260 (lt:SI (match_dup 1)
3263 (xor:SI (match_dup 0)
3267 (define_expand "slt"
3268 [(set (match_operand:SI 0 "register_operand" "=d")
3269 (lt:SI (match_dup 1)
3274 if (branch_type != CMP_SI)
3277 /* set up operands from compare. */
3278 operands[1] = branch_cmp[0];
3279 operands[2] = branch_cmp[1];
3281 if (!TARGET_DEBUG_C_MODE)
3283 gen_int_relational (LT, operands[0], operands[1], operands[2], (int *)0);
3287 /* fall through and generate default code */
3290 (define_insn "slt_si"
3291 [(set (match_operand:SI 0 "register_operand" "=d")
3292 (lt:SI (match_operand:SI 1 "register_operand" "d")
3293 (match_operand:SI 2 "arith_operand" "dI")))]
3296 [(set_attr "type" "arith")
3297 (set_attr "mode" "SI")
3298 (set_attr "length" "1")])
3300 (define_expand "sle"
3301 [(set (match_operand:SI 0 "register_operand" "=d")
3302 (le:SI (match_dup 1)
3307 extern rtx force_reg ();
3309 if (branch_type != CMP_SI)
3312 /* set up operands from compare. */
3313 operands[1] = branch_cmp[0];
3314 operands[2] = branch_cmp[1];
3316 if (!TARGET_DEBUG_C_MODE)
3318 gen_int_relational (LE, operands[0], operands[1], operands[2], (int *)0);
3322 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 32767)
3323 operands[2] = force_reg (SImode, operands[2]);
3325 /* fall through and generate default code */
3328 (define_insn "sle_si_const"
3329 [(set (match_operand:SI 0 "register_operand" "=d")
3330 (le:SI (match_operand:SI 1 "register_operand" "d")
3331 (match_operand:SI 2 "small_int" "I")))]
3332 "INTVAL (operands[2]) < 32767"
3335 operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2])+1);
3336 return \"slt\\t%0,%1,%2\";
3338 [(set_attr "type" "arith")
3339 (set_attr "mode" "SI")
3340 (set_attr "length" "1")])
3342 (define_insn "sle_si_reg"
3343 [(set (match_operand:SI 0 "register_operand" "=d")
3344 (le:SI (match_operand:SI 1 "register_operand" "d")
3345 (match_operand:SI 2 "register_operand" "d")))]
3346 "TARGET_DEBUG_C_MODE"
3347 "slt\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
3348 [(set_attr "type" "arith")
3349 (set_attr "mode" "SI")
3350 (set_attr "length" "2")])
3353 [(set (match_operand:SI 0 "register_operand" "")
3354 (le:SI (match_operand:SI 1 "register_operand" "")
3355 (match_operand:SI 2 "register_operand" "")))]
3356 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3358 (lt:SI (match_dup 2)
3361 (xor:SI (match_dup 0)
3365 (define_expand "sgtu"
3366 [(set (match_operand:SI 0 "register_operand" "=d")
3367 (gtu:SI (match_dup 1)
3372 extern rtx force_reg ();
3374 if (branch_type != CMP_SI)
3377 /* set up operands from compare. */
3378 operands[1] = branch_cmp[0];
3379 operands[2] = branch_cmp[1];
3381 if (!TARGET_DEBUG_C_MODE)
3383 gen_int_relational (GTU, operands[0], operands[1], operands[2], (int *)0);
3387 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) != 0)
3388 operands[2] = force_reg (SImode, operands[2]);
3390 /* fall through and generate default code */
3393 (define_insn "sgtu_si"
3394 [(set (match_operand:SI 0 "register_operand" "=d")
3395 (gtu:SI (match_operand:SI 1 "register_operand" "d")
3396 (match_operand:SI 2 "reg_or_0_operand" "dJ")))]
3399 [(set_attr "type" "arith")
3400 (set_attr "mode" "SI")
3401 (set_attr "length" "1")])
3403 (define_expand "sgeu"
3404 [(set (match_operand:SI 0 "register_operand" "=d")
3405 (geu:SI (match_dup 1)
3410 if (branch_type != CMP_SI)
3413 /* set up operands from compare. */
3414 operands[1] = branch_cmp[0];
3415 operands[2] = branch_cmp[1];
3417 if (!TARGET_DEBUG_C_MODE)
3419 gen_int_relational (GEU, operands[0], operands[1], operands[2], (int *)0);
3423 /* fall through and generate default code */
3426 (define_insn "sgeu_si"
3427 [(set (match_operand:SI 0 "register_operand" "=d")
3428 (geu:SI (match_operand:SI 1 "register_operand" "d")
3429 (match_operand:SI 2 "arith_operand" "dI")))]
3430 "TARGET_DEBUG_C_MODE"
3431 "sltu\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
3432 [(set_attr "type" "arith")
3433 (set_attr "mode" "SI")
3434 (set_attr "length" "2")])
3437 [(set (match_operand:SI 0 "register_operand" "")
3438 (geu:SI (match_operand:SI 1 "register_operand" "")
3439 (match_operand:SI 2 "arith_operand" "")))]
3440 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3442 (ltu:SI (match_dup 1)
3445 (xor:SI (match_dup 0)
3449 (define_expand "sltu"
3450 [(set (match_operand:SI 0 "register_operand" "=d")
3451 (ltu:SI (match_dup 1)
3456 if (branch_type != CMP_SI)
3459 /* set up operands from compare. */
3460 operands[1] = branch_cmp[0];
3461 operands[2] = branch_cmp[1];
3463 if (!TARGET_DEBUG_C_MODE)
3465 gen_int_relational (LTU, operands[0], operands[1], operands[2], (int *)0);
3469 /* fall through and generate default code */
3472 (define_insn "sltu_si"
3473 [(set (match_operand:SI 0 "register_operand" "=d")
3474 (ltu:SI (match_operand:SI 1 "register_operand" "d")
3475 (match_operand:SI 2 "arith_operand" "dI")))]
3478 [(set_attr "type" "arith")
3479 (set_attr "mode" "SI")
3480 (set_attr "length" "1")])
3482 (define_expand "sleu"
3483 [(set (match_operand:SI 0 "register_operand" "=d")
3484 (leu:SI (match_dup 1)
3489 extern rtx force_reg ();
3491 if (branch_type != CMP_SI)
3494 /* set up operands from compare. */
3495 operands[1] = branch_cmp[0];
3496 operands[2] = branch_cmp[1];
3498 if (!TARGET_DEBUG_C_MODE)
3500 gen_int_relational (LEU, operands[0], operands[1], operands[2], (int *)0);
3504 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 32767)
3505 operands[2] = force_reg (SImode, operands[2]);
3507 /* fall through and generate default code */
3510 (define_insn "sleu_si_const"
3511 [(set (match_operand:SI 0 "register_operand" "=d")
3512 (leu:SI (match_operand:SI 1 "register_operand" "d")
3513 (match_operand:SI 2 "small_int" "I")))]
3514 "INTVAL (operands[2]) < 32767"
3517 operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2])+1);
3518 return \"sltu\\t%0,%1,%2\";
3520 [(set_attr "type" "arith")
3521 (set_attr "mode" "SI")
3522 (set_attr "length" "1")])
3524 (define_insn "sleu_si_reg"
3525 [(set (match_operand:SI 0 "register_operand" "=d")
3526 (leu:SI (match_operand:SI 1 "register_operand" "d")
3527 (match_operand:SI 2 "register_operand" "d")))]
3528 "TARGET_DEBUG_C_MODE"
3529 "sltu\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
3530 [(set_attr "type" "arith")
3531 (set_attr "mode" "SI")
3532 (set_attr "length" "2")])
3535 [(set (match_operand:SI 0 "register_operand" "")
3536 (leu:SI (match_operand:SI 1 "register_operand" "")
3537 (match_operand:SI 2 "register_operand" "")))]
3538 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3540 (ltu:SI (match_dup 2)
3543 (xor:SI (match_dup 0)
3549 ;; ....................
3551 ;; FLOATING POINT COMPARISONS
3553 ;; ....................
3555 (define_insn "seq_df"
3556 [(set (reg:CC_FP 66)
3557 (eq:CC_FP (match_operand:DF 0 "register_operand" "f")
3558 (match_operand:DF 1 "register_operand" "f")))]
3563 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3564 xoperands[1] = operands[0];
3565 xoperands[2] = operands[1];
3567 return mips_fill_delay_slot (\"c.eq.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3569 [(set_attr "type" "fcmp")
3570 (set_attr "mode" "FPSW")
3571 (set_attr "length" "1")])
3573 (define_insn "sne_df"
3574 [(set (reg:CC_REV_FP 66)
3575 (ne:CC_REV_FP (match_operand:DF 0 "register_operand" "f")
3576 (match_operand:DF 1 "register_operand" "f")))]
3581 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3582 xoperands[1] = operands[0];
3583 xoperands[2] = operands[1];
3585 return mips_fill_delay_slot (\"c.eq.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3587 [(set_attr "type" "fcmp")
3588 (set_attr "mode" "FPSW")
3589 (set_attr "length" "1")])
3591 (define_insn "slt_df"
3592 [(set (reg:CC_FP 66)
3593 (lt:CC_FP (match_operand:DF 0 "register_operand" "f")
3594 (match_operand:DF 1 "register_operand" "f")))]
3599 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3600 xoperands[1] = operands[0];
3601 xoperands[2] = operands[1];
3603 return mips_fill_delay_slot (\"c.lt.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3605 [(set_attr "type" "fcmp")
3606 (set_attr "mode" "FPSW")
3607 (set_attr "length" "1")])
3609 (define_insn "sle_df"
3610 [(set (reg:CC_FP 66)
3611 (le:CC_FP (match_operand:DF 0 "register_operand" "f")
3612 (match_operand:DF 1 "register_operand" "f")))]
3617 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3618 xoperands[1] = operands[0];
3619 xoperands[2] = operands[1];
3621 return mips_fill_delay_slot (\"c.le.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3623 [(set_attr "type" "fcmp")
3624 (set_attr "mode" "FPSW")
3625 (set_attr "length" "1")])
3627 (define_insn "sgt_df"
3628 [(set (reg:CC_FP 66)
3629 (gt:CC_FP (match_operand:DF 0 "register_operand" "f")
3630 (match_operand:DF 1 "register_operand" "f")))]
3635 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3636 xoperands[1] = operands[0];
3637 xoperands[2] = operands[1];
3639 return mips_fill_delay_slot (\"c.lt.d\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3641 [(set_attr "type" "fcmp")
3642 (set_attr "mode" "FPSW")
3643 (set_attr "length" "1")])
3645 (define_insn "sge_df"
3646 [(set (reg:CC_FP 66)
3647 (ge:CC_FP (match_operand:DF 0 "register_operand" "f")
3648 (match_operand:DF 1 "register_operand" "f")))]
3653 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3654 xoperands[1] = operands[0];
3655 xoperands[2] = operands[1];
3657 return mips_fill_delay_slot (\"c.le.d\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3659 [(set_attr "type" "fcmp")
3660 (set_attr "mode" "FPSW")
3661 (set_attr "length" "1")])
3663 (define_insn "seq_sf"
3664 [(set (reg:CC_FP 66)
3665 (eq:CC_FP (match_operand:SF 0 "register_operand" "f")
3666 (match_operand:SF 1 "register_operand" "f")))]
3671 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3672 xoperands[1] = operands[0];
3673 xoperands[2] = operands[1];
3675 return mips_fill_delay_slot (\"c.eq.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3677 [(set_attr "type" "fcmp")
3678 (set_attr "mode" "FPSW")
3679 (set_attr "length" "1")])
3681 (define_insn "sne_sf"
3682 [(set (reg:CC_REV_FP 66)
3683 (ne:CC_REV_FP (match_operand:SF 0 "register_operand" "f")
3684 (match_operand:SF 1 "register_operand" "f")))]
3689 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3690 xoperands[1] = operands[0];
3691 xoperands[2] = operands[1];
3693 return mips_fill_delay_slot (\"c.eq.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3695 [(set_attr "type" "fcmp")
3696 (set_attr "mode" "FPSW")
3697 (set_attr "length" "1")])
3699 (define_insn "slt_sf"
3700 [(set (reg:CC_FP 66)
3701 (lt:CC_FP (match_operand:SF 0 "register_operand" "f")
3702 (match_operand:SF 1 "register_operand" "f")))]
3707 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3708 xoperands[1] = operands[0];
3709 xoperands[2] = operands[1];
3711 return mips_fill_delay_slot (\"c.lt.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3713 [(set_attr "type" "fcmp")
3714 (set_attr "mode" "FPSW")
3715 (set_attr "length" "1")])
3717 (define_insn "sle_sf"
3718 [(set (reg:CC_FP 66)
3719 (le:CC_FP (match_operand:SF 0 "register_operand" "f")
3720 (match_operand:SF 1 "register_operand" "f")))]
3725 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3726 xoperands[1] = operands[0];
3727 xoperands[2] = operands[1];
3729 return mips_fill_delay_slot (\"c.le.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3731 [(set_attr "type" "fcmp")
3732 (set_attr "mode" "FPSW")
3733 (set_attr "length" "1")])
3735 (define_insn "sgt_sf"
3736 [(set (reg:CC_FP 66)
3737 (gt:CC_FP (match_operand:SF 0 "register_operand" "f")
3738 (match_operand:SF 1 "register_operand" "f")))]
3743 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3744 xoperands[1] = operands[0];
3745 xoperands[2] = operands[1];
3747 return mips_fill_delay_slot (\"c.lt.s\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3749 [(set_attr "type" "fcmp")
3750 (set_attr "mode" "FPSW")
3751 (set_attr "length" "1")])
3753 (define_insn "sge_sf"
3754 [(set (reg:CC_FP 66)
3755 (ge:CC_FP (match_operand:SF 0 "register_operand" "f")
3756 (match_operand:SF 1 "register_operand" "f")))]
3761 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3762 xoperands[1] = operands[0];
3763 xoperands[2] = operands[1];
3765 return mips_fill_delay_slot (\"c.le.s\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3767 [(set_attr "type" "fcmp")
3768 (set_attr "mode" "FPSW")
3769 (set_attr "length" "1")])
3773 ;; ....................
3775 ;; UNCONDITIONAL BRANCHES
3777 ;; ....................
3779 ;; Unconditional branches.
3783 (label_ref (match_operand 0 "" "")))]
3787 if (GET_CODE (operands[0]) == REG)
3788 return \"%*j\\t%0\";
3790 return \"%*j\\t%l0\";
3792 [(set_attr "type" "jump")
3793 (set_attr "mode" "none")
3794 (set_attr "length" "1")])
3796 (define_insn "indirect_jump"
3797 [(set (pc) (match_operand:SI 0 "register_operand" "d"))]
3800 [(set_attr "type" "jump")
3801 (set_attr "mode" "none")
3802 (set_attr "length" "1")])
3804 (define_insn "tablejump"
3806 (match_operand:SI 0 "register_operand" "d"))
3807 (use (label_ref (match_operand 1 "" "")))]
3810 [(set_attr "type" "jump")
3811 (set_attr "mode" "none")
3812 (set_attr "length" "1")])
3814 ;; Function return, only allow after optimization, so that we can
3815 ;; eliminate jumps to jumps if no stack space is used.
3817 ;; (define_expand "return"
3818 ;; [(set (pc) (reg:SI 31))]
3819 ;; "simple_epilogue_p ()"
3822 (define_expand "return"
3823 [(parallel [(return)
3824 (use (reg:SI 31))])]
3825 "simple_epilogue_p ()"
3828 (define_insn "return_internal"
3829 [(parallel [(return)
3830 (use (match_operand:SI 0 "register_operand" "d"))])]
3833 [(set_attr "type" "jump")
3834 (set_attr "mode" "none")
3835 (set_attr "length" "1")])
3839 ;; ....................
3841 ;; Function prologue/epilogue
3843 ;; ....................
3846 (define_expand "prologue"
3851 if (mips_isa >= 0) /* avoid unused code warnings */
3853 mips_expand_prologue ();
3858 ;; At present, don't expand the epilogue, reorg.c will clobber the
3859 ;; return register in compiling gen_lowpart (emit-rtl.c).
3861 ;; (define_expand "epilogue"
3866 ;; if (mips_isa >= 0) /* avoid unused code warnings */
3868 ;; mips_expand_epilogue ();
3875 ;; ....................
3879 ;; ....................
3881 ;; calls.c now passes a third argument, make saber happy
3883 (define_expand "call"
3884 [(parallel [(call (match_operand 0 "memory_operand" "m")
3885 (match_operand 1 "" "i"))
3886 (clobber (match_operand 2 "" ""))])] ;; overwrite op2 with $31
3892 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3894 addr = XEXP (operands[0], 0);
3895 if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr))
3896 XEXP (operands[0], 0) = force_reg (FUNCTION_MODE, addr);
3899 (define_insn "call_internal"
3900 [(call (match_operand 0 "memory_operand" "m")
3901 (match_operand 1 "" "i"))
3902 (clobber (match_operand:SI 2 "register_operand" "=d"))]
3906 register rtx target = XEXP (operands[0], 0);
3908 if (GET_CODE (target) == SYMBOL_REF)
3909 return \"%*jal\\t%0\";
3913 operands[0] = target;
3914 operands[1] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3915 return \"%*jal\\t%1,%0\";
3918 [(set_attr "type" "call")
3919 (set_attr "mode" "none")
3920 (set_attr "length" "1")])
3922 ;; calls.c now passes a fourth argument, make saber happy
3924 (define_expand "call_value"
3925 [(parallel [(set (match_operand 0 "register_operand" "=df")
3926 (call (match_operand 1 "memory_operand" "m")
3927 (match_operand 2 "" "i")))
3928 (clobber (match_operand 3 "" ""))])] ;; overwrite op3 with $31
3934 operands[3] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3936 addr = XEXP (operands[1], 0);
3937 if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr))
3938 XEXP (operands[1], 0) = force_reg (FUNCTION_MODE, addr);
3941 (define_insn "call_value_internal"
3942 [(set (match_operand 0 "register_operand" "=df")
3943 (call (match_operand 1 "memory_operand" "m")
3944 (match_operand 2 "" "i")))
3945 (clobber (match_operand:SI 3 "register_operand" "=d"))]
3949 register rtx target = XEXP (operands[1], 0);
3951 if (GET_CODE (target) == SYMBOL_REF)
3952 return \"%*jal\\t%1\";
3956 operands[1] = target;
3957 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3958 return \"%*jal\\t%2,%1\";
3961 [(set_attr "type" "call")
3962 (set_attr "mode" "none")
3963 (set_attr "length" "1")])
3967 ;; ....................
3971 ;; ....................
3978 [(set_attr "type" "nop")
3979 (set_attr "mode" "none")
3980 (set_attr "length" "1")])
3982 (define_expand "probe"
3988 operands[0] = gen_reg_rtx (SImode);
3989 operands[1] = gen_rtx (MEM, SImode, stack_pointer_rtx);
3990 MEM_VOLATILE_P (operands[1]) = TRUE;
3992 /* fall through and generate default code */
3999 ;; comment-start: ";; "
4000 ;; eval: (set-syntax-table (copy-sequence (syntax-table)))
4001 ;; eval: (modify-syntax-entry ?[ "(]")
4002 ;; eval: (modify-syntax-entry ?] ")[")
4003 ;; eval: (modify-syntax-entry ?{ "(}")
4004 ;; eval: (modify-syntax-entry ?} "){")