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)
54 ;; pic OSF/rose half pic load
57 "unknown,branch,jump,call,load,store,move,xfer,hilo,arith,darith,imul,idiv,icmp,fadd,fmul,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,multi,nop,pic"
58 (const_string "unknown"))
60 ;; Main data type used by the insn
61 (define_attr "mode" "unknown,none,QI,HI,SI,DI,SF,DF,FPSW" (const_string "unknown"))
63 ;; # instructions (4 bytes each)
64 (define_attr "length" "" (const_int 1))
66 ;; whether or not an instruction has a mandatory delay slot
67 (define_attr "dslot" "no,yes"
68 (if_then_else (eq_attr "type" "branch,jump,call,load,xfer,hilo,fcmp,pic")
72 ;; Attribute describing the processor. This attribute must match exactly
73 ;; with the processor_type enumeration in mips.h.
75 ;; Attribute describing the processor
76 ;; (define_attr "cpu" "default,r3000,r6000,r4000"
78 ;; (cond [(eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R3000")) (const_string "r3000")
79 ;; (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R4000")) (const_string "r4000")
80 ;; (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R6000")) (const_string "r6000")]
81 ;; (const_string "default"))))
83 (define_attr "cpu" "default,r3000,r6000,r4000"
84 (const (symbol_ref "mips_cpu_attr")))
86 ;; Attribute defining whether or not we can use the branch-likely instructions
89 (define_attr "branch_likely" "no,yes"
91 (if_then_else (ge (symbol_ref "mips_isa") (const_int 2))
93 (const_string "no"))))
96 ;; Describe a user's asm statement.
97 (define_asm_attributes
98 [(set_attr "type" "multi")])
102 ;; .........................
104 ;; Delay slots, can't describe load/fcmp/xfer delay slots here
106 ;; .........................
108 (define_delay (eq_attr "type" "branch")
109 [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
111 (and (eq_attr "branch_likely" "yes") (and (eq_attr "dslot" "no") (eq_attr "length" "1")))])
113 (define_delay (eq_attr "type" "call,jump")
114 [(and (eq_attr "dslot" "no") (eq_attr "length" "1"))
120 ;; .........................
124 ;; .........................
126 ; (define_function_unit NAME MULTIPLICITY SIMULTANEITY
127 ; TEST READY-DELAY BUSY-DELAY [CONFLICT-LIST])
129 ;; Make the default case (PROCESSOR_DEFAULT) handle the worst case
131 (define_function_unit "memory" 1 0
132 (and (eq_attr "type" "load,pic") (eq_attr "cpu" "!r3000"))
135 (define_function_unit "memory" 1 0
136 (and (eq_attr "type" "load,pic") (eq_attr "cpu" "r3000"))
139 (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0)
141 (define_function_unit "addr" 1 0 (eq_attr "type" "fcmp") 2 0)
143 (define_function_unit "memory" 1 0 (eq_attr "type" "xfer") 2 0)
144 (define_function_unit "memory" 1 0 (eq_attr "type" "hilo") 3 0)
146 (define_function_unit "imuldiv" 1 1
147 (and (eq_attr "type" "imul") (eq_attr "cpu" "!r3000,r4000"))
150 (define_function_unit "imuldiv" 1 1
151 (and (eq_attr "type" "imul") (eq_attr "cpu" "r3000"))
154 (define_function_unit "imuldiv" 1 1
155 (and (eq_attr "type" "imul") (eq_attr "cpu" "r4000"))
158 (define_function_unit "imuldiv" 1 1
159 (and (eq_attr "type" "idiv") (eq_attr "cpu" "!r3000,r4000"))
162 (define_function_unit "imuldiv" 1 1
163 (and (eq_attr "type" "idiv") (eq_attr "cpu" "r3000"))
166 (define_function_unit "imuldiv" 1 1
167 (and (eq_attr "type" "idiv") (eq_attr "cpu" "r4000"))
170 (define_function_unit "adder" 1 1
171 (and (eq_attr "type" "fadd") (eq_attr "cpu" "!r3000,r6000"))
174 (define_function_unit "adder" 1 1
175 (and (eq_attr "type" "fadd") (eq_attr "cpu" "r3000"))
178 (define_function_unit "adder" 1 1
179 (and (eq_attr "type" "fadd") (eq_attr "cpu" "r6000"))
182 (define_function_unit "adder" 1 1
183 (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "!r3000"))
186 (define_function_unit "adder" 1 1
187 (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000"))
190 (define_function_unit "mult" 1 1
191 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000")))
194 (define_function_unit "mult" 1 1
195 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000")))
198 (define_function_unit "mult" 1 1
199 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000")))
202 (define_function_unit "mult" 1 1
203 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000")))
206 (define_function_unit "mult" 1 1
207 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000")))
210 (define_function_unit "mult" 1 1
211 (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000")))
214 (define_function_unit "divide" 1 1
215 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000")))
218 (define_function_unit "divide" 1 1
219 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000")))
222 (define_function_unit "divide" 1 1
223 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000")))
226 (define_function_unit "divide" 1 1
227 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000")))
230 (define_function_unit "divide" 1 1
231 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000")))
234 (define_function_unit "divide" 1 1
235 (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000")))
238 (define_function_unit "divide" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 108)
239 (define_function_unit "divide" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 224)
242 ;; The following functional units do not use the cpu type, and use
243 ;; much less memory in genattrtab.c.
245 ;; (define_function_unit "memory" 1 0 (eq_attr "type" "load,pic") 3 0)
246 ;; (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0)
248 ;; (define_function_unit "fp_comp" 1 0 (eq_attr "type" "fcmp") 2 0)
250 ;; (define_function_unit "transfer" 1 0 (eq_attr "type" "xfer") 2 0)
251 ;; (define_function_unit "transfer" 1 0 (eq_attr "type" "hilo") 3 0)
253 ;; (define_function_unit "imuldiv" 1 1 (eq_attr "type" "imul") 17 34)
254 ;; (define_function_unit "imuldiv" 1 1 (eq_attr "type" "idiv") 38 76)
256 ;; (define_function_unit "adder" 1 1 (eq_attr "type" "fadd") 4 8)
257 ;; (define_function_unit "adder" 1 1 (eq_attr "type" "fabs,fneg") 2 4)
259 ;; (define_function_unit "mult" 1 1 (and (eq_attr "type" "fmul") (eq_attr "mode" "SF")) 7 14)
260 ;; (define_function_unit "mult" 1 1 (and (eq_attr "type" "fmul") (eq_attr "mode" "DF")) 8 16)
262 ;; (define_function_unit "divide" 1 1 (and (eq_attr "type" "fdiv") (eq_attr "mode" "SF")) 23 46)
263 ;; (define_function_unit "divide" 1 1 (and (eq_attr "type" "fdiv") (eq_attr "mode" "DF")) 36 72)
265 ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 108)
266 ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 224)
270 ;; ....................
274 ;; ....................
277 (define_insn "adddf3"
278 [(set (match_operand:DF 0 "register_operand" "=f")
279 (plus:DF (match_operand:DF 1 "register_operand" "f")
280 (match_operand:DF 2 "register_operand" "f")))]
283 [(set_attr "type" "fadd")
284 (set_attr "mode" "DF")
285 (set_attr "length" "1")])
287 (define_insn "addsf3"
288 [(set (match_operand:SF 0 "register_operand" "=f")
289 (plus:SF (match_operand:SF 1 "register_operand" "f")
290 (match_operand:SF 2 "register_operand" "f")))]
293 [(set_attr "type" "fadd")
294 (set_attr "mode" "SF")
295 (set_attr "length" "1")])
297 (define_insn "addsi3"
298 [(set (match_operand:SI 0 "register_operand" "=d")
299 (plus:SI (match_operand:SI 1 "arith_operand" "%d")
300 (match_operand:SI 2 "arith_operand" "dI")))]
304 return (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
305 ? \"subu\\t%0,%1,%n2\"
306 : \"addu\\t%0,%1,%2\";
308 [(set_attr "type" "arith")
309 (set_attr "mode" "SI")
310 (set_attr "length" "1")])
312 (define_expand "adddi3"
313 [(parallel [(set (match_operand:DI 0 "register_operand" "")
314 (plus:DI (match_operand:DI 1 "register_operand" "")
315 (match_operand:DI 2 "arith_operand" "")))
316 (clobber (match_dup 3))])]
317 "!TARGET_DEBUG_G_MODE"
320 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == -32768)
321 operands[2] = force_reg (SImode, operands[2]);
323 operands[3] = gen_reg_rtx (SImode);
326 (define_insn "adddi3_internal_1"
327 [(set (match_operand:DI 0 "register_operand" "=d,&d")
328 (plus:DI (match_operand:DI 1 "register_operand" "0,d")
329 (match_operand:DI 2 "register_operand" "d,d")))
330 (clobber (match_operand:SI 3 "register_operand" "=d,d"))]
331 "!TARGET_DEBUG_G_MODE"
334 return (REGNO (operands[0]) == REGNO (operands[1])
335 && REGNO (operands[0]) == REGNO (operands[2]))
336 ? \"srl\\t%3,%L0,31\;sll\\t%M0,%M0,1\;sll\\t%L0,%L1,1\;addu\\t%M0,%M0,%3\"
337 : \"addu\\t%L0,%L1,%L2\;sltu\\t%3,%L0,%L2\;addu\\t%M0,%M1,%M2\;addu\\t%M0,%M0,%3\";
339 [(set_attr "type" "darith")
340 (set_attr "mode" "DI")
341 (set_attr "length" "4")])
344 [(set (match_operand:DI 0 "register_operand" "")
345 (plus:DI (match_operand:DI 1 "register_operand" "")
346 (match_operand:DI 2 "register_operand" "")))
347 (clobber (match_operand:SI 3 "register_operand" ""))]
348 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
349 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
350 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
351 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))
352 && (REGNO (operands[0]) != REGNO (operands[1])
353 || REGNO (operands[0]) != REGNO (operands[2]))"
355 [(set (subreg:SI (match_dup 0) 0)
356 (plus:SI (subreg:SI (match_dup 1) 0)
357 (subreg:SI (match_dup 2) 0)))
360 (ltu:SI (subreg:SI (match_dup 0) 0)
361 (subreg:SI (match_dup 2) 0)))
363 (set (subreg:SI (match_dup 0) 1)
364 (plus:SI (subreg:SI (match_dup 1) 1)
365 (subreg:SI (match_dup 2) 1)))
367 (set (subreg:SI (match_dup 0) 1)
368 (plus:SI (subreg:SI (match_dup 0) 1)
373 [(set (match_operand:DI 0 "register_operand" "")
374 (plus:DI (match_operand:DI 1 "register_operand" "")
375 (match_operand:DI 2 "register_operand" "")))
376 (clobber (match_operand:SI 3 "register_operand" ""))]
377 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
378 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
379 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
380 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))
381 && (REGNO (operands[0]) != REGNO (operands[1])
382 || REGNO (operands[0]) != REGNO (operands[2]))"
384 [(set (subreg:SI (match_dup 0) 1)
385 (plus:SI (subreg:SI (match_dup 1) 1)
386 (subreg:SI (match_dup 2) 1)))
389 (ltu:SI (subreg:SI (match_dup 0) 1)
390 (subreg:SI (match_dup 2) 1)))
392 (set (subreg:SI (match_dup 0) 0)
393 (plus:SI (subreg:SI (match_dup 1) 0)
394 (subreg:SI (match_dup 2) 0)))
396 (set (subreg:SI (match_dup 0) 0)
397 (plus:SI (subreg:SI (match_dup 0) 0)
401 (define_insn "adddi3_internal_2"
402 [(set (match_operand:DI 0 "register_operand" "=d,d,d")
403 (plus:DI (match_operand:DI 1 "register_operand" "%d,%d,%d")
404 (match_operand:DI 2 "small_int" "P,J,N")))
405 (clobber (match_operand:SI 3 "register_operand" "=d,d,d"))]
406 "!TARGET_DEBUG_G_MODE && INTVAL (operands[2]) != -32768"
408 addu\\t%L0,%L1,%2\;sltu\\t%3,%L0,%2\;addu\\t%M0,%M1,%3
409 move\\t%L0,%L1\;move\\t%M0,%M1
410 subu\\t%L0,%L1,%n2\;sltu\\t%3,%L0,%2\;subu\\t%M0,%M1,1\;addu\\t%M0,%M0,%3"
411 [(set_attr "type" "darith")
412 (set_attr "mode" "DI")
413 (set_attr "length" "3,2,4")])
416 [(set (match_operand:DI 0 "register_operand" "")
417 (plus:DI (match_operand:DI 1 "register_operand" "")
418 (match_operand:DI 2 "small_int" "")))
419 (clobber (match_operand:SI 3 "register_operand" "=d"))]
420 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
421 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
422 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
423 && INTVAL (operands[2]) > 0"
425 [(set (subreg:SI (match_dup 0) 0)
426 (plus:SI (subreg:SI (match_dup 1) 0)
430 (ltu:SI (subreg:SI (match_dup 0) 0)
433 (set (subreg:SI (match_dup 0) 1)
434 (plus:SI (subreg:SI (match_dup 1) 1)
439 [(set (match_operand:DI 0 "register_operand" "")
440 (plus:DI (match_operand:DI 1 "register_operand" "")
441 (match_operand:DI 2 "small_int" "")))
442 (clobber (match_operand:SI 3 "register_operand" "=d"))]
443 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
444 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
445 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
446 && INTVAL (operands[2]) > 0"
448 [(set (subreg:SI (match_dup 0) 1)
449 (plus:SI (subreg:SI (match_dup 1) 1)
453 (ltu:SI (subreg:SI (match_dup 0) 1)
456 (set (subreg:SI (match_dup 0) 0)
457 (plus:SI (subreg:SI (match_dup 1) 0)
462 ;; ....................
466 ;; ....................
469 (define_insn "subdf3"
470 [(set (match_operand:DF 0 "register_operand" "=f")
471 (minus:DF (match_operand:DF 1 "register_operand" "f")
472 (match_operand:DF 2 "register_operand" "f")))]
475 [(set_attr "type" "fadd")
476 (set_attr "mode" "DF")
477 (set_attr "length" "1")])
479 (define_insn "subsf3"
480 [(set (match_operand:SF 0 "register_operand" "=f")
481 (minus:SF (match_operand:SF 1 "register_operand" "f")
482 (match_operand:SF 2 "register_operand" "f")))]
485 [(set_attr "type" "fadd")
486 (set_attr "mode" "SF")
487 (set_attr "length" "1")])
489 (define_insn "subsi3"
490 [(set (match_operand:SI 0 "register_operand" "=d")
491 (minus:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
492 (match_operand:SI 2 "arith_operand" "dI")))]
496 return (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
497 ? \"addu\\t%0,%z1,%n2\"
498 : \"subu\\t%0,%z1,%2\";
500 [(set_attr "type" "arith")
501 (set_attr "mode" "SI")
502 (set_attr "length" "1")])
504 (define_expand "subdi3"
505 [(parallel [(set (match_operand:DI 0 "register_operand" "=d")
506 (minus:DI (match_operand:DI 1 "register_operand" "d")
507 (match_operand:DI 2 "register_operand" "d")))
508 (clobber (match_dup 3))])]
509 "!TARGET_DEBUG_G_MODE"
510 "operands[3] = gen_reg_rtx (SImode);")
512 (define_insn "subdi3_internal"
513 [(set (match_operand:DI 0 "register_operand" "=d")
514 (minus:DI (match_operand:DI 1 "register_operand" "d")
515 (match_operand:DI 2 "register_operand" "d")))
516 (clobber (match_operand:SI 3 "register_operand" "=d"))]
517 "!TARGET_DEBUG_G_MODE"
518 "sltu\\t%3,%L1,%L2\;subu\\t%L0,%L1,%L2\;subu\\t%M0,%M1,%M2\;subu\\t%M0,%M0,%3"
519 [(set_attr "type" "darith")
520 (set_attr "mode" "DI")
521 (set_attr "length" "4")])
524 [(set (match_operand:DI 0 "register_operand" "")
525 (minus:DI (match_operand:DI 1 "register_operand" "")
526 (match_operand:DI 2 "register_operand" "")))
527 (clobber (match_operand:SI 3 "register_operand" ""))]
528 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
529 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
530 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
531 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
534 (ltu:SI (subreg:SI (match_dup 1) 0)
535 (subreg:SI (match_dup 2) 0)))
537 (set (subreg:SI (match_dup 0) 0)
538 (minus:SI (subreg:SI (match_dup 1) 0)
539 (subreg:SI (match_dup 2) 0)))
541 (set (subreg:SI (match_dup 0) 1)
542 (minus:SI (subreg:SI (match_dup 1) 1)
543 (subreg:SI (match_dup 2) 1)))
545 (set (subreg:SI (match_dup 0) 1)
546 (minus:SI (subreg:SI (match_dup 0) 1)
551 [(set (match_operand:DI 0 "register_operand" "")
552 (minus:DI (match_operand:DI 1 "register_operand" "")
553 (match_operand:DI 2 "register_operand" "")))
554 (clobber (match_operand:SI 3 "register_operand" ""))]
555 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
556 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
557 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
558 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
561 (ltu:SI (subreg:SI (match_dup 1) 1)
562 (subreg:SI (match_dup 2) 1)))
564 (set (subreg:SI (match_dup 0) 1)
565 (minus:SI (subreg:SI (match_dup 1) 1)
566 (subreg:SI (match_dup 2) 1)))
568 (set (subreg:SI (match_dup 0) 0)
569 (minus:SI (subreg:SI (match_dup 1) 0)
570 (subreg:SI (match_dup 2) 0)))
572 (set (subreg:SI (match_dup 0) 0)
573 (minus:SI (subreg:SI (match_dup 0) 0)
577 (define_insn "subdi3_internal_2"
578 [(set (match_operand:DI 0 "register_operand" "=d,d,d")
579 (minus:DI (match_operand:DI 1 "register_operand" "d,d,d")
580 (match_operand:DI 2 "small_int" "P,J,N")))
581 (clobber (match_operand:SI 3 "register_operand" "=d,d,d"))]
582 "!TARGET_DEBUG_G_MODE && INTVAL (operands[2]) != -32768"
584 sltu\\t%3,%L1,%2\;subu\\t%L0,%L1,%2\;subu\\t%M0,%M1,%3
585 move\\t%L0,%L1\;move\\t%M0,%M1
586 sltu\\t%3,%L1,%2\;subu\\t%L0,%L1,%2\;subu\\t%M0,%M1,1\;subu\\t%M0,%M0,%3"
587 [(set_attr "type" "darith")
588 (set_attr "mode" "DI")
589 (set_attr "length" "3,2,4")])
592 [(set (match_operand:DI 0 "register_operand" "")
593 (minus:DI (match_operand:DI 1 "register_operand" "")
594 (match_operand:DI 2 "small_int" "")))
595 (clobber (match_operand:SI 3 "register_operand" ""))]
596 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
597 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
598 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
599 && INTVAL (operands[2]) > 0"
602 (ltu:SI (subreg:SI (match_dup 1) 0)
605 (set (subreg:SI (match_dup 0) 0)
606 (minus:SI (subreg:SI (match_dup 1) 0)
609 (set (subreg:SI (match_dup 0) 1)
610 (minus:SI (subreg:SI (match_dup 1) 1)
615 [(set (match_operand:DI 0 "register_operand" "")
616 (minus:DI (match_operand:DI 1 "register_operand" "")
617 (match_operand:DI 2 "small_int" "")))
618 (clobber (match_operand:SI 3 "register_operand" ""))]
619 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
620 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
621 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
622 && INTVAL (operands[2]) > 0"
625 (ltu:SI (subreg:SI (match_dup 1) 1)
628 (set (subreg:SI (match_dup 0) 1)
629 (minus:SI (subreg:SI (match_dup 1) 1)
632 (set (subreg:SI (match_dup 0) 0)
633 (minus:SI (subreg:SI (match_dup 1) 0)
639 ;; ....................
643 ;; ....................
646 (define_insn "muldf3"
647 [(set (match_operand:DF 0 "register_operand" "=f")
648 (mult:DF (match_operand:DF 1 "register_operand" "f")
649 (match_operand:DF 2 "register_operand" "f")))]
652 [(set_attr "type" "fmul")
653 (set_attr "mode" "DF")
654 (set_attr "length" "1")])
656 (define_insn "mulsf3"
657 [(set (match_operand:SF 0 "register_operand" "=f")
658 (mult:SF (match_operand:SF 1 "register_operand" "f")
659 (match_operand:SF 2 "register_operand" "f")))]
662 [(set_attr "type" "fmul")
663 (set_attr "mode" "SF")
664 (set_attr "length" "1")])
666 (define_insn "mulsi3"
667 [(set (match_operand:SI 0 "register_operand" "=d")
668 (mult:SI (match_operand:SI 1 "register_operand" "d")
669 (match_operand:SI 2 "register_operand" "d")))
670 (clobber (reg:SI 64))
671 (clobber (reg:SI 65))]
677 xoperands[0] = operands[0];
678 xoperands[1] = gen_rtx (REG, SImode, LO_REGNUM);
680 output_asm_insn (\"mult\\t%1,%2\", operands);
681 output_asm_insn (mips_move_1word (xoperands, insn), xoperands);
684 [(set_attr "type" "imul")
685 (set_attr "mode" "SI")
686 (set_attr "length" "3")]) ;; mult + mflo + delay
689 [(set (match_operand:SI 0 "register_operand" "")
690 (mult:SI (match_operand:SI 1 "register_operand" "")
691 (match_operand:SI 2 "register_operand" "")))
692 (clobber (reg:SI 64))
693 (clobber (reg:SI 65))]
694 "!TARGET_DEBUG_D_MODE"
695 [(parallel [(set (reg:SI 65) ;; low register
696 (mult:SI (match_dup 1)
698 (clobber (reg:SI 64))])
703 (define_insn "mulsi3_internal"
704 [(set (reg:SI 65) ;; low register
705 (mult:SI (match_operand:SI 0 "register_operand" "d")
706 (match_operand:SI 1 "register_operand" "d")))
707 (clobber (reg:SI 64))]
710 [(set_attr "type" "imul")
711 (set_attr "mode" "SI")
712 (set_attr "length" "1")])
714 (define_insn "mulsidi3"
715 [(set (match_operand:DI 0 "register_operand" "=d")
716 (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "d"))
717 (sign_extend:DI (match_operand:SI 2 "register_operand" "d"))))
718 (clobber (reg:DI 64))]
724 xoperands[0] = operands[0];
725 xoperands[1] = gen_rtx (REG, DImode, MD_REG_FIRST);
727 output_asm_insn (\"mult\\t%1,%2\", operands);
728 output_asm_insn (mips_move_2words (xoperands, insn), xoperands);
731 [(set_attr "type" "imul")
732 (set_attr "mode" "SI")
733 (set_attr "length" "4")]) ;; mult + mflo + mfhi + delay
735 (define_insn "umulsidi3"
736 [(set (match_operand:DI 0 "register_operand" "=d")
737 (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "d"))
738 (zero_extend:DI (match_operand:SI 2 "register_operand" "d"))))
739 (clobber (reg:DI 64))]
745 xoperands[0] = operands[0];
746 xoperands[1] = gen_rtx (REG, DImode, MD_REG_FIRST);
748 output_asm_insn (\"multu\\t%1,%2\", operands);
749 output_asm_insn (mips_move_2words (xoperands, insn), xoperands);
752 [(set_attr "type" "imul")
753 (set_attr "mode" "SI")
754 (set_attr "length" "4")]) ;; mult + mflo + mfhi + delay
758 ;; ....................
760 ;; DIVISION and REMAINDER
762 ;; ....................
765 (define_insn "divdf3"
766 [(set (match_operand:DF 0 "register_operand" "=f")
767 (div:DF (match_operand:DF 1 "register_operand" "f")
768 (match_operand:DF 2 "register_operand" "f")))]
771 [(set_attr "type" "fdiv")
772 (set_attr "mode" "DF")
773 (set_attr "length" "1")])
775 (define_insn "divsf3"
776 [(set (match_operand:SF 0 "register_operand" "=f")
777 (div:SF (match_operand:SF 1 "register_operand" "f")
778 (match_operand:SF 2 "register_operand" "f")))]
781 [(set_attr "type" "fdiv")
782 (set_attr "mode" "SF")
783 (set_attr "length" "1")])
785 ;; If optimizing, prefer the divmod functions over separate div and
786 ;; mod functions, since this will allow using one instruction for both
787 ;; the quotient and remainder. At present, the divmod is not moved out
788 ;; of loops if it is constant within the loop, so allow -mdebugc to
789 ;; use the old method of doing things.
791 ;; 64 is the multiply/divide hi register
792 ;; 65 is the multiply/divide lo register
794 (define_insn "divmodsi4"
795 [(set (match_operand:SI 0 "register_operand" "=d")
796 (div:SI (match_operand:SI 1 "register_operand" "d")
797 (match_operand:SI 2 "register_operand" "d")))
798 (set (match_operand:SI 3 "register_operand" "=d")
799 (mod:SI (match_dup 1)
801 (clobber (reg:SI 64))
802 (clobber (reg:SI 65))]
806 if (find_reg_note (insn, REG_UNUSED, operands[3]))
807 return \"div\\t%0,%1,%2\";
809 if (find_reg_note (insn, REG_UNUSED, operands[0]))
810 return \"rem\\t%3,%1,%2\";
812 return \"div\\t%0,%1,%2\;mfhi\\t%3\";
814 [(set_attr "type" "idiv")
815 (set_attr "mode" "SI")
816 (set_attr "length" "13")]) ;; various tests for dividing by 0 and such
818 (define_insn "udivmodsi4"
819 [(set (match_operand:SI 0 "register_operand" "=d")
820 (udiv:SI (match_operand:SI 1 "register_operand" "d")
821 (match_operand:SI 2 "register_operand" "d")))
822 (set (match_operand:SI 3 "register_operand" "=d")
823 (umod:SI (match_dup 1)
825 (clobber (reg:SI 64))
826 (clobber (reg:SI 65))]
830 if (find_reg_note (insn, REG_UNUSED, operands[3]))
831 return \"divu\\t%0,%1,%2\";
833 if (find_reg_note (insn, REG_UNUSED, operands[0]))
834 return \"remu\\t%3,%1,%2\";
836 return \"divu\\t%0,%1,%2\;mfhi\\t%3\";
838 [(set_attr "type" "idiv")
839 (set_attr "mode" "SI")
840 (set_attr "length" "13")]) ;; various tests for dividing by 0 and such
842 (define_insn "divsi3"
843 [(set (match_operand:SI 0 "register_operand" "=d")
844 (div:SI (match_operand:SI 1 "register_operand" "d")
845 (match_operand:SI 2 "register_operand" "d")))
846 (clobber (reg:SI 64))
847 (clobber (reg:SI 65))]
850 [(set_attr "type" "idiv")
851 (set_attr "mode" "SI")
852 (set_attr "length" "13")]) ;; various tests for dividing by 0 and such
854 (define_insn "modsi3"
855 [(set (match_operand:SI 0 "register_operand" "=d")
856 (mod:SI (match_operand:SI 1 "register_operand" "d")
857 (match_operand:SI 2 "register_operand" "d")))
858 (clobber (reg:SI 64))
859 (clobber (reg:SI 65))]
862 [(set_attr "type" "idiv")
863 (set_attr "mode" "SI")
864 (set_attr "length" "14")]) ;; various tests for dividing by 0 and such
866 (define_insn "udivsi3"
867 [(set (match_operand:SI 0 "register_operand" "=d")
868 (udiv:SI (match_operand:SI 1 "register_operand" "d")
869 (match_operand:SI 2 "register_operand" "d")))
870 (clobber (reg:SI 64))
871 (clobber (reg:SI 65))]
874 [(set_attr "type" "idiv")
875 (set_attr "mode" "SI")
876 (set_attr "length" "14")]) ;; various tests for dividing by 0 and such
878 (define_insn "umodsi3"
879 [(set (match_operand:SI 0 "register_operand" "=d")
880 (umod:SI (match_operand:SI 1 "register_operand" "d")
881 (match_operand:SI 2 "register_operand" "d")))
882 (clobber (reg:SI 64))
883 (clobber (reg:SI 65))]
886 [(set_attr "type" "idiv")
887 (set_attr "mode" "SI")
888 (set_attr "length" "14")]) ;; various tests for dividing by 0 and such
892 ;; ....................
896 ;; ....................
898 (define_insn "sqrtdf2"
899 [(set (match_operand:DF 0 "register_operand" "=f")
900 (sqrt:DF (match_operand:DF 1 "register_operand" "f")))]
901 "TARGET_HARD_FLOAT && HAVE_SQRT_P()"
903 [(set_attr "type" "fabs")
904 (set_attr "mode" "DF")
905 (set_attr "length" "1")])
907 (define_insn "sqrtsf2"
908 [(set (match_operand:SF 0 "register_operand" "=f")
909 (sqrt:SF (match_operand:SF 1 "register_operand" "f")))]
910 "TARGET_HARD_FLOAT && HAVE_SQRT_P()"
912 [(set_attr "type" "fabs")
913 (set_attr "mode" "SF")
914 (set_attr "length" "1")])
918 ;; ....................
922 ;; ....................
924 ;; Do not use the integer abs macro instruction, since that signals an
925 ;; exception on -2147483648 (sigh).
927 (define_insn "abssi2"
928 [(set (match_operand:SI 0 "register_operand" "=d")
929 (abs:SI (match_operand:SI 1 "register_operand" "d")))]
934 dslots_jump_filled++;
935 operands[2] = const0_rtx;
937 return (REGNO (operands[0]) == REGNO (operands[1]))
938 ? \"bgez\\t%1,1f%#\\n\\tsubu\\t%0,%z2,%0\\n1:\"
939 : \"%(bgez\\t%1,1f\\n\\tmove\\t%0,%1\\n\\tsubu\\t%0,%z2,%0\\n1:%)\";
941 [(set_attr "type" "multi")
942 (set_attr "mode" "SI")
943 (set_attr "length" "3")])
945 (define_insn "absdf2"
946 [(set (match_operand:DF 0 "register_operand" "=f")
947 (abs:DF (match_operand:DF 1 "register_operand" "f")))]
950 [(set_attr "type" "fabs")
951 (set_attr "mode" "DF")
952 (set_attr "length" "1")])
954 (define_insn "abssf2"
955 [(set (match_operand:SF 0 "register_operand" "=f")
956 (abs:SF (match_operand:SF 1 "register_operand" "f")))]
959 [(set_attr "type" "fabs")
960 (set_attr "mode" "SF")
961 (set_attr "length" "1")])
965 ;; ....................
967 ;; FIND FIRST BIT INSTRUCTION
969 ;; ....................
972 (define_insn "ffssi2"
973 [(set (match_operand:SI 0 "register_operand" "=&d")
974 (ffs:SI (match_operand:SI 1 "register_operand" "d")))
975 (clobber (match_scratch:SI 2 "d"))
976 (clobber (match_scratch:SI 3 "d"))]
980 dslots_jump_total += 2;
981 dslots_jump_filled += 2;
982 operands[4] = const0_rtx;
984 if (optimize && find_reg_note (insn, REG_DEAD, operands[1]))
987 \\tbeq\\t%1,%z4,2f\\n\\
988 1:\\tand\\t%2,%1,0x0001\\n\\
989 \\taddu\\t%0,%0,1\\n\\
990 \\tbeq\\t%2,%z4,1b\\n\\
991 \\tsrl\\t%1,%1,1\\n\\
997 \\tbeq\\t%3,%z4,2f\\n\\
998 1:\\tand\\t%2,%3,0x0001\\n\\
999 \\taddu\\t%0,%0,1\\n\\
1000 \\tbeq\\t%2,%z4,1b\\n\\
1001 \\tsrl\\t%3,%3,1\\n\\
1004 [(set_attr "type" "multi")
1005 (set_attr "mode" "SI")
1006 (set_attr "length" "6")])
1010 ;; ....................
1012 ;; NEGATION and ONE'S COMPLEMENT
1014 ;; ....................
1016 (define_insn "negsi2"
1017 [(set (match_operand:SI 0 "register_operand" "=d")
1018 (neg:SI (match_operand:SI 1 "register_operand" "d")))]
1022 operands[2] = const0_rtx;
1023 return \"subu\\t%0,%z2,%1\";
1025 [(set_attr "type" "arith")
1026 (set_attr "mode" "SI")
1027 (set_attr "length" "1")])
1029 (define_expand "negdi3"
1030 [(parallel [(set (match_operand:DI 0 "register_operand" "=d")
1031 (neg:DI (match_operand:DI 1 "register_operand" "d")))
1032 (clobber (match_dup 2))])]
1033 "!TARGET_DEBUG_G_MODE"
1034 "operands[2] = gen_reg_rtx (SImode);")
1036 (define_insn "negdi3_internal"
1037 [(set (match_operand:DI 0 "register_operand" "=d")
1038 (neg:DI (match_operand:DI 1 "register_operand" "d")))
1039 (clobber (match_operand:SI 2 "register_operand" "=d"))]
1040 "!TARGET_DEBUG_G_MODE"
1043 operands[3] = const0_rtx;
1044 return \"subu\\t%L0,%z3,%L1\;subu\\t%M0,%z3,%M1\;sltu\\t%2,%z3,%L0\;subu\\t%M0,%M0,%2\";
1046 [(set_attr "type" "darith")
1047 (set_attr "mode" "DI")
1048 (set_attr "length" "4")])
1050 (define_insn "negdf2"
1051 [(set (match_operand:DF 0 "register_operand" "=f")
1052 (neg:DF (match_operand:DF 1 "register_operand" "f")))]
1055 [(set_attr "type" "fneg")
1056 (set_attr "mode" "DF")
1057 (set_attr "length" "1")])
1059 (define_insn "negsf2"
1060 [(set (match_operand:SF 0 "register_operand" "=f")
1061 (neg:SF (match_operand:SF 1 "register_operand" "f")))]
1064 [(set_attr "type" "fneg")
1065 (set_attr "mode" "SF")
1066 (set_attr "length" "1")])
1068 (define_insn "one_cmplsi2"
1069 [(set (match_operand:SI 0 "register_operand" "=d")
1070 (not:SI (match_operand:SI 1 "register_operand" "d")))]
1074 operands[2] = const0_rtx;
1075 return \"nor\\t%0,%z2,%1\";
1077 [(set_attr "type" "arith")
1078 (set_attr "mode" "SI")
1079 (set_attr "length" "1")])
1081 (define_insn "one_cmpldi2"
1082 [(set (match_operand:DI 0 "register_operand" "=d")
1083 (not:SI (match_operand:DI 1 "register_operand" "d")))]
1087 operands[2] = const0_rtx;
1088 return \"nor\\t%M0,%z2,%M1\;nor\\t%L0,%z2,%L1\";
1090 [(set_attr "type" "darith")
1091 (set_attr "mode" "DI")
1092 (set_attr "length" "2")])
1095 [(set (match_operand:DI 0 "register_operand" "")
1096 (not:DI (match_operand:DI 1 "register_operand" "")))]
1097 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1098 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1099 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))"
1101 [(set (subreg:SI (match_dup 0) 0) (not:SI (subreg:SI (match_dup 1) 0)))
1102 (set (subreg:SI (match_dup 0) 1) (not:SI (subreg:SI (match_dup 1) 1)))]
1105 ;; Simple hack to recognize the "nor" instruction on the MIPS
1106 ;; This must appear before the normal or patterns, so that the
1107 ;; combiner will correctly fold things.
1109 (define_insn "norsi3"
1110 [(set (match_operand:SI 0 "register_operand" "=d")
1111 (not:SI (ior:SI (match_operand:SI 1 "reg_or_0_operand" "dJ")
1112 (match_operand:SI 2 "reg_or_0_operand" "dJ"))))]
1115 [(set_attr "type" "arith")
1116 (set_attr "mode" "SI")
1117 (set_attr "length" "1")])
1119 (define_insn "nordi3"
1120 [(set (match_operand:DI 0 "register_operand" "=d")
1121 (not:DI (ior:DI (match_operand:DI 1 "register_operand" "d")
1122 (match_operand:DI 2 "register_operand" "d"))))]
1124 "nor\\t%M0,%M1,%M2\;nor\\t%L0,%L1,%L2"
1125 [(set_attr "type" "darith")
1126 (set_attr "mode" "DI")
1127 (set_attr "length" "2")])
1130 [(set (match_operand:DI 0 "register_operand" "")
1131 (not:DI (ior:DI (match_operand:DI 1 "register_operand" "")
1132 (match_operand:DI 2 "register_operand" ""))))]
1133 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1134 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1135 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1136 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1138 [(set (subreg:SI (match_dup 0) 0) (not:SI (ior:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0))))
1139 (set (subreg:SI (match_dup 0) 1) (not:SI (ior:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1))))]
1144 ;; ....................
1148 ;; ....................
1151 ;; Be more liberal in allowing logical operations than the machine actually
1152 ;; supports. This causes better code to be generated for bitfields, since
1153 ;; the optimizer can fold things together, at the expense of not moving the
1154 ;; constant out of loops.
1156 (define_insn "andsi3"
1157 [(set (match_operand:SI 0 "register_operand" "=d,d,?d,?d")
1158 (and:SI (match_operand:SI 1 "arith32_operand" "%d,d,d,d")
1159 (match_operand:SI 2 "arith32_operand" "d,K,I,M")))]
1164 %[li\\t%@,%X2\;and\\t%0,%1,%@%]
1165 %[li\\t%@,%X2\;and\\t%0,%1,%@%]"
1166 [(set_attr "type" "arith,arith,multi,multi")
1167 (set_attr "mode" "SI")
1168 (set_attr "length" "1,1,2,3")])
1170 (define_insn "anddi3"
1171 [(set (match_operand:DI 0 "register_operand" "=d")
1172 (and:DI (match_operand:DI 1 "register_operand" "d")
1173 (match_operand:DI 2 "register_operand" "d")))]
1174 "!TARGET_DEBUG_G_MODE"
1175 "and\\t%M0,%M1,%M2\;and\\t%L0,%L1,%L2"
1176 [(set_attr "type" "darith")
1177 (set_attr "mode" "DI")
1178 (set_attr "length" "2")])
1181 [(set (match_operand:DI 0 "register_operand" "")
1182 (and:DI (match_operand:DI 1 "register_operand" "")
1183 (match_operand:DI 2 "register_operand" "")))]
1184 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1185 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1186 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1187 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1189 [(set (subreg:SI (match_dup 0) 0) (and:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
1190 (set (subreg:SI (match_dup 0) 1) (and:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1)))]
1193 (define_insn "iorsi3"
1194 [(set (match_operand:SI 0 "register_operand" "=d,d,?d,?d")
1195 (ior:SI (match_operand:SI 1 "arith32_operand" "%d,d,d,d")
1196 (match_operand:SI 2 "arith32_operand" "d,K,I,M")))]
1201 %[li\\t%@,%X2\;or\\t%0,%1,%@%]
1202 %[li\\t%@,%X2\;or\\t%0,%1,%@%]"
1203 [(set_attr "type" "arith,arith,multi,multi")
1204 (set_attr "mode" "SI")
1205 (set_attr "length" "1,1,2,3")])
1207 (define_insn "iordi3"
1208 [(set (match_operand:DI 0 "register_operand" "=d")
1209 (ior:DI (match_operand:DI 1 "register_operand" "d")
1210 (match_operand:DI 2 "register_operand" "d")))]
1211 "!TARGET_DEBUG_G_MODE"
1212 "or\\t%M0,%M1,%M2\;or\\t%L0,%L1,%L2"
1213 [(set_attr "type" "darith")
1214 (set_attr "mode" "DI")
1215 (set_attr "length" "2")])
1218 [(set (match_operand:DI 0 "register_operand" "")
1219 (ior:DI (match_operand:DI 1 "register_operand" "")
1220 (match_operand:DI 2 "register_operand" "")))]
1221 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1222 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1223 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1224 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1226 [(set (subreg:SI (match_dup 0) 0) (ior:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
1227 (set (subreg:SI (match_dup 0) 1) (ior:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1)))]
1230 (define_insn "xorsi3"
1231 [(set (match_operand:SI 0 "register_operand" "=d,d,?d,?d")
1232 (xor:SI (match_operand:SI 1 "arith32_operand" "%d,d,d,d")
1233 (match_operand:SI 2 "arith32_operand" "d,K,I,M")))]
1238 %[li\\t%@,%X2\;xor\\t%0,%1,%@%]
1239 %[li\\t%@,%X2\;xor\\t%0,%1,%@%]"
1240 [(set_attr "type" "arith,arith,multi,multi")
1241 (set_attr "mode" "SI")
1242 (set_attr "length" "1,1,2,3")])
1244 (define_insn "xordi3"
1245 [(set (match_operand:DI 0 "register_operand" "=d")
1246 (xor:DI (match_operand:DI 1 "register_operand" "d")
1247 (match_operand:DI 2 "register_operand" "d")))]
1248 "!TARGET_DEBUG_G_MODE"
1249 "xor\\t%M0,%M1,%M2\;xor\\t%L0,%L1,%L2"
1250 [(set_attr "type" "darith")
1251 (set_attr "mode" "DI")
1252 (set_attr "length" "2")])
1255 [(set (match_operand:DI 0 "register_operand" "")
1256 (xor:DI (match_operand:DI 1 "register_operand" "")
1257 (match_operand:DI 2 "register_operand" "")))]
1258 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1259 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1260 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))
1261 && GET_CODE (operands[2]) == REG && GP_REG_P (REGNO (operands[2]))"
1263 [(set (subreg:SI (match_dup 0) 0) (xor:SI (subreg:SI (match_dup 1) 0) (subreg:SI (match_dup 2) 0)))
1264 (set (subreg:SI (match_dup 0) 1) (xor:SI (subreg:SI (match_dup 1) 1) (subreg:SI (match_dup 2) 1)))]
1269 ;; ....................
1273 ;; ....................
1275 (define_insn "truncdfsf2"
1276 [(set (match_operand:SF 0 "register_operand" "=f")
1277 (float_truncate:SF (match_operand:DF 1 "register_operand" "f")))]
1280 [(set_attr "type" "fcvt")
1281 (set_attr "mode" "SF")
1282 (set_attr "length" "1")])
1286 ;; ....................
1290 ;; ....................
1293 ;; Those for integer source operand
1294 ;; are ordered widest source type first.
1296 (define_insn "zero_extendhisi2"
1297 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
1298 (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "d,R,m")))]
1302 if (which_alternative == 0)
1303 return \"andi\\t%0,%1,0xffff\";
1305 return mips_move_1word (operands, insn, TRUE);
1307 [(set_attr "type" "arith,load,load")
1308 (set_attr "mode" "SI")
1309 (set_attr "length" "1,1,2")])
1311 (define_insn "zero_extendqihi2"
1312 [(set (match_operand:HI 0 "register_operand" "=d,d,d")
1313 (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
1317 if (which_alternative == 0)
1318 return \"andi\\t%0,%1,0x00ff\";
1320 return mips_move_1word (operands, insn, TRUE);
1322 [(set_attr "type" "arith,load,load")
1323 (set_attr "mode" "HI")
1324 (set_attr "length" "1,1,2")])
1326 (define_insn "zero_extendqisi2"
1327 [(set (match_operand:SI 0 "register_operand" "=d,d,d")
1328 (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "d,R,m")))]
1332 if (which_alternative == 0)
1333 return \"andi\\t%0,%1,0x00ff\";
1335 return mips_move_1word (operands, insn, TRUE);
1337 [(set_attr "type" "arith,load,load")
1338 (set_attr "mode" "SI")
1339 (set_attr "length" "1,1,2")])
1343 ;; ....................
1347 ;; ....................
1350 ;; Those for integer source operand
1351 ;; are ordered widest source type first.
1353 ;; These patterns originally accepted general_operands, however, slightly
1354 ;; better code is generated by only accepting register_operands, and then
1355 ;; letting combine generate the lh and lb insns.
1357 (define_expand "extendhisi2"
1358 [(set (match_operand:SI 0 "register_operand" "")
1359 (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
1363 if (optimize && GET_CODE (operands[1]) == MEM)
1364 operands[1] = force_not_mem (operands[1]);
1366 if (GET_CODE (operands[1]) != MEM)
1368 rtx op1 = gen_lowpart (SImode, operands[1]);
1369 rtx temp = gen_reg_rtx (SImode);
1370 rtx shift = gen_rtx (CONST_INT, VOIDmode, 16);
1372 emit_insn (gen_ashlsi3 (temp, op1, shift));
1373 emit_insn (gen_ashrsi3 (operands[0], temp, shift));
1378 (define_insn "extendhisi2_internal"
1379 [(set (match_operand:SI 0 "register_operand" "=d,d")
1380 (sign_extend:SI (match_operand:HI 1 "memory_operand" "R,m")))]
1382 "* return mips_move_1word (operands, insn, FALSE);"
1383 [(set_attr "type" "load")
1384 (set_attr "mode" "SI")
1385 (set_attr "length" "1,2")])
1387 (define_expand "extendqihi2"
1388 [(set (match_operand:HI 0 "register_operand" "")
1389 (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
1393 if (optimize && GET_CODE (operands[1]) == MEM)
1394 operands[1] = force_not_mem (operands[1]);
1396 if (GET_CODE (operands[1]) != MEM)
1398 rtx op0 = gen_lowpart (SImode, operands[0]);
1399 rtx op1 = gen_lowpart (SImode, operands[1]);
1400 rtx temp = gen_reg_rtx (SImode);
1401 rtx shift = gen_rtx (CONST_INT, VOIDmode, 24);
1403 emit_insn (gen_ashlsi3 (temp, op1, shift));
1404 emit_insn (gen_ashrsi3 (op0, temp, shift));
1409 (define_insn "extendqihi2_internal"
1410 [(set (match_operand:HI 0 "register_operand" "=d,d")
1411 (sign_extend:HI (match_operand:QI 1 "memory_operand" "R,m")))]
1413 "* return mips_move_1word (operands, insn, FALSE);"
1414 [(set_attr "type" "load")
1415 (set_attr "mode" "SI")
1416 (set_attr "length" "1,2")])
1419 (define_expand "extendqisi2"
1420 [(set (match_operand:SI 0 "register_operand" "")
1421 (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
1425 if (optimize && GET_CODE (operands[1]) == MEM)
1426 operands[1] = force_not_mem (operands[1]);
1428 if (GET_CODE (operands[1]) != MEM)
1430 rtx op1 = gen_lowpart (SImode, operands[1]);
1431 rtx temp = gen_reg_rtx (SImode);
1432 rtx shift = gen_rtx (CONST_INT, VOIDmode, 24);
1434 emit_insn (gen_ashlsi3 (temp, op1, shift));
1435 emit_insn (gen_ashrsi3 (operands[0], temp, shift));
1440 (define_insn "extendqisi2_insn"
1441 [(set (match_operand:SI 0 "register_operand" "=d,d")
1442 (sign_extend:SI (match_operand:QI 1 "memory_operand" "R,m")))]
1444 "* return mips_move_1word (operands, insn, FALSE);"
1445 [(set_attr "type" "load")
1446 (set_attr "mode" "SI")
1447 (set_attr "length" "1,2")])
1450 (define_insn "extendsfdf2"
1451 [(set (match_operand:DF 0 "register_operand" "=f")
1452 (float_extend:DF (match_operand:SF 1 "register_operand" "f")))]
1455 [(set_attr "type" "fcvt")
1456 (set_attr "mode" "DF")
1457 (set_attr "length" "1")])
1462 ;; ....................
1466 ;; ....................
1468 (define_insn "fix_truncdfsi2_internal"
1469 [(set (match_operand:SI 0 "general_operand" "=d,*f,R,o")
1470 (fix:SI (match_operand:DF 1 "register_operand" "f,*f,f,f")))
1471 (clobber (match_operand:SI 2 "register_operand" "d,*d,d,d"))
1472 (clobber (match_operand:DF 3 "register_operand" "f,*f,f,f"))]
1478 if (which_alternative == 1)
1479 return \"trunc.w.d %0,%1,%2\";
1481 output_asm_insn (\"trunc.w.d %3,%1,%2\", operands);
1483 xoperands[0] = operands[0];
1484 xoperands[1] = operands[3];
1485 output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands);
1488 [(set_attr "type" "fcvt")
1489 (set_attr "mode" "DF")
1490 (set_attr "length" "14,12,13,14")])
1493 (define_expand "fix_truncdfsi2"
1494 [(parallel [(set (match_operand:SI 0 "register_operand" "=d")
1495 (fix:SI (match_operand:DF 1 "register_operand" "f")))
1496 (clobber (match_dup 2))
1497 (clobber (match_dup 3))])]
1501 operands[2] = gen_reg_rtx (SImode); /* gp reg that saves FP status bits */
1502 operands[3] = gen_reg_rtx (DFmode); /* fp reg that gets the conversion */
1504 /* Fall through and generate default code */
1507 (define_insn "fix_truncsfsi2_internal"
1508 [(set (match_operand:SI 0 "general_operand" "=d,*f,R,o")
1509 (fix:SI (match_operand:SF 1 "register_operand" "f,*f,f,f")))
1510 (clobber (match_operand:SI 2 "register_operand" "d,*d,d,d"))
1511 (clobber (match_operand:SF 3 "register_operand" "f,*f,f,f"))]
1517 if (which_alternative == 1)
1518 return \"trunc.w.s %0,%1,%2\";
1520 output_asm_insn (\"trunc.w.s %3,%1,%2\", operands);
1522 xoperands[0] = operands[0];
1523 xoperands[1] = operands[3];
1524 output_asm_insn (mips_move_1word (xoperands, insn, FALSE), xoperands);
1527 [(set_attr "type" "fcvt")
1528 (set_attr "mode" "SF")
1529 (set_attr "length" "14,12,13,14")])
1532 (define_expand "fix_truncsfsi2"
1533 [(parallel [(set (match_operand:SI 0 "register_operand" "=f")
1534 (fix:SI (match_operand:SF 1 "register_operand" "f")))
1535 (clobber (match_dup 2))
1536 (clobber (match_dup 3))])]
1540 operands[2] = gen_reg_rtx (SImode); /* gp reg that saves FP status bits */
1541 operands[3] = gen_reg_rtx (SFmode); /* fp reg that gets the conversion */
1543 /* Fall through and generate default code */
1547 (define_insn "floatsidf2"
1548 [(set (match_operand:DF 0 "register_operand" "=f,f,f")
1549 (float:DF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))]
1553 dslots_load_total++;
1554 if (GET_CODE (operands[1]) == MEM)
1555 return \"l.s\\t%0,%1%#\;cvt.d.w\\t%0,%0\";
1557 return \"mtc1\\t%1,%0%#\;cvt.d.w\\t%0,%0\";
1559 [(set_attr "type" "fcvt")
1560 (set_attr "mode" "DF")
1561 (set_attr "length" "3,4,3")])
1563 (define_insn "floatsisf2"
1564 [(set (match_operand:SF 0 "register_operand" "=f,f,f")
1565 (float:SF (match_operand:SI 1 "nonimmediate_operand" "d,R,m")))]
1569 dslots_load_total++;
1570 if (GET_CODE (operands[1]) == MEM)
1571 return \"l.s\\t%0,%1%#\;cvt.s.w\\t%0,%0\";
1573 return \"mtc1\\t%1,%0%#\;cvt.s.w\\t%0,%0\";
1575 [(set_attr "type" "fcvt")
1576 (set_attr "mode" "SF")
1577 (set_attr "length" "3,4,3")])
1580 (define_expand "fixuns_truncdfsi2"
1581 [(set (match_operand:SI 0 "register_operand" "")
1582 (unsigned_fix:SI (match_operand:DF 1 "register_operand" "")))]
1586 rtx reg1 = gen_reg_rtx (DFmode);
1587 rtx reg2 = gen_reg_rtx (DFmode);
1588 rtx reg3 = gen_reg_rtx (SImode);
1589 rtx label1 = gen_label_rtx ();
1590 rtx label2 = gen_label_rtx ();
1591 REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 31);
1593 if (reg1) /* turn off complaints about unreached code */
1595 extern rtx gen_cmpdf ();
1596 emit_move_insn (reg1, immed_real_const_1 (offset, DFmode));
1597 do_pending_stack_adjust ();
1599 emit_insn (gen_cmpdf (operands[1], reg1));
1600 emit_jump_insn (gen_bge (label1));
1602 emit_insn (gen_fix_truncdfsi2 (operands[0], operands[1]));
1603 emit_jump_insn (gen_rtx (SET, VOIDmode, pc_rtx,
1604 gen_rtx (LABEL_REF, VOIDmode, label2)));
1607 emit_label (label1);
1608 emit_move_insn (reg2, gen_rtx (MINUS, DFmode, operands[1], reg1));
1609 emit_move_insn (reg3, gen_rtx (CONST_INT, VOIDmode, 0x80000000));
1611 emit_insn (gen_fix_truncdfsi2 (operands[0], reg2));
1612 emit_insn (gen_iorsi3 (operands[0], operands[0], reg3));
1614 emit_label (label2);
1616 /* allow REG_NOTES to be set on last insn (labels don't have enough
1617 fields, and can't be used for REG_NOTES anyway). */
1618 emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx));
1623 (define_expand "fixuns_truncsfsi2"
1624 [(set (match_operand:SI 0 "register_operand" "")
1625 (unsigned_fix:SI (match_operand:SF 1 "register_operand" "")))]
1629 rtx reg1 = gen_reg_rtx (SFmode);
1630 rtx reg2 = gen_reg_rtx (SFmode);
1631 rtx reg3 = gen_reg_rtx (SImode);
1632 rtx label1 = gen_label_rtx ();
1633 rtx label2 = gen_label_rtx ();
1634 REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (1.0, 31);
1636 if (reg1) /* turn off complaints about unreached code */
1638 extern rtx gen_cmpsf ();
1639 emit_move_insn (reg1, immed_real_const_1 (offset, SFmode));
1640 do_pending_stack_adjust ();
1642 emit_insn (gen_cmpsf (operands[1], reg1));
1643 emit_jump_insn (gen_bge (label1));
1645 emit_insn (gen_fix_truncsfsi2 (operands[0], operands[1]));
1646 emit_jump_insn (gen_rtx (SET, VOIDmode, pc_rtx,
1647 gen_rtx (LABEL_REF, VOIDmode, label2)));
1650 emit_label (label1);
1651 emit_move_insn (reg2, gen_rtx (MINUS, SFmode, operands[1], reg1));
1652 emit_move_insn (reg3, gen_rtx (CONST_INT, VOIDmode, 0x80000000));
1654 emit_insn (gen_fix_truncsfsi2 (operands[0], reg2));
1655 emit_insn (gen_iorsi3 (operands[0], operands[0], reg3));
1657 emit_label (label2);
1659 /* allow REG_NOTES to be set on last insn (labels don't have enough
1660 fields, and can't be used for REG_NOTES anyway). */
1661 emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx));
1668 ;; ....................
1672 ;; ....................
1674 ;; unaligned word moves generated by the block moves.
1676 (define_expand "movsi_unaligned"
1677 [(set (match_operand:SI 0 "general_operand" "")
1678 (unspec [(match_operand:SI 1 "general_operand" "")] 0))]
1682 extern rtx gen_movsi_ulw ();
1683 extern rtx gen_movsi ();
1686 if (GET_CODE (operands[0]) == MEM)
1688 rtx reg = gen_reg_rtx (SImode);
1689 rtx insn = emit_insn (gen_movsi_ulw (reg, operands[1]));
1690 rtx addr = XEXP (operands[0], 0);
1691 if (CONSTANT_P (addr))
1692 REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_EQUIV, addr, REG_NOTES (insn));
1694 if (reg_or_0_operand (operands[1], SImode))
1700 /* Generate appropriate load, store. If not a load or store,
1701 do a normal movsi. */
1702 if (GET_CODE (operands[0]) != MEM && GET_CODE (operands[1]) != MEM)
1704 emit_insn (gen_movsi (operands[0], operands[1]));
1708 /* Fall through and generate normal code. */
1711 (define_insn "movsi_ulw"
1712 [(set (match_operand:SI 0 "register_operand" "=&d,&d,d,d")
1713 (unspec [(match_operand:SI 1 "general_operand" "R,o,dIKL,M")] 0))]
1717 extern rtx eliminate_constant_term ();
1724 if (which_alternative != 0)
1725 return mips_move_1word (operands, insn, FALSE);
1728 mips_count_memory_refs (operands[1], 2);
1730 /* The stack/frame pointers are always aligned, so we can convert
1731 to the faster lw if we are referencing an aligned stack location. */
1733 offset = const0_rtx;
1734 addr = XEXP (operands[1], 0);
1735 mem_addr = eliminate_constant_term (addr, &offset);
1737 if ((INTVAL (offset) & (UNITS_PER_WORD-1)) == 0
1738 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
1739 ret = \"lw\\t%0,%1\";
1743 ret = \"ulw\\t%0,%1\";
1746 enum rtx_code code = GET_CODE (addr);
1748 if (code == CONST || code == SYMBOL_REF || code == LABEL_REF)
1750 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 1);
1751 ret = \"%[la\\t%2,%1\;ulw\\t%0,0(%2)%]\";
1756 return mips_fill_delay_slot (ret, DELAY_LOAD, operands, insn);
1758 [(set_attr "type" "load,load,move,arith")
1759 (set_attr "mode" "SI")
1760 (set_attr "length" "2,4,1,2")])
1762 (define_insn "movsi_usw"
1763 [(set (match_operand:SI 0 "memory_operand" "=R,o")
1764 (unspec [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")] 0))]
1768 extern rtx eliminate_constant_term ();
1769 rtx offset = const0_rtx;
1770 rtx addr = XEXP (operands[0], 0);
1771 rtx mem_addr = eliminate_constant_term (addr, &offset);
1774 mips_count_memory_refs (operands[0], 2);
1776 /* The stack/frame pointers are always aligned, so we can convert
1777 to the faster sw if we are referencing an aligned stack location. */
1779 if ((INTVAL (offset) & (UNITS_PER_WORD-1)) == 0
1780 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx))
1781 return \"sw\\t%1,%0\";
1786 enum rtx_code code = GET_CODE (XEXP (operands[0], 0));
1788 if (code == CONST || code == SYMBOL_REF || code == LABEL_REF)
1790 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 1);
1791 return \"%[la\\t%2,%0\;usw\\t%z1,0(%2)%]\";
1795 return \"usw\\t%z1,%0\";
1797 [(set_attr "type" "store")
1798 (set_attr "mode" "SI")
1799 (set_attr "length" "2,4")])
1801 ;; 64-bit integer moves
1803 ;; Unlike most other insns, the move insns can't be split with
1804 ;; different predicates, because register spilling and other parts of
1805 ;; the compiler, have memoized the insn number already.
1807 (define_insn "movdi"
1808 [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,R,o,*d,*x")
1809 (match_operand:DI 1 "general_operand" "d,iF,R,o,d,d,*x,*d"))]
1811 "* return mips_move_2words (operands, insn); "
1812 [(set_attr "type" "move,arith,load,load,store,store,hilo,hilo")
1813 (set_attr "mode" "DI")
1814 (set_attr "length" "2,4,2,4,2,4,2,2")])
1817 [(set (match_operand:DI 0 "register_operand" "")
1818 (match_operand:DI 1 "register_operand" ""))]
1819 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1820 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1821 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))"
1823 [(set (subreg:SI (match_dup 0) 0) (subreg:SI (match_dup 1) 0))
1824 (set (subreg:SI (match_dup 0) 1) (subreg:SI (match_dup 1) 1))]
1828 ;; 32-bit Integer moves
1831 [(set (match_operand:SI 0 "register_operand" "")
1832 (match_operand:SI 1 "large_int" ""))]
1833 "!TARGET_DEBUG_D_MODE"
1837 (ior:SI (match_dup 0)
1841 operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) & 0xffff0000);
1842 operands[3] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) & 0x0000ffff);
1845 ;; Unlike most other insns, the move insns can't be split with
1846 ;; different predicates, because register spilling and other parts of
1847 ;; the compiler, have memoized the insn number already.
1849 (define_expand "movsi"
1850 [(set (match_operand:SI 0 "nonimmediate_operand" "")
1851 (match_operand:SI 1 "general_operand" ""))]
1855 /* If this is a half-pic address being moved to a register, convert the
1856 address into a load, so that scheduling and stuff works properly. */
1859 && GET_CODE (operands[0]) == REG
1860 && GET_CODE (operands[1]) == SYMBOL_REF
1861 && HALF_PIC_ADDRESS_P (operands[1]))
1863 rtx ptr = HALF_PIC_PTR (operands[1]);
1864 if (XSTR (ptr, 0) != XSTR (operands[1], 0))
1866 emit_move_insn (operands[0], gen_rtx (MEM, Pmode, ptr));
1872 (define_insn "movsi_internal"
1873 [(set (match_operand:SI 0 "nonimmediate_operand" "=d,d,d,d,d,d,R,m,*d,*fz,*f,*f,*f,*R,*m,*x,*d")
1874 (match_operand:SI 1 "general_operand" "d,S,IKL,Mnis,R,m,dJ,dJ,*fz,*d,*f,*R,*m,*f,*f,*d,*x"))]
1876 "* return mips_move_1word (operands, insn, TRUE);"
1877 [(set_attr "type" "move,pic,arith,arith,load,load,store,store,xfer,xfer,move,load,load,store,store,hilo,hilo")
1878 (set_attr "mode" "SI")
1879 (set_attr "length" "1,4,1,2,1,2,1,2,1,1,1,1,2,1,2,1,1")])
1881 ;; 16-bit Integer moves
1883 ;; Unlike most other insns, the move insns can't be split with
1884 ;; different predicates, because register spilling and other parts of
1885 ;; the compiler, have memoized the insn number already.
1886 ;; Unsigned loads are used because BYTE_LOADS_ZERO_EXTEND is defined
1888 (define_insn "movhi"
1889 [(set (match_operand:HI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f,*f,*x,*d")
1890 (match_operand:HI 1 "general_operand" "d,IK,R,m,dJ,dJ,*fz,*d,*f,*d,*x"))]
1892 "* return mips_move_1word (operands, insn, TRUE);"
1893 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,hilo,hilo")
1894 (set_attr "mode" "HI")
1895 (set_attr "length" "1,1,1,2,1,2,1,1,1,1,1")])
1897 ;; 8-bit Integer moves
1899 ;; Unlike most other insns, the move insns can't be split with
1900 ;; different predicates, because register spilling and other parts of
1901 ;; the compiler, have memoized the insn number already.
1902 ;; Unsigned loads are used because BYTE_LOADS_ZERO_EXTEND is defined
1904 (define_insn "movqi"
1905 [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,m,*d,*f,*f,*x,*d")
1906 (match_operand:QI 1 "general_operand" "d,IK,R,m,dJ,dJ,*fz,*d,*f,*d,*x"))]
1908 "* return mips_move_1word (operands, insn, TRUE);"
1909 [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,hilo,hilo")
1910 (set_attr "mode" "QI")
1911 (set_attr "length" "1,1,1,2,1,2,1,1,1,1,1")])
1914 ;; 32-bit floating point moves
1916 (define_insn "movsf"
1917 [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,f,f,R,m,*f,*d,*d,*d,*d,*R,*m")
1918 (match_operand:SF 1 "general_operand" "f,G,R,Em,fG,fG,*d,*f,*Gd,*R,*Em,*d,*d"))]
1920 "* return mips_move_1word (operands, insn, FALSE);"
1921 [(set_attr "type" "move,xfer,load,load,store,store,xfer,xfer,move,load,load,store,store")
1922 (set_attr "mode" "SF")
1923 (set_attr "length" "1,1,1,2,1,2,1,1,1,1,2,1,2")])
1925 ;; 64-bit floating point moves
1927 (define_insn "movdf"
1928 [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,R,o,f,*f,*d,*d,*d,*d,*R,*o")
1929 (match_operand:DF 1 "general_operand" "f,R,o,fG,fG,E,*d,*f,*dG,*R,*oE,*d,*d"))]
1931 "* return mips_move_2words (operands, insn); "
1932 [(set_attr "type" "move,load,load,store,store,load,xfer,xfer,move,load,load,store,store")
1933 (set_attr "mode" "DF")
1934 (set_attr "length" "1,2,4,2,4,4,2,2,2,2,4,2,4")])
1937 [(set (match_operand:DF 0 "register_operand" "")
1938 (match_operand:DF 1 "register_operand" ""))]
1939 "reload_completed && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
1940 && GET_CODE (operands[0]) == REG && GP_REG_P (REGNO (operands[0]))
1941 && GET_CODE (operands[1]) == REG && GP_REG_P (REGNO (operands[1]))"
1943 [(set (subreg:SI (match_dup 0) 0) (subreg:SI (match_dup 1) 0))
1944 (set (subreg:SI (match_dup 0) 1) (subreg:SI (match_dup 1) 1))]
1948 ;; Block moves, see mips.c for more details.
1949 ;; Argument 0 is the destination
1950 ;; Argument 1 is the source
1951 ;; Argument 2 is the length
1952 ;; Argument 3 is the alignment
1954 (define_expand "movstrsi"
1955 [(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" ""))
1956 (mem:BLK (match_operand:BLK 1 "general_operand" "")))
1957 (use (match_operand:SI 2 "arith32_operand" ""))
1958 (use (match_operand:SI 3 "immediate_operand" ""))])]
1962 if (operands[0]) /* avoid unused code messages */
1964 expand_block_move (operands);
1969 ;; Insn generated by block moves
1971 (define_insn "movstrsi_internal"
1972 [(set (match_operand:BLK 0 "memory_operand" "=Ro") ;; destination
1973 (match_operand:BLK 1 "memory_operand" "Ro")) ;; source
1974 (clobber (match_scratch:SI 4 "=&d")) ;; temp 1
1975 (clobber (match_scratch:SI 5 "=&d")) ;; temp 2
1976 (clobber (match_scratch:SI 6 "=&d")) ;; temp 3
1977 (clobber (match_scratch:SI 7 "=&d")) ;; temp 4
1978 (use (match_operand:SI 2 "small_int" "I")) ;; # bytes to move
1979 (use (match_operand:SI 3 "small_int" "I")) ;; alignment
1980 (use (const_int 0))] ;; normal block move
1982 "* return output_block_move (insn, operands, 4, BLOCK_MOVE_NORMAL);"
1983 [(set_attr "type" "multi")
1984 (set_attr "mode" "none")
1985 (set_attr "length" "20")])
1987 ;; Split a block move into 2 parts, the first part is everything
1988 ;; except for the last move, and the second part is just the last
1989 ;; store, which is exactly 1 instruction (ie, not a usw), so it can
1990 ;; fill a delay slot. This also prevents a bug in delayed branches
1991 ;; from showing up, which reuses one of the registers in our clobbers.
1994 [(set (mem:BLK (match_operand:SI 0 "register_operand" ""))
1995 (mem:BLK (match_operand:SI 1 "register_operand" "")))
1996 (clobber (match_operand:SI 4 "register_operand" ""))
1997 (clobber (match_operand:SI 5 "register_operand" ""))
1998 (clobber (match_operand:SI 6 "register_operand" ""))
1999 (clobber (match_operand:SI 7 "register_operand" ""))
2000 (use (match_operand:SI 2 "small_int" ""))
2001 (use (match_operand:SI 3 "small_int" ""))
2002 (use (const_int 0))]
2004 "reload_completed && !TARGET_DEBUG_D_MODE && INTVAL (operands[2]) > 0"
2006 ;; All but the last move
2007 [(parallel [(set (mem:BLK (match_dup 0))
2008 (mem:BLK (match_dup 1)))
2009 (clobber (match_dup 4))
2010 (clobber (match_dup 5))
2011 (clobber (match_dup 6))
2012 (clobber (match_dup 7))
2015 (use (const_int 1))])
2017 ;; The last store, so it can fill a delay slot
2018 (parallel [(set (mem:BLK (match_dup 0))
2019 (mem:BLK (match_dup 1)))
2020 (clobber (match_dup 4))
2021 (clobber (match_dup 5))
2022 (clobber (match_dup 6))
2023 (clobber (match_dup 7))
2026 (use (const_int 2))])]
2030 (define_insn "movstrsi_internal2"
2031 [(set (match_operand:BLK 0 "memory_operand" "=Ro") ;; destination
2032 (match_operand:BLK 1 "memory_operand" "Ro")) ;; source
2033 (clobber (match_scratch:SI 4 "=&d")) ;; temp 1
2034 (clobber (match_scratch:SI 5 "=&d")) ;; temp 2
2035 (clobber (match_scratch:SI 6 "=&d")) ;; temp 3
2036 (clobber (match_scratch:SI 7 "=&d")) ;; temp 4
2037 (use (match_operand:SI 2 "small_int" "I")) ;; # bytes to move
2038 (use (match_operand:SI 3 "small_int" "I")) ;; alignment
2039 (use (const_int 1))] ;; all but last store
2041 "* return output_block_move (insn, operands, 4, BLOCK_MOVE_NOT_LAST);"
2042 [(set_attr "type" "multi")
2043 (set_attr "mode" "none")
2044 (set_attr "length" "20")])
2046 (define_insn "movstrsi_internal3"
2047 [(set (match_operand:BLK 0 "memory_operand" "=Ro") ;; destination
2048 (match_operand:BLK 1 "memory_operand" "Ro")) ;; source
2049 (clobber (match_scratch:SI 4 "=&d")) ;; temp 1
2050 (clobber (match_scratch:SI 5 "=&d")) ;; temp 2
2051 (clobber (match_scratch:SI 6 "=&d")) ;; temp 3
2052 (clobber (match_scratch:SI 7 "=&d")) ;; temp 4
2053 (use (match_operand:SI 2 "small_int" "I")) ;; # bytes to move
2054 (use (match_operand:SI 3 "small_int" "I")) ;; alignment
2055 (use (const_int 2))] ;; just last store of block mvoe
2057 "* return output_block_move (insn, operands, 4, BLOCK_MOVE_LAST);"
2058 [(set_attr "type" "store")
2059 (set_attr "mode" "none")
2060 (set_attr "length" "1")])
2064 ;; ....................
2068 ;; ....................
2070 (define_insn "ashlsi3"
2071 [(set (match_operand:SI 0 "register_operand" "=d")
2072 (ashift:SI (match_operand:SI 1 "register_operand" "d")
2073 (match_operand:SI 2 "arith_operand" "dI")))]
2077 if (GET_CODE (operands[2]) == CONST_INT)
2078 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2080 return \"sll\\t%0,%1,%2\";
2082 [(set_attr "type" "arith")
2083 (set_attr "mode" "SI")
2084 (set_attr "length" "1")])
2087 (define_expand "ashldi3"
2088 [(parallel [(set (match_operand:DI 0 "register_operand" "")
2089 (ashift:DI (match_operand:DI 1 "register_operand" "")
2090 (match_operand:SI 2 "arith_operand" "")))
2091 (clobber (match_dup 3))])]
2092 "!TARGET_DEBUG_G_MODE"
2093 "operands[3] = gen_reg_rtx (SImode);")
2096 (define_insn "ashldi3_internal"
2097 [(set (match_operand:DI 0 "register_operand" "=d")
2098 (ashift:DI (match_operand:DI 1 "register_operand" "d")
2099 (match_operand:SI 2 "register_operand" "d")))
2100 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2101 "!TARGET_DEBUG_G_MODE"
2104 operands[4] = const0_rtx;
2105 dslots_jump_total += 3;
2106 dslots_jump_filled += 2;
2108 return \"sll\\t%3,%2,26\\n\\
2109 \\tbgez\\t%3,1f\\n\\
2110 \\tsll\\t%M0,%L1,%2\\n\\
2112 \\tmove\\t%L0,%z4%)\\n\\
2115 \\t%(beq\\t%3,%z4,2f\\n\\
2116 \\tsll\\t%M0,%M1,%2%)\\n\\
2118 \\tsubu\\t%3,%z4,%2\\n\\
2119 \\tsrl\\t%3,%L1,%3\\n\\
2120 \\tor\\t%M0,%M0,%3\\n\\
2122 \\tsll\\t%L0,%L1,%2\\n\\
2125 [(set_attr "type" "darith")
2126 (set_attr "mode" "SI")
2127 (set_attr "length" "12")])
2130 (define_insn "ashldi3_internal2"
2131 [(set (match_operand:DI 0 "register_operand" "=d")
2132 (ashift:DI (match_operand:DI 1 "register_operand" "d")
2133 (match_operand:SI 2 "small_int" "IJK")))
2134 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2135 "!TARGET_DEBUG_G_MODE && (INTVAL (operands[2]) & 32) != 0"
2138 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2139 operands[4] = const0_rtx;
2140 return \"sll\\t%M0,%L1,%2\;move\\t%L0,%z4\";
2142 [(set_attr "type" "darith")
2143 (set_attr "mode" "DI")
2144 (set_attr "length" "2")])
2148 [(set (match_operand:DI 0 "register_operand" "")
2149 (ashift:DI (match_operand:DI 1 "register_operand" "")
2150 (match_operand:SI 2 "small_int" "")))
2151 (clobber (match_operand:SI 3 "register_operand" ""))]
2152 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2153 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2154 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2155 && (INTVAL (operands[2]) & 32) != 0"
2157 [(set (subreg:SI (match_dup 0) 1) (ashift:SI (subreg:SI (match_dup 1) 0) (match_dup 2)))
2158 (set (subreg:SI (match_dup 0) 0) (const_int 0))]
2160 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2164 [(set (match_operand:DI 0 "register_operand" "")
2165 (ashift:DI (match_operand:DI 1 "register_operand" "")
2166 (match_operand:SI 2 "small_int" "")))
2167 (clobber (match_operand:SI 3 "register_operand" ""))]
2168 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2169 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2170 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2171 && (INTVAL (operands[2]) & 32) != 0"
2173 [(set (subreg:SI (match_dup 0) 0) (ashift:SI (subreg:SI (match_dup 1) 1) (match_dup 2)))
2174 (set (subreg:SI (match_dup 0) 1) (const_int 0))]
2176 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2179 (define_insn "ashldi3_internal3"
2180 [(set (match_operand:DI 0 "register_operand" "=d")
2181 (ashift:DI (match_operand:DI 1 "register_operand" "d")
2182 (match_operand:SI 2 "small_int" "IJK")))
2183 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2184 "!TARGET_DEBUG_G_MODE
2185 && (INTVAL (operands[2]) & 63) < 32
2186 && (INTVAL (operands[2]) & 63) != 0"
2189 int amount = INTVAL (operands[2]);
2191 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2192 operands[4] = const0_rtx;
2193 operands[5] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2195 return \"sll\\t%M0,%M1,%2\;srl\\t%3,%L1,%5\;or\\t%M0,%M0,%3\;sll\\t%L0,%L1,%2\";
2197 [(set_attr "type" "darith")
2198 (set_attr "mode" "DI")
2199 (set_attr "length" "4")])
2203 [(set (match_operand:DI 0 "register_operand" "")
2204 (ashift:DI (match_operand:DI 1 "register_operand" "")
2205 (match_operand:SI 2 "small_int" "")))
2206 (clobber (match_operand:SI 3 "register_operand" ""))]
2207 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2208 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2209 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2210 && (INTVAL (operands[2]) & 63) < 32
2211 && (INTVAL (operands[2]) & 63) != 0"
2213 [(set (subreg:SI (match_dup 0) 1)
2214 (ashift:SI (subreg:SI (match_dup 1) 1)
2218 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2221 (set (subreg:SI (match_dup 0) 1)
2222 (ior:SI (subreg:SI (match_dup 0) 1)
2225 (set (subreg:SI (match_dup 0) 0)
2226 (ashift:SI (subreg:SI (match_dup 1) 0)
2230 int amount = INTVAL (operands[2]);
2231 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2232 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2237 [(set (match_operand:DI 0 "register_operand" "")
2238 (ashift:DI (match_operand:DI 1 "register_operand" "")
2239 (match_operand:SI 2 "small_int" "")))
2240 (clobber (match_operand:SI 3 "register_operand" ""))]
2241 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2242 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2243 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2244 && (INTVAL (operands[2]) & 63) < 32
2245 && (INTVAL (operands[2]) & 63) != 0"
2247 [(set (subreg:SI (match_dup 0) 0)
2248 (ashift:SI (subreg:SI (match_dup 1) 0)
2252 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2255 (set (subreg:SI (match_dup 0) 0)
2256 (ior:SI (subreg:SI (match_dup 0) 0)
2259 (set (subreg:SI (match_dup 0) 1)
2260 (ashift:SI (subreg:SI (match_dup 1) 1)
2264 int amount = INTVAL (operands[2]);
2265 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2266 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2270 (define_insn "ashrsi3"
2271 [(set (match_operand:SI 0 "register_operand" "=d")
2272 (ashiftrt:SI (match_operand:SI 1 "register_operand" "d")
2273 (match_operand:SI 2 "arith_operand" "dI")))]
2277 if (GET_CODE (operands[2]) == CONST_INT)
2278 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2280 return \"sra\\t%0,%1,%2\";
2282 [(set_attr "type" "arith")
2283 (set_attr "mode" "SI")
2284 (set_attr "length" "1")])
2287 (define_expand "ashrdi3"
2288 [(parallel [(set (match_operand:DI 0 "register_operand" "")
2289 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2290 (match_operand:SI 2 "arith_operand" "")))
2291 (clobber (match_dup 3))])]
2292 "!TARGET_DEBUG_G_MODE"
2293 "operands[3] = gen_reg_rtx (SImode);")
2296 (define_insn "ashrdi3_internal"
2297 [(set (match_operand:DI 0 "register_operand" "=d")
2298 (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
2299 (match_operand:SI 2 "register_operand" "d")))
2300 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2301 "!TARGET_DEBUG_G_MODE"
2304 operands[4] = const0_rtx;
2305 dslots_jump_total += 3;
2306 dslots_jump_filled += 2;
2308 return \"sll\\t%3,%2,26\\n\\
2309 \\tbgez\\t%3,1f\\n\\
2310 \\tsra\\t%L0,%M1,%2\\n\\
2312 \\tsra\\t%M0,%M1,31%)\\n\\
2315 \\t%(beq\\t%3,%z4,2f\\n\\
2316 \\tsrl\\t%L0,%L1,%2%)\\n\\
2318 \\tsubu\\t%3,%z4,%2\\n\\
2319 \\tsll\\t%3,%M1,%3\\n\\
2320 \\tor\\t%L0,%L0,%3\\n\\
2322 \\tsra\\t%M0,%M1,%2\\n\\
2325 [(set_attr "type" "darith")
2326 (set_attr "mode" "DI")
2327 (set_attr "length" "12")])
2330 (define_insn "ashrdi3_internal2"
2331 [(set (match_operand:DI 0 "register_operand" "=d")
2332 (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
2333 (match_operand:SI 2 "small_int" "IJK")))
2334 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2335 "!TARGET_DEBUG_G_MODE && (INTVAL (operands[2]) & 32) != 0"
2338 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2339 return \"sra\\t%L0,%M1,%2\;sra\\t%M0,%M1,31\";
2341 [(set_attr "type" "darith")
2342 (set_attr "mode" "DI")
2343 (set_attr "length" "2")])
2347 [(set (match_operand:DI 0 "register_operand" "")
2348 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2349 (match_operand:SI 2 "small_int" "")))
2350 (clobber (match_operand:SI 3 "register_operand" ""))]
2351 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2352 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2353 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2354 && (INTVAL (operands[2]) & 32) != 0"
2356 [(set (subreg:SI (match_dup 0) 0) (ashiftrt:SI (subreg:SI (match_dup 1) 1) (match_dup 2)))
2357 (set (subreg:SI (match_dup 0) 1) (ashiftrt:SI (subreg:SI (match_dup 1) 1) (const_int 31)))]
2359 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2363 [(set (match_operand:DI 0 "register_operand" "")
2364 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2365 (match_operand:SI 2 "small_int" "")))
2366 (clobber (match_operand:SI 3 "register_operand" ""))]
2367 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2368 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2369 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2370 && (INTVAL (operands[2]) & 32) != 0"
2372 [(set (subreg:SI (match_dup 0) 1) (ashiftrt:SI (subreg:SI (match_dup 1) 0) (match_dup 2)))
2373 (set (subreg:SI (match_dup 0) 0) (ashiftrt:SI (subreg:SI (match_dup 1) 0) (const_int 31)))]
2375 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2378 (define_insn "ashrdi3_internal3"
2379 [(set (match_operand:DI 0 "register_operand" "=d")
2380 (ashiftrt:DI (match_operand:DI 1 "register_operand" "d")
2381 (match_operand:SI 2 "small_int" "IJK")))
2382 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2383 "!TARGET_DEBUG_G_MODE
2384 && (INTVAL (operands[2]) & 63) < 32
2385 && (INTVAL (operands[2]) & 63) != 0"
2388 int amount = INTVAL (operands[2]);
2390 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2391 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2393 return \"srl\\t%L0,%L1,%2\;sll\\t%3,%M1,%4\;or\\t%L0,%L0,%3\;sra\\t%M0,%M1,%2\";
2395 [(set_attr "type" "darith")
2396 (set_attr "mode" "DI")
2397 (set_attr "length" "4")])
2401 [(set (match_operand:DI 0 "register_operand" "")
2402 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2403 (match_operand:SI 2 "small_int" "")))
2404 (clobber (match_operand:SI 3 "register_operand" ""))]
2405 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2406 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2407 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2408 && (INTVAL (operands[2]) & 63) < 32
2409 && (INTVAL (operands[2]) & 63) != 0"
2411 [(set (subreg:SI (match_dup 0) 0)
2412 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2416 (ashift:SI (subreg:SI (match_dup 1) 1)
2419 (set (subreg:SI (match_dup 0) 0)
2420 (ior:SI (subreg:SI (match_dup 0) 0)
2423 (set (subreg:SI (match_dup 0) 1)
2424 (ashiftrt:SI (subreg:SI (match_dup 1) 1)
2428 int amount = INTVAL (operands[2]);
2429 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2430 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2435 [(set (match_operand:DI 0 "register_operand" "")
2436 (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
2437 (match_operand:SI 2 "small_int" "")))
2438 (clobber (match_operand:SI 3 "register_operand" ""))]
2439 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2440 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2441 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2442 && (INTVAL (operands[2]) & 63) < 32
2443 && (INTVAL (operands[2]) & 63) != 0"
2445 [(set (subreg:SI (match_dup 0) 1)
2446 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2450 (ashift:SI (subreg:SI (match_dup 1) 0)
2453 (set (subreg:SI (match_dup 0) 1)
2454 (ior:SI (subreg:SI (match_dup 0) 1)
2457 (set (subreg:SI (match_dup 0) 0)
2458 (ashiftrt:SI (subreg:SI (match_dup 1) 0)
2462 int amount = INTVAL (operands[2]);
2463 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2464 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2468 (define_insn "lshrsi3"
2469 [(set (match_operand:SI 0 "register_operand" "=d")
2470 (lshiftrt:SI (match_operand:SI 1 "register_operand" "d")
2471 (match_operand:SI 2 "arith_operand" "dI")))]
2475 if (GET_CODE (operands[2]) == CONST_INT)
2476 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2478 return \"srl\\t%0,%1,%2\";
2480 [(set_attr "type" "arith")
2481 (set_attr "mode" "SI")
2482 (set_attr "length" "1")])
2485 (define_expand "lshrdi3"
2486 [(parallel [(set (match_operand:DI 0 "register_operand" "")
2487 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2488 (match_operand:SI 2 "arith_operand" "")))
2489 (clobber (match_dup 3))])]
2490 "!TARGET_DEBUG_G_MODE"
2491 "operands[3] = gen_reg_rtx (SImode);")
2494 (define_insn "lshrdi3_internal"
2495 [(set (match_operand:DI 0 "register_operand" "=&d")
2496 (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
2497 (match_operand:SI 2 "register_operand" "d")))
2498 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2499 "!TARGET_DEBUG_G_MODE"
2502 operands[4] = const0_rtx;
2503 dslots_jump_total += 3;
2504 dslots_jump_filled += 2;
2506 return \"sll\\t%3,%2,26\\n\\
2507 \\tbgez\\t%3,1f\\n\\
2508 \\tsrl\\t%L0,%M1,%2\\n\\
2510 \\tmove\\t%M0,%z4%)\\n\\
2513 \\t%(beq\\t%3,%z4,2f\\n\\
2514 \\tsrl\\t%L0,%L1,%2%)\\n\\
2516 \\tsubu\\t%3,%z4,%2\\n\\
2517 \\tsll\\t%3,%M1,%3\\n\\
2518 \\tor\\t%L0,%L0,%3\\n\\
2520 \\tsrl\\t%M0,%M1,%2\\n\\
2523 [(set_attr "type" "darith")
2524 (set_attr "mode" "DI")
2525 (set_attr "length" "12")])
2528 (define_insn "lshrdi3_internal2"
2529 [(set (match_operand:DI 0 "register_operand" "=d")
2530 (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
2531 (match_operand:SI 2 "small_int" "IJK")))
2532 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2533 "!TARGET_DEBUG_G_MODE && (INTVAL (operands[2]) & 32) != 0"
2536 operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);
2537 operands[4] = const0_rtx;
2538 return \"srl\\t%L0,%M1,%2\;move\\t%M0,%z4\";
2540 [(set_attr "type" "darith")
2541 (set_attr "mode" "DI")
2542 (set_attr "length" "2")])
2546 [(set (match_operand:DI 0 "register_operand" "")
2547 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2548 (match_operand:SI 2 "small_int" "")))
2549 (clobber (match_operand:SI 3 "register_operand" ""))]
2550 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2551 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2552 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2553 && (INTVAL (operands[2]) & 32) != 0"
2555 [(set (subreg:SI (match_dup 0) 0) (lshiftrt:SI (subreg:SI (match_dup 1) 1) (match_dup 2)))
2556 (set (subreg:SI (match_dup 0) 1) (const_int 0))]
2558 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2562 [(set (match_operand:DI 0 "register_operand" "")
2563 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2564 (match_operand:SI 2 "small_int" "")))
2565 (clobber (match_operand:SI 3 "register_operand" ""))]
2566 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2567 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2568 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2569 && (INTVAL (operands[2]) & 32) != 0"
2571 [(set (subreg:SI (match_dup 0) 1) (lshiftrt:SI (subreg:SI (match_dup 1) 0) (match_dup 2)))
2572 (set (subreg:SI (match_dup 0) 0) (const_int 0))]
2574 "operands[2] = gen_rtx (CONST_INT, VOIDmode, (XINT (operands[2], 0))& 0x1f);")
2577 (define_insn "lshrdi3_internal3"
2578 [(set (match_operand:DI 0 "register_operand" "=d")
2579 (lshiftrt:DI (match_operand:DI 1 "register_operand" "d")
2580 (match_operand:SI 2 "small_int" "IJK")))
2581 (clobber (match_operand:SI 3 "register_operand" "=d"))]
2582 "!TARGET_DEBUG_G_MODE
2583 && (INTVAL (operands[2]) & 63) < 32
2584 && (INTVAL (operands[2]) & 63) != 0"
2587 int amount = INTVAL (operands[2]);
2589 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2590 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2592 return \"srl\\t%L0,%L1,%2\;sll\\t%3,%M1,%4\;or\\t%L0,%L0,%3\;srl\\t%M0,%M1,%2\";
2594 [(set_attr "type" "darith")
2595 (set_attr "mode" "DI")
2596 (set_attr "length" "4")])
2600 [(set (match_operand:DI 0 "register_operand" "")
2601 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2602 (match_operand:SI 2 "small_int" "")))
2603 (clobber (match_operand:SI 3 "register_operand" ""))]
2604 "reload_completed && !WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2605 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2606 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2607 && (INTVAL (operands[2]) & 63) < 32
2608 && (INTVAL (operands[2]) & 63) != 0"
2610 [(set (subreg:SI (match_dup 0) 0)
2611 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2615 (ashift:SI (subreg:SI (match_dup 1) 1)
2618 (set (subreg:SI (match_dup 0) 0)
2619 (ior:SI (subreg:SI (match_dup 0) 0)
2622 (set (subreg:SI (match_dup 0) 1)
2623 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2627 int amount = INTVAL (operands[2]);
2628 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2629 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2634 [(set (match_operand:DI 0 "register_operand" "")
2635 (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
2636 (match_operand:SI 2 "small_int" "")))
2637 (clobber (match_operand:SI 3 "register_operand" ""))]
2638 "reload_completed && WORDS_BIG_ENDIAN && !TARGET_DEBUG_D_MODE && !TARGET_DEBUG_G_MODE
2639 && GET_CODE (operands[0]) == REG && REGNO (operands[0]) < FIRST_PSEUDO_REGISTER
2640 && GET_CODE (operands[1]) == REG && REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
2641 && (INTVAL (operands[2]) & 63) < 32
2642 && (INTVAL (operands[2]) & 63) != 0"
2644 [(set (subreg:SI (match_dup 0) 1)
2645 (lshiftrt:SI (subreg:SI (match_dup 1) 1)
2649 (ashift:SI (subreg:SI (match_dup 1) 0)
2652 (set (subreg:SI (match_dup 0) 1)
2653 (ior:SI (subreg:SI (match_dup 0) 1)
2656 (set (subreg:SI (match_dup 0) 0)
2657 (lshiftrt:SI (subreg:SI (match_dup 1) 0)
2661 int amount = INTVAL (operands[2]);
2662 operands[2] = gen_rtx (CONST_INT, VOIDmode, (amount & 31));
2663 operands[4] = gen_rtx (CONST_INT, VOIDmode, ((-amount) & 31));
2668 ;; ....................
2672 ;; ....................
2674 ;; Flow here is rather complex:
2676 ;; 1) The cmp{si,sf,df} routine is called. It deposits the
2677 ;; arguments into the branch_cmp array, and the type into
2678 ;; branch_type. No RTL is generated.
2680 ;; 2) The appropriate branch define_expand is called, which then
2681 ;; creates the appropriate RTL for the comparison and branch.
2682 ;; Different CC modes are used, based on what type of branch is
2683 ;; done, so that we can constrain things appropriately. There
2684 ;; are assumptions in the rest of GCC that break if we fold the
2685 ;; operands into the branchs for integer operations, and use cc0
2686 ;; for floating point, so we use the fp status register instead.
2687 ;; If needed, an appropriate temporary is created to hold the
2688 ;; of the integer compare.
2690 (define_expand "cmpsi"
2692 (compare:CC (match_operand:SI 0 "register_operand" "")
2693 (match_operand:SI 1 "arith_operand" "")))]
2697 if (operands[0]) /* avoid unused code message */
2699 branch_cmp[0] = operands[0];
2700 branch_cmp[1] = operands[1];
2701 branch_type = CMP_SI;
2706 (define_expand "tstsi"
2708 (match_operand:SI 0 "register_operand" ""))]
2712 if (operands[0]) /* avoid unused code message */
2714 branch_cmp[0] = operands[0];
2715 branch_cmp[1] = const0_rtx;
2716 branch_type = CMP_SI;
2721 (define_expand "cmpdf"
2723 (compare:CC_FP (match_operand:DF 0 "register_operand" "")
2724 (match_operand:DF 1 "register_operand" "")))]
2728 if (operands[0]) /* avoid unused code message */
2730 branch_cmp[0] = operands[0];
2731 branch_cmp[1] = operands[1];
2732 branch_type = CMP_DF;
2737 (define_expand "cmpsf"
2739 (compare:CC_FP (match_operand:SF 0 "register_operand" "")
2740 (match_operand:SF 1 "register_operand" "")))]
2744 if (operands[0]) /* avoid unused code message */
2746 branch_cmp[0] = operands[0];
2747 branch_cmp[1] = operands[1];
2748 branch_type = CMP_SF;
2755 ;; ....................
2757 ;; CONDITIONAL BRANCHES
2759 ;; ....................
2761 (define_insn "branch_fp_ne"
2763 (if_then_else (ne:CC_FP (reg:CC_FP 66)
2765 (match_operand 0 "pc_or_label_operand" "")
2766 (match_operand 1 "pc_or_label_operand" "")))]
2770 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2771 return (operands[0] != pc_rtx) ? \"%*bc1t%?\\t%0\" : \"%*bc1f%?\\t%1\";
2773 [(set_attr "type" "branch")
2774 (set_attr "mode" "none")
2775 (set_attr "length" "1")])
2777 (define_insn "branch_fp_ne_rev"
2779 (if_then_else (ne:CC_REV_FP (reg:CC_REV_FP 66)
2781 (match_operand 0 "pc_or_label_operand" "")
2782 (match_operand 1 "pc_or_label_operand" "")))]
2786 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2787 return (operands[0] != pc_rtx) ? \"%*bc1f%?\\t%0\" : \"%*bc1t%?\\t%1\";
2789 [(set_attr "type" "branch")
2790 (set_attr "mode" "none")
2791 (set_attr "length" "1")])
2793 (define_insn "branch_fp_eq"
2795 (if_then_else (eq:CC_FP (reg:CC_FP 66)
2797 (match_operand 0 "pc_or_label_operand" "")
2798 (match_operand 1 "pc_or_label_operand" "")))]
2802 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2803 return (operands[0] != pc_rtx) ? \"%*bc1f%?\\t%0\" : \"%*bc1t%?\\t%1\";
2805 [(set_attr "type" "branch")
2806 (set_attr "mode" "none")
2807 (set_attr "length" "1")])
2809 (define_insn "branch_fp_eq_rev"
2811 (if_then_else (eq:CC_REV_FP (reg:CC_REV_FP 66)
2813 (match_operand 0 "pc_or_label_operand" "")
2814 (match_operand 1 "pc_or_label_operand" "")))]
2818 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2819 return (operands[0] != pc_rtx) ? \"%*bc1t%?\\t%0\" : \"%*bc1f%?\\t%1\";
2821 [(set_attr "type" "branch")
2822 (set_attr "mode" "none")
2823 (set_attr "length" "1")])
2826 (define_insn "branch_zero"
2828 (if_then_else (match_operator:SI 0 "cmp_op"
2829 [(match_operand:SI 1 "arith32_operand" "rn")
2831 (match_operand 2 "pc_or_label_operand" "")
2832 (match_operand 3 "pc_or_label_operand" "")))]
2836 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2838 /* Handle places where CSE has folded a constant into the register operand. */
2839 if (GET_CODE (operands[1]) == CONST_INT)
2841 int value = INTVAL (operands[1]);
2844 switch (GET_CODE (operands[0]))
2847 case EQ: truth = (value == 0); break;
2848 case NE: truth = (value != 0); break;
2849 case GT: truth = (value > 0); break;
2850 case GE: truth = (value >= 0); break;
2851 case LT: truth = (value < 0); break;
2852 case LE: truth = (value <= 0); break;
2853 case GTU: truth = (((unsigned)value) > 0); break;
2854 case GEU: truth = 1; break;
2855 case LTU: truth = 0; break;
2856 case LEU: truth = (((unsigned)value) <= 0); break;
2859 if (operands[2] != pc_rtx)
2860 return (truth) ? \"%*beq%?\\t%.,%.,%2\" : \"%*bne%?\\t%.,%.,%2\";
2862 return (truth) ? \"%*bne%?\\t%.,%.,%2\" : \"%*beq%?\\t%.,%.,%2\";
2865 if (operands[2] != pc_rtx)
2867 switch (GET_CODE (operands[0]))
2869 case EQ: return \"%*beq%?\\t%z1,%.,%2\";
2870 case NE: return \"%*bne%?\\t%z1,%.,%2\";
2871 case GTU: return \"%*bne%?\\t%z1,%.,%2\";
2872 case LEU: return \"%*beq%?\\t%z1,%.,%2\";
2873 case GEU: return \"%*j\\t%2\";
2874 case LTU: return \"#%*bltuz\\t%z1,%2\";
2877 return \"%*b%C0z%?\\t%z1,%2\";
2880 { /* inverted jump */
2881 switch (GET_CODE (operands[0]))
2883 case EQ: return \"%*bne%?\\t%z1,%.,%3\";
2884 case NE: return \"%*beq%?\\t%z1,%.,%3\";
2885 case GTU: return \"%*beq%?\\t%z1,%.,%3\";
2886 case LEU: return \"%*bne%?\\t%z1,%.,%3\";
2887 case GEU: return \"#%*bgeuz\\t%z1,%3\";
2888 case LTU: return \"%*j\\t%3\";
2891 return \"%*b%N0z%?\\t%z1,%3\";
2894 [(set_attr "type" "branch")
2895 (set_attr "mode" "none")
2896 (set_attr "length" "1")])
2899 (define_insn "branch_equality"
2901 (if_then_else (match_operator:SI 0 "equality_op"
2902 [(match_operand:SI 1 "register_operand" "d")
2903 (match_operand:SI 2 "register_operand" "d")])
2904 (match_operand 3 "pc_or_label_operand" "")
2905 (match_operand 4 "pc_or_label_operand" "")))]
2909 mips_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
2910 return (operands[3] != pc_rtx)
2911 ? \"%*b%C0%?\\t%z1,%z2,%3\"
2912 : \"%*b%N0%?\\t%z1,%z2,%4\";
2914 [(set_attr "type" "branch")
2915 (set_attr "mode" "none")
2916 (set_attr "length" "1")])
2919 (define_expand "beq"
2921 (if_then_else (eq:CC_EQ (cc0)
2923 (label_ref (match_operand 0 "" ""))
2928 if (operands[0]) /* avoid unused code warning */
2930 gen_conditional_branch (operands, EQ);
2935 (define_expand "bne"
2937 (if_then_else (ne:CC_EQ (cc0)
2939 (label_ref (match_operand 0 "" ""))
2944 if (operands[0]) /* avoid unused code warning */
2946 gen_conditional_branch (operands, NE);
2951 (define_expand "bgt"
2953 (if_then_else (gt:CC (cc0)
2955 (label_ref (match_operand 0 "" ""))
2960 if (operands[0]) /* avoid unused code warning */
2962 gen_conditional_branch (operands, GT);
2967 (define_expand "bge"
2969 (if_then_else (ge:CC (cc0)
2971 (label_ref (match_operand 0 "" ""))
2976 if (operands[0]) /* avoid unused code warning */
2978 gen_conditional_branch (operands, GE);
2983 (define_expand "blt"
2985 (if_then_else (lt:CC (cc0)
2987 (label_ref (match_operand 0 "" ""))
2992 if (operands[0]) /* avoid unused code warning */
2994 gen_conditional_branch (operands, LT);
2999 (define_expand "ble"
3001 (if_then_else (le:CC (cc0)
3003 (label_ref (match_operand 0 "" ""))
3008 if (operands[0]) /* avoid unused code warning */
3010 gen_conditional_branch (operands, LE);
3015 (define_expand "bgtu"
3017 (if_then_else (gtu:CC (cc0)
3019 (label_ref (match_operand 0 "" ""))
3024 if (operands[0]) /* avoid unused code warning */
3026 gen_conditional_branch (operands, GTU);
3031 (define_expand "bgeu"
3033 (if_then_else (geu:CC (cc0)
3035 (label_ref (match_operand 0 "" ""))
3040 if (operands[0]) /* avoid unused code warning */
3042 gen_conditional_branch (operands, GEU);
3048 (define_expand "bltu"
3050 (if_then_else (ltu:CC (cc0)
3052 (label_ref (match_operand 0 "" ""))
3057 if (operands[0]) /* avoid unused code warning */
3059 gen_conditional_branch (operands, LTU);
3064 (define_expand "bleu"
3066 (if_then_else (leu:CC (cc0)
3068 (label_ref (match_operand 0 "" ""))
3073 if (operands[0]) /* avoid unused code warning */
3075 gen_conditional_branch (operands, LEU);
3082 ;; ....................
3084 ;; SETTING A REGISTER FROM A COMPARISON
3086 ;; ....................
3088 (define_expand "seq"
3089 [(set (match_operand:SI 0 "register_operand" "=d")
3090 (eq:SI (match_dup 1)
3095 extern rtx force_reg ();
3097 if (branch_type != CMP_SI)
3100 /* set up operands from compare. */
3101 operands[1] = branch_cmp[0];
3102 operands[2] = branch_cmp[1];
3104 if (!TARGET_DEBUG_C_MODE)
3106 gen_int_relational (EQ, operands[0], operands[1], operands[2], (int *)0);
3110 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
3111 operands[2] = force_reg (SImode, operands[2]);
3113 /* fall through and generate default code */
3117 (define_insn "seq_si_zero"
3118 [(set (match_operand:SI 0 "register_operand" "=d")
3119 (eq:SI (match_operand:SI 1 "register_operand" "d")
3123 [(set_attr "type" "arith")
3124 (set_attr "mode" "SI")
3125 (set_attr "length" "1")])
3127 (define_insn "seq_si"
3128 [(set (match_operand:SI 0 "register_operand" "=d,d")
3129 (eq:SI (match_operand:SI 1 "register_operand" "%d,d")
3130 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
3131 "TARGET_DEBUG_C_MODE"
3133 xor\\t%0,%1,%2\;sltu\\t%0,%0,1
3134 xori\\t%0,%1,%2\;sltu\\t%0,%0,1"
3135 [(set_attr "type" "arith")
3136 (set_attr "mode" "SI")
3137 (set_attr "length" "2")])
3140 [(set (match_operand:SI 0 "register_operand" "")
3141 (eq:SI (match_operand:SI 1 "register_operand" "")
3142 (match_operand:SI 2 "uns_arith_operand" "")))]
3143 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
3144 && (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
3146 (xor:SI (match_dup 1)
3149 (ltu:SI (match_dup 0)
3153 (define_expand "sne"
3154 [(set (match_operand:SI 0 "register_operand" "=d")
3155 (ne:SI (match_dup 1)
3160 extern rtx force_reg ();
3162 if (branch_type != CMP_SI)
3165 /* set up operands from compare. */
3166 operands[1] = branch_cmp[0];
3167 operands[2] = branch_cmp[1];
3169 if (!TARGET_DEBUG_C_MODE)
3171 gen_int_relational (NE, operands[0], operands[1], operands[2], (int *)0);
3175 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
3176 operands[2] = force_reg (SImode, operands[2]);
3178 /* fall through and generate default code */
3181 (define_insn "sne_si_zero"
3182 [(set (match_operand:SI 0 "register_operand" "=d")
3183 (ne:SI (match_operand:SI 1 "register_operand" "d")
3187 [(set_attr "type" "arith")
3188 (set_attr "mode" "SI")
3189 (set_attr "length" "1")])
3191 (define_insn "sne_si"
3192 [(set (match_operand:SI 0 "register_operand" "=d,d")
3193 (ne:SI (match_operand:SI 1 "register_operand" "%d,d")
3194 (match_operand:SI 2 "uns_arith_operand" "d,K")))]
3195 "TARGET_DEBUG_C_MODE"
3197 xor\\t%0,%1,%2\;sltu\\t%0,%.,%0
3198 xori\\t%0,%1,%x2\;sltu\\t%0,%.,%0"
3199 [(set_attr "type" "arith")
3200 (set_attr "mode" "SI")
3201 (set_attr "length" "2")])
3204 [(set (match_operand:SI 0 "register_operand" "")
3205 (ne:SI (match_operand:SI 1 "register_operand" "")
3206 (match_operand:SI 2 "uns_arith_operand" "")))]
3207 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE
3208 && (GET_CODE (operands[2]) != CONST_INT || INTVAL (operands[2]) != 0)"
3210 (xor:SI (match_dup 1)
3213 (gtu:SI (match_dup 0)
3217 (define_expand "sgt"
3218 [(set (match_operand:SI 0 "register_operand" "=d")
3219 (gt:SI (match_dup 1)
3224 extern rtx force_reg ();
3226 if (branch_type != CMP_SI)
3229 /* set up operands from compare. */
3230 operands[1] = branch_cmp[0];
3231 operands[2] = branch_cmp[1];
3233 if (!TARGET_DEBUG_C_MODE)
3235 gen_int_relational (GT, operands[0], operands[1], operands[2], (int *)0);
3239 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) != 0)
3240 operands[2] = force_reg (SImode, operands[2]);
3242 /* fall through and generate default code */
3245 (define_insn "sgt_si"
3246 [(set (match_operand:SI 0 "register_operand" "=d")
3247 (gt:SI (match_operand:SI 1 "register_operand" "d")
3248 (match_operand:SI 2 "reg_or_0_operand" "dJ")))]
3251 [(set_attr "type" "arith")
3252 (set_attr "mode" "SI")
3253 (set_attr "length" "1")])
3255 (define_expand "sge"
3256 [(set (match_operand:SI 0 "register_operand" "=d")
3257 (ge:SI (match_dup 1)
3262 if (branch_type != CMP_SI)
3265 /* set up operands from compare. */
3266 operands[1] = branch_cmp[0];
3267 operands[2] = branch_cmp[1];
3269 if (!TARGET_DEBUG_C_MODE)
3271 gen_int_relational (GE, operands[0], operands[1], operands[2], (int *)0);
3275 /* fall through and generate default code */
3278 (define_insn "sge_si"
3279 [(set (match_operand:SI 0 "register_operand" "=d")
3280 (ge:SI (match_operand:SI 1 "register_operand" "d")
3281 (match_operand:SI 2 "arith_operand" "dI")))]
3282 "TARGET_DEBUG_C_MODE"
3283 "slt\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
3284 [(set_attr "type" "arith")
3285 (set_attr "mode" "SI")
3286 (set_attr "length" "2")])
3289 [(set (match_operand:SI 0 "register_operand" "")
3290 (ge:SI (match_operand:SI 1 "register_operand" "")
3291 (match_operand:SI 2 "arith_operand" "")))]
3292 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3294 (lt:SI (match_dup 1)
3297 (xor:SI (match_dup 0)
3301 (define_expand "slt"
3302 [(set (match_operand:SI 0 "register_operand" "=d")
3303 (lt:SI (match_dup 1)
3308 if (branch_type != CMP_SI)
3311 /* set up operands from compare. */
3312 operands[1] = branch_cmp[0];
3313 operands[2] = branch_cmp[1];
3315 if (!TARGET_DEBUG_C_MODE)
3317 gen_int_relational (LT, operands[0], operands[1], operands[2], (int *)0);
3321 /* fall through and generate default code */
3324 (define_insn "slt_si"
3325 [(set (match_operand:SI 0 "register_operand" "=d")
3326 (lt:SI (match_operand:SI 1 "register_operand" "d")
3327 (match_operand:SI 2 "arith_operand" "dI")))]
3330 [(set_attr "type" "arith")
3331 (set_attr "mode" "SI")
3332 (set_attr "length" "1")])
3334 (define_expand "sle"
3335 [(set (match_operand:SI 0 "register_operand" "=d")
3336 (le:SI (match_dup 1)
3341 extern rtx force_reg ();
3343 if (branch_type != CMP_SI)
3346 /* set up operands from compare. */
3347 operands[1] = branch_cmp[0];
3348 operands[2] = branch_cmp[1];
3350 if (!TARGET_DEBUG_C_MODE)
3352 gen_int_relational (LE, operands[0], operands[1], operands[2], (int *)0);
3356 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 32767)
3357 operands[2] = force_reg (SImode, operands[2]);
3359 /* fall through and generate default code */
3362 (define_insn "sle_si_const"
3363 [(set (match_operand:SI 0 "register_operand" "=d")
3364 (le:SI (match_operand:SI 1 "register_operand" "d")
3365 (match_operand:SI 2 "small_int" "I")))]
3366 "INTVAL (operands[2]) < 32767"
3369 operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2])+1);
3370 return \"slt\\t%0,%1,%2\";
3372 [(set_attr "type" "arith")
3373 (set_attr "mode" "SI")
3374 (set_attr "length" "1")])
3376 (define_insn "sle_si_reg"
3377 [(set (match_operand:SI 0 "register_operand" "=d")
3378 (le:SI (match_operand:SI 1 "register_operand" "d")
3379 (match_operand:SI 2 "register_operand" "d")))]
3380 "TARGET_DEBUG_C_MODE"
3381 "slt\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
3382 [(set_attr "type" "arith")
3383 (set_attr "mode" "SI")
3384 (set_attr "length" "2")])
3387 [(set (match_operand:SI 0 "register_operand" "")
3388 (le:SI (match_operand:SI 1 "register_operand" "")
3389 (match_operand:SI 2 "register_operand" "")))]
3390 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3392 (lt:SI (match_dup 2)
3395 (xor:SI (match_dup 0)
3399 (define_expand "sgtu"
3400 [(set (match_operand:SI 0 "register_operand" "=d")
3401 (gtu:SI (match_dup 1)
3406 extern rtx force_reg ();
3408 if (branch_type != CMP_SI)
3411 /* set up operands from compare. */
3412 operands[1] = branch_cmp[0];
3413 operands[2] = branch_cmp[1];
3415 if (!TARGET_DEBUG_C_MODE)
3417 gen_int_relational (GTU, operands[0], operands[1], operands[2], (int *)0);
3421 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) != 0)
3422 operands[2] = force_reg (SImode, operands[2]);
3424 /* fall through and generate default code */
3427 (define_insn "sgtu_si"
3428 [(set (match_operand:SI 0 "register_operand" "=d")
3429 (gtu:SI (match_operand:SI 1 "register_operand" "d")
3430 (match_operand:SI 2 "reg_or_0_operand" "dJ")))]
3433 [(set_attr "type" "arith")
3434 (set_attr "mode" "SI")
3435 (set_attr "length" "1")])
3437 (define_expand "sgeu"
3438 [(set (match_operand:SI 0 "register_operand" "=d")
3439 (geu:SI (match_dup 1)
3444 if (branch_type != CMP_SI)
3447 /* set up operands from compare. */
3448 operands[1] = branch_cmp[0];
3449 operands[2] = branch_cmp[1];
3451 if (!TARGET_DEBUG_C_MODE)
3453 gen_int_relational (GEU, operands[0], operands[1], operands[2], (int *)0);
3457 /* fall through and generate default code */
3460 (define_insn "sgeu_si"
3461 [(set (match_operand:SI 0 "register_operand" "=d")
3462 (geu:SI (match_operand:SI 1 "register_operand" "d")
3463 (match_operand:SI 2 "arith_operand" "dI")))]
3464 "TARGET_DEBUG_C_MODE"
3465 "sltu\\t%0,%1,%2\;xori\\t%0,%0,0x0001"
3466 [(set_attr "type" "arith")
3467 (set_attr "mode" "SI")
3468 (set_attr "length" "2")])
3471 [(set (match_operand:SI 0 "register_operand" "")
3472 (geu:SI (match_operand:SI 1 "register_operand" "")
3473 (match_operand:SI 2 "arith_operand" "")))]
3474 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3476 (ltu:SI (match_dup 1)
3479 (xor:SI (match_dup 0)
3483 (define_expand "sltu"
3484 [(set (match_operand:SI 0 "register_operand" "=d")
3485 (ltu:SI (match_dup 1)
3490 if (branch_type != CMP_SI)
3493 /* set up operands from compare. */
3494 operands[1] = branch_cmp[0];
3495 operands[2] = branch_cmp[1];
3497 if (!TARGET_DEBUG_C_MODE)
3499 gen_int_relational (LTU, operands[0], operands[1], operands[2], (int *)0);
3503 /* fall through and generate default code */
3506 (define_insn "sltu_si"
3507 [(set (match_operand:SI 0 "register_operand" "=d")
3508 (ltu:SI (match_operand:SI 1 "register_operand" "d")
3509 (match_operand:SI 2 "arith_operand" "dI")))]
3512 [(set_attr "type" "arith")
3513 (set_attr "mode" "SI")
3514 (set_attr "length" "1")])
3516 (define_expand "sleu"
3517 [(set (match_operand:SI 0 "register_operand" "=d")
3518 (leu:SI (match_dup 1)
3523 extern rtx force_reg ();
3525 if (branch_type != CMP_SI)
3528 /* set up operands from compare. */
3529 operands[1] = branch_cmp[0];
3530 operands[2] = branch_cmp[1];
3532 if (!TARGET_DEBUG_C_MODE)
3534 gen_int_relational (LEU, operands[0], operands[1], operands[2], (int *)0);
3538 if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 32767)
3539 operands[2] = force_reg (SImode, operands[2]);
3541 /* fall through and generate default code */
3544 (define_insn "sleu_si_const"
3545 [(set (match_operand:SI 0 "register_operand" "=d")
3546 (leu:SI (match_operand:SI 1 "register_operand" "d")
3547 (match_operand:SI 2 "small_int" "I")))]
3548 "INTVAL (operands[2]) < 32767"
3551 operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2])+1);
3552 return \"sltu\\t%0,%1,%2\";
3554 [(set_attr "type" "arith")
3555 (set_attr "mode" "SI")
3556 (set_attr "length" "1")])
3558 (define_insn "sleu_si_reg"
3559 [(set (match_operand:SI 0 "register_operand" "=d")
3560 (leu:SI (match_operand:SI 1 "register_operand" "d")
3561 (match_operand:SI 2 "register_operand" "d")))]
3562 "TARGET_DEBUG_C_MODE"
3563 "sltu\\t%0,%z2,%1\;xori\\t%0,%0,0x0001"
3564 [(set_attr "type" "arith")
3565 (set_attr "mode" "SI")
3566 (set_attr "length" "2")])
3569 [(set (match_operand:SI 0 "register_operand" "")
3570 (leu:SI (match_operand:SI 1 "register_operand" "")
3571 (match_operand:SI 2 "register_operand" "")))]
3572 "TARGET_DEBUG_C_MODE && !TARGET_DEBUG_D_MODE"
3574 (ltu:SI (match_dup 2)
3577 (xor:SI (match_dup 0)
3583 ;; ....................
3585 ;; FLOATING POINT COMPARISONS
3587 ;; ....................
3589 (define_insn "seq_df"
3590 [(set (reg:CC_FP 66)
3591 (eq:CC_FP (match_operand:DF 0 "register_operand" "f")
3592 (match_operand:DF 1 "register_operand" "f")))]
3597 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3598 xoperands[1] = operands[0];
3599 xoperands[2] = operands[1];
3601 return mips_fill_delay_slot (\"c.eq.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3603 [(set_attr "type" "fcmp")
3604 (set_attr "mode" "FPSW")
3605 (set_attr "length" "1")])
3607 (define_insn "sne_df"
3608 [(set (reg:CC_REV_FP 66)
3609 (ne:CC_REV_FP (match_operand:DF 0 "register_operand" "f")
3610 (match_operand:DF 1 "register_operand" "f")))]
3615 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3616 xoperands[1] = operands[0];
3617 xoperands[2] = operands[1];
3619 return mips_fill_delay_slot (\"c.eq.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3621 [(set_attr "type" "fcmp")
3622 (set_attr "mode" "FPSW")
3623 (set_attr "length" "1")])
3625 (define_insn "slt_df"
3626 [(set (reg:CC_FP 66)
3627 (lt:CC_FP (match_operand:DF 0 "register_operand" "f")
3628 (match_operand:DF 1 "register_operand" "f")))]
3633 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3634 xoperands[1] = operands[0];
3635 xoperands[2] = operands[1];
3637 return mips_fill_delay_slot (\"c.lt.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3639 [(set_attr "type" "fcmp")
3640 (set_attr "mode" "FPSW")
3641 (set_attr "length" "1")])
3643 (define_insn "sle_df"
3644 [(set (reg:CC_FP 66)
3645 (le:CC_FP (match_operand:DF 0 "register_operand" "f")
3646 (match_operand:DF 1 "register_operand" "f")))]
3651 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3652 xoperands[1] = operands[0];
3653 xoperands[2] = operands[1];
3655 return mips_fill_delay_slot (\"c.le.d\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3657 [(set_attr "type" "fcmp")
3658 (set_attr "mode" "FPSW")
3659 (set_attr "length" "1")])
3661 (define_insn "sgt_df"
3662 [(set (reg:CC_FP 66)
3663 (gt:CC_FP (match_operand:DF 0 "register_operand" "f")
3664 (match_operand:DF 1 "register_operand" "f")))]
3669 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3670 xoperands[1] = operands[0];
3671 xoperands[2] = operands[1];
3673 return mips_fill_delay_slot (\"c.lt.d\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3675 [(set_attr "type" "fcmp")
3676 (set_attr "mode" "FPSW")
3677 (set_attr "length" "1")])
3679 (define_insn "sge_df"
3680 [(set (reg:CC_FP 66)
3681 (ge:CC_FP (match_operand:DF 0 "register_operand" "f")
3682 (match_operand:DF 1 "register_operand" "f")))]
3687 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3688 xoperands[1] = operands[0];
3689 xoperands[2] = operands[1];
3691 return mips_fill_delay_slot (\"c.le.d\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3693 [(set_attr "type" "fcmp")
3694 (set_attr "mode" "FPSW")
3695 (set_attr "length" "1")])
3697 (define_insn "seq_sf"
3698 [(set (reg:CC_FP 66)
3699 (eq:CC_FP (match_operand:SF 0 "register_operand" "f")
3700 (match_operand:SF 1 "register_operand" "f")))]
3705 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3706 xoperands[1] = operands[0];
3707 xoperands[2] = operands[1];
3709 return mips_fill_delay_slot (\"c.eq.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3711 [(set_attr "type" "fcmp")
3712 (set_attr "mode" "FPSW")
3713 (set_attr "length" "1")])
3715 (define_insn "sne_sf"
3716 [(set (reg:CC_REV_FP 66)
3717 (ne:CC_REV_FP (match_operand:SF 0 "register_operand" "f")
3718 (match_operand:SF 1 "register_operand" "f")))]
3723 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3724 xoperands[1] = operands[0];
3725 xoperands[2] = operands[1];
3727 return mips_fill_delay_slot (\"c.eq.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3729 [(set_attr "type" "fcmp")
3730 (set_attr "mode" "FPSW")
3731 (set_attr "length" "1")])
3733 (define_insn "slt_sf"
3734 [(set (reg:CC_FP 66)
3735 (lt:CC_FP (match_operand:SF 0 "register_operand" "f")
3736 (match_operand:SF 1 "register_operand" "f")))]
3741 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3742 xoperands[1] = operands[0];
3743 xoperands[2] = operands[1];
3745 return mips_fill_delay_slot (\"c.lt.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3747 [(set_attr "type" "fcmp")
3748 (set_attr "mode" "FPSW")
3749 (set_attr "length" "1")])
3751 (define_insn "sle_sf"
3752 [(set (reg:CC_FP 66)
3753 (le:CC_FP (match_operand:SF 0 "register_operand" "f")
3754 (match_operand:SF 1 "register_operand" "f")))]
3759 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3760 xoperands[1] = operands[0];
3761 xoperands[2] = operands[1];
3763 return mips_fill_delay_slot (\"c.le.s\\t%0,%1\", DELAY_FCMP, xoperands, insn);
3765 [(set_attr "type" "fcmp")
3766 (set_attr "mode" "FPSW")
3767 (set_attr "length" "1")])
3769 (define_insn "sgt_sf"
3770 [(set (reg:CC_FP 66)
3771 (gt:CC_FP (match_operand:SF 0 "register_operand" "f")
3772 (match_operand:SF 1 "register_operand" "f")))]
3777 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3778 xoperands[1] = operands[0];
3779 xoperands[2] = operands[1];
3781 return mips_fill_delay_slot (\"c.lt.s\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3783 [(set_attr "type" "fcmp")
3784 (set_attr "mode" "FPSW")
3785 (set_attr "length" "1")])
3787 (define_insn "sge_sf"
3788 [(set (reg:CC_FP 66)
3789 (ge:CC_FP (match_operand:SF 0 "register_operand" "f")
3790 (match_operand:SF 1 "register_operand" "f")))]
3795 xoperands[0] = gen_rtx (REG, CC_FPmode, FPSW_REGNUM);
3796 xoperands[1] = operands[0];
3797 xoperands[2] = operands[1];
3799 return mips_fill_delay_slot (\"c.le.s\\t%1,%0\", DELAY_FCMP, xoperands, insn);
3801 [(set_attr "type" "fcmp")
3802 (set_attr "mode" "FPSW")
3803 (set_attr "length" "1")])
3807 ;; ....................
3809 ;; UNCONDITIONAL BRANCHES
3811 ;; ....................
3813 ;; Unconditional branches.
3817 (label_ref (match_operand 0 "" "")))]
3821 if (GET_CODE (operands[0]) == REG)
3822 return \"%*j\\t%0\";
3824 return \"%*j\\t%l0\";
3826 [(set_attr "type" "jump")
3827 (set_attr "mode" "none")
3828 (set_attr "length" "1")])
3830 (define_insn "indirect_jump"
3831 [(set (pc) (match_operand:SI 0 "register_operand" "d"))]
3834 [(set_attr "type" "jump")
3835 (set_attr "mode" "none")
3836 (set_attr "length" "1")])
3838 (define_insn "tablejump"
3840 (match_operand:SI 0 "register_operand" "d"))
3841 (use (label_ref (match_operand 1 "" "")))]
3844 [(set_attr "type" "jump")
3845 (set_attr "mode" "none")
3846 (set_attr "length" "1")])
3848 ;; Function return, only allow after optimization, so that we can
3849 ;; eliminate jumps to jumps if no stack space is used.
3851 (define_insn "return"
3856 operands[0] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3857 return \"%*j\\t%0\";
3859 [(set_attr "type" "jump")
3860 (set_attr "mode" "none")
3861 (set_attr "length" "1")])
3865 ;; ....................
3869 ;; ....................
3871 ;; calls.c now passes a third argument, make saber happy
3873 (define_expand "call"
3874 [(parallel [(call (match_operand 0 "memory_operand" "m")
3875 (match_operand 1 "" "i"))
3876 (clobber (match_operand 2 "" ""))])] ;; overwrite op2 with $31
3882 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3884 addr = XEXP (operands[0], 0);
3885 if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr))
3886 XEXP (operands[0], 0) = force_reg (FUNCTION_MODE, addr);
3889 (define_insn "call_internal"
3890 [(call (match_operand 0 "memory_operand" "m")
3891 (match_operand 1 "" "i"))
3892 (clobber (match_operand:SI 2 "register_operand" "=d"))]
3896 register rtx target = XEXP (operands[0], 0);
3898 if (GET_CODE (target) == SYMBOL_REF)
3899 return \"%*jal\\t%0\";
3903 operands[0] = target;
3904 operands[1] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3905 return \"%*jal\\t%1,%0\";
3908 [(set_attr "type" "call")
3909 (set_attr "mode" "none")
3910 (set_attr "length" "1")])
3912 ;; calls.c now passes a fourth argument, make saber happy
3914 (define_expand "call_value"
3915 [(parallel [(set (match_operand 0 "register_operand" "=df")
3916 (call (match_operand 1 "memory_operand" "m")
3917 (match_operand 2 "" "i")))
3918 (clobber (match_operand 3 "" ""))])] ;; overwrite op3 with $31
3924 operands[3] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3926 addr = XEXP (operands[1], 0);
3927 if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr))
3928 XEXP (operands[1], 0) = force_reg (FUNCTION_MODE, addr);
3931 (define_insn "call_value_internal"
3932 [(set (match_operand 0 "register_operand" "=df")
3933 (call (match_operand 1 "memory_operand" "m")
3934 (match_operand 2 "" "i")))
3935 (clobber (match_operand:SI 3 "register_operand" "=d"))]
3939 register rtx target = XEXP (operands[1], 0);
3941 if (GET_CODE (target) == SYMBOL_REF)
3942 return \"%*jal\\t%1\";
3946 operands[1] = target;
3947 operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 31);
3948 return \"%*jal\\t%2,%1\";
3951 [(set_attr "type" "call")
3952 (set_attr "mode" "none")
3953 (set_attr "length" "1")])
3957 ;; ....................
3961 ;; ....................
3968 [(set_attr "type" "nop")
3969 (set_attr "mode" "none")
3970 (set_attr "length" "1")])
3972 (define_expand "probe"
3978 operands[0] = gen_reg_rtx (SImode);
3979 operands[1] = gen_rtx (MEM, SImode, stack_pointer_rtx);
3980 MEM_VOLATILE_P (operands[1]) = TRUE;
3982 /* fall through and generate default code */
3989 ;; comment-start: ";; "
3990 ;; eval: (set-syntax-table (copy-sequence (syntax-table)))
3991 ;; eval: (modify-syntax-entry ?[ "(]")
3992 ;; eval: (modify-syntax-entry ?] ")[")
3993 ;; eval: (modify-syntax-entry ?{ "(}")
3994 ;; eval: (modify-syntax-entry ?} "){")