1 ;; Machine description for T-Head vendor extensions
2 ;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 3, or (at your option)
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING3. If not see
18 ;; <http://www.gnu.org/licenses/>.
22 (define_insn "*th_addsl<mode>4"
23 [(set (match_operand:X 0 "register_operand" "=r")
24 (plus:X (ashift:X (match_operand:X 1 "register_operand" "r")
25 (match_operand:QI 2 "imm123_operand" "Ds3"))
26 (match_operand:X 3 "register_operand" "r")))]
28 "th.addsl\t%0,%3,%1,%2"
29 [(set_attr "type" "bitmanip")
30 (set_attr "mode" "<X:MODE>")])
34 (define_insn "*th_srri<mode>3"
35 [(set (match_operand:GPR 0 "register_operand" "=r")
36 (rotatert:GPR (match_operand:GPR 1 "register_operand" "r")
37 (match_operand 2 "const_int_operand" "n")))]
38 "TARGET_XTHEADBB && (TARGET_64BIT || <MODE>mode == SImode)"
40 bool wform = TARGET_64BIT && (<MODE>mode == SImode);
41 operands[2] = GEN_INT (INTVAL (operands[2])
42 & (GET_MODE_BITSIZE (<MODE>mode) - 1));
43 return wform ? "th.srriw\t%0,%1,%2" : "th.srri\t%0,%1,%2";
45 [(set_attr "type" "bitmanip")
46 (set_attr "mode" "<GPR:MODE>")])
48 (define_insn "*th_ext<mode>4"
49 [(set (match_operand:GPR 0 "register_operand" "=r")
50 (sign_extract:GPR (match_operand:GPR 1 "register_operand" "r")
51 (match_operand 2 "const_int_operand")
52 (match_operand 3 "const_int_operand")))]
55 operands[2] = GEN_INT (INTVAL (operands[2]) + INTVAL (operands[3]) - 1);
56 return "th.ext\t%0,%1,%2,%3";
58 [(set_attr "type" "bitmanip")
59 (set_attr "mode" "<GPR:MODE>")])
61 (define_insn "*extendhi<SUPERQI:mode>2_th_ext"
62 [(set (match_operand:SUPERQI 0 "register_operand" "=r,r")
64 (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
65 "TARGET_XTHEADBB && !TARGET_XTHEADMEMIDX"
69 [(set_attr "type" "bitmanip,load")
70 (set_attr "mode" "<SUPERQI:MODE>")])
72 (define_insn "*extendqi<SUPERQI:mode>2_th_ext"
73 [(set (match_operand:SUPERQI 0 "register_operand" "=r,r")
75 (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
76 "TARGET_XTHEADBB && !TARGET_XTHEADMEMIDX"
80 [(set_attr "type" "bitmanip,load")
81 (set_attr "mode" "<SUPERQI:MODE>")])
83 (define_insn "*th_extu<mode>4"
84 [(set (match_operand:GPR 0 "register_operand" "=r")
85 (zero_extract:GPR (match_operand:GPR 1 "register_operand" "r")
86 (match_operand 2 "const_int_operand")
87 (match_operand 3 "const_int_operand")))]
89 && (UINTVAL (operands[2]) + UINTVAL (operands[3])
90 <= GET_MODE_BITSIZE (<MODE>mode))"
92 operands[2] = GEN_INT (INTVAL (operands[2]) + INTVAL (operands[3]) - 1);
93 return "th.extu\t%0,%1,%2,%3";
95 [(set_attr "type" "bitmanip")
96 (set_attr "mode" "<GPR:MODE>")])
98 (define_insn "*zero_extendsidi2_th_extu"
99 [(set (match_operand:DI 0 "register_operand" "=r,r")
100 (zero_extend:DI (match_operand:SI 1 "nonimmediate_operand" "r,m")))]
101 "TARGET_64BIT && TARGET_XTHEADBB && !TARGET_XTHEADMEMIDX"
105 [(set_attr "type" "bitmanip,load")
106 (set_attr "mode" "DI")])
108 (define_insn "*zero_extendhi<GPR:mode>2_th_extu"
109 [(set (match_operand:GPR 0 "register_operand" "=r,r")
110 (zero_extend:GPR (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
111 "TARGET_XTHEADBB && !TARGET_XTHEADMEMIDX"
115 [(set_attr "type" "bitmanip,load")
116 (set_attr "mode" "<GPR:MODE>")])
118 (define_insn "*th_clz<mode>2"
119 [(set (match_operand:X 0 "register_operand" "=r")
120 (clz:X (match_operand:X 1 "register_operand" "r")))]
123 [(set_attr "type" "bitmanip")
124 (set_attr "mode" "<X:MODE>")])
126 (define_insn "th_rev<mode>2"
127 [(set (match_operand:GPR 0 "register_operand" "=r")
128 (bswap:GPR (match_operand:GPR 1 "register_operand" "r")))]
129 "TARGET_XTHEADBB && (TARGET_64BIT || <MODE>mode == SImode)"
131 bool wform = TARGET_64BIT && (<MODE>mode == SImode);
132 return wform ? "th.revw\t%0,%1" : "th.rev\t%0,%1";
134 [(set_attr "type" "bitmanip")
135 (set_attr "mode" "<GPR:MODE>")])
137 (define_insn "th_tstnbz<mode>2"
138 [(set (match_operand:X 0 "register_operand" "=r")
139 (unspec:X [(match_operand:X 1 "register_operand" "r")] UNSPEC_ORC_B))]
142 [(set_attr "type" "bitmanip")])
146 (define_insn "*th_tst<mode>3"
147 [(set (match_operand:X 0 "register_operand" "=r")
148 (zero_extract:X (match_operand:X 1 "register_operand" "r")
150 (match_operand 2 "const_int_operand" "n")))]
151 "TARGET_XTHEADBS && UINTVAL (operands[2]) < GET_MODE_BITSIZE (<MODE>mode)"
153 [(set_attr "type" "bitmanip")])
157 (define_insn "*th_cond_mov<GPR:mode>"
158 [(set (match_operand:GPR 0 "register_operand" "=r,r")
160 (match_operator 4 "equality_operator"
161 [(match_operand:X 1 "register_operand" "r,r")
163 (match_operand:GPR 2 "reg_or_0_operand" "rJ,0")
164 (match_operand:GPR 3 "reg_or_0_operand" "0,rJ")))]
165 "TARGET_XTHEADCONDMOV"
167 if (which_alternative == 0)
168 return "th.mv%C4z\t%0,%z2,%1";
170 /* Invert the condition and take else-block. */
171 rtx_code code = GET_CODE (operands[4]);
172 code = (code == EQ) ? NE : EQ;
173 operands[4] = gen_rtx_fmt_ee (code, VOIDmode, operands[1], const0_rtx);
174 return "th.mv%C4z\t%0,%z3,%1";
176 [(set_attr "type" "condmove")
177 (set_attr "mode" "<GPR:MODE>")])
181 ;; In RV32, we lack fmv.x.d and fmv.d.x, but XTheadFmv has instructions
182 ;; that cover this case.
184 (define_insn "th_fmv_hw_w_x"
185 [(set (match_operand:DF 0 "register_operand" "=f")
186 (unspec:DF [(match_operand:SI 1 "register_operand" "r")
187 (match_operand:SI 2 "register_operand" "r")]
189 "!TARGET_64BIT && TARGET_XTHEADFMV"
190 "fmv.w.x\t%0,%2\n\tth.fmv.hw.x\t%0,%1"
191 [(set_attr "move_type" "move")
192 (set_attr "type" "fmove")
193 (set_attr "mode" "DF")])
195 (define_insn "th_fmv_x_w"
196 [(set (match_operand:SI 0 "register_operand" "=r")
197 (unspec:SI [(match_operand:DF 1 "register_operand" "f")]
199 "!TARGET_64BIT && TARGET_XTHEADFMV"
201 [(set_attr "move_type" "move")
202 (set_attr "type" "fmove")
203 (set_attr "mode" "DF")])
205 (define_insn "th_fmv_x_hw"
206 [(set (match_operand:SI 0 "register_operand" "=r")
207 (unspec:SI [(match_operand:DF 1 "register_operand" "f")]
208 UNSPEC_XTHEADFMV_HW))]
209 "!TARGET_64BIT && TARGET_XTHEADFMV"
211 [(set_attr "move_type" "move")
212 (set_attr "type" "fmove")
213 (set_attr "mode" "DF")])
235 (define_insn "th_int_push"
236 [(unspec_volatile [(const_int 0)] UNSPECV_XTHEADINT_PUSH)
237 (use (reg:SI RETURN_ADDR_REGNUM))
238 (use (reg:SI T0_REGNUM))
239 (use (reg:SI T1_REGNUM))
240 (use (reg:SI T2_REGNUM))
241 (use (reg:SI A0_REGNUM))
242 (use (reg:SI A1_REGNUM))
243 (use (reg:SI A2_REGNUM))
244 (use (reg:SI A3_REGNUM))
245 (use (reg:SI A4_REGNUM))
246 (use (reg:SI A5_REGNUM))
247 (use (reg:SI A6_REGNUM))
248 (use (reg:SI A7_REGNUM))
249 (use (reg:SI T3_REGNUM))
250 (use (reg:SI T4_REGNUM))
251 (use (reg:SI T5_REGNUM))
252 (use (reg:SI T6_REGNUM))]
253 "TARGET_XTHEADINT && !TARGET_64BIT"
255 [(set_attr "type" "store")
256 (set_attr "mode" "SI")])
258 (define_insn "th_int_pop"
259 [(unspec_volatile [(const_int 0)] UNSPECV_XTHEADINT_POP)
260 (clobber (reg:SI RETURN_ADDR_REGNUM))
261 (clobber (reg:SI T0_REGNUM))
262 (clobber (reg:SI T1_REGNUM))
263 (clobber (reg:SI T2_REGNUM))
264 (clobber (reg:SI A0_REGNUM))
265 (clobber (reg:SI A1_REGNUM))
266 (clobber (reg:SI A2_REGNUM))
267 (clobber (reg:SI A3_REGNUM))
268 (clobber (reg:SI A4_REGNUM))
269 (clobber (reg:SI A5_REGNUM))
270 (clobber (reg:SI A6_REGNUM))
271 (clobber (reg:SI A7_REGNUM))
272 (clobber (reg:SI T3_REGNUM))
273 (clobber (reg:SI T4_REGNUM))
274 (clobber (reg:SI T5_REGNUM))
275 (clobber (reg:SI T6_REGNUM))
277 "TARGET_XTHEADINT && !TARGET_64BIT"
279 [(set_attr "type" "ret")
280 (set_attr "mode" "SI")])
284 (define_insn "*th_mula<mode>"
285 [(set (match_operand:X 0 "register_operand" "=r")
286 (plus:X (mult:X (match_operand:X 1 "register_operand" "r")
287 (match_operand:X 2 "register_operand" "r"))
288 (match_operand:X 3 "register_operand" "0")))]
291 [(set_attr "type" "imul")
292 (set_attr "mode" "<MODE>")]
295 (define_insn "*th_mulawsi"
296 [(set (match_operand:DI 0 "register_operand" "=r")
298 (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r")
299 (match_operand:SI 2 "register_operand" "r"))
300 (match_operand:SI 3 "register_operand" "0"))))]
301 "TARGET_XTHEADMAC && TARGET_64BIT"
302 "th.mulaw\\t%0,%1,%2"
303 [(set_attr "type" "imul")
304 (set_attr "mode" "SI")]
307 (define_insn "*th_mulawsi2"
308 [(set (match_operand:SI 0 "register_operand" "=r")
309 (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r")
310 (match_operand:SI 2 "register_operand" "r"))
311 (match_operand:SI 3 "register_operand" "0")))]
312 "TARGET_XTHEADMAC && TARGET_64BIT"
313 "th.mulaw\\t%0,%1,%2"
314 [(set_attr "type" "imul")
315 (set_attr "mode" "SI")]
318 (define_insn "*th_maddhisi4"
319 [(set (match_operand:SI 0 "register_operand" "=r")
322 (sign_extend:SI (match_operand:HI 1 "register_operand" " r"))
323 (sign_extend:SI (match_operand:HI 2 "register_operand" " r")))
324 (match_operand:SI 3 "register_operand" " 0")))]
326 "th.mulah\\t%0,%1,%2"
327 [(set_attr "type" "imul")
328 (set_attr "mode" "SI")]
331 (define_insn "*th_sextw_maddhisi4"
332 [(set (match_operand:DI 0 "register_operand" "=r")
336 (sign_extend:SI (match_operand:HI 1 "register_operand" " r"))
337 (sign_extend:SI (match_operand:HI 2 "register_operand" " r")))
338 (match_operand:SI 3 "register_operand" " 0"))))]
339 "TARGET_XTHEADMAC && TARGET_64BIT"
340 "th.mulah\\t%0,%1,%2"
341 [(set_attr "type" "imul")
342 (set_attr "mode" "SI")]
345 (define_insn "*th_muls<mode>"
346 [(set (match_operand:X 0 "register_operand" "=r")
347 (minus:X (match_operand:X 3 "register_operand" "0")
348 (mult:X (match_operand:X 1 "register_operand" "r")
349 (match_operand:X 2 "register_operand" "r"))))]
352 [(set_attr "type" "imul")
353 (set_attr "mode" "<MODE>")]
356 (define_insn "*th_mulswsi"
357 [(set (match_operand:DI 0 "register_operand" "=r")
359 (minus:SI (match_operand:SI 3 "register_operand" "0")
360 (mult:SI (match_operand:SI 1 "register_operand" "r")
361 (match_operand:SI 2 "register_operand" "r")))))]
362 "TARGET_XTHEADMAC && TARGET_64BIT"
363 "th.mulsw\\t%0,%1,%2"
364 [(set_attr "type" "imul")
365 (set_attr "mode" "SI")]
368 (define_insn "*th_mulswsi2"
369 [(set (match_operand:SI 0 "register_operand" "=r")
370 (minus:SI (match_operand:SI 3 "register_operand" "0")
371 (mult:SI (match_operand:SI 1 "register_operand" "r")
372 (match_operand:SI 2 "register_operand" "r"))))]
373 "TARGET_XTHEADMAC && TARGET_64BIT"
374 "th.mulsw\\t%0,%1,%2"
375 [(set_attr "type" "imul")
376 (set_attr "mode" "SI")]
379 (define_insn "*th_msubhisi4"
380 [(set (match_operand:SI 0 "register_operand" "=r")
381 (minus:SI (match_operand:SI 3 "register_operand" " 0")
382 (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" " r"))
383 (sign_extend:SI (match_operand:HI 2 "register_operand" " r")))))]
385 "th.mulsh\\t%0,%1,%2"
386 [(set_attr "type" "imul")
387 (set_attr "mode" "SI")]
390 (define_insn "*th_sextw_msubhisi4"
391 [(set (match_operand:DI 0 "register_operand" "=r")
393 (minus:SI (match_operand:SI 3 "register_operand" " 0")
395 (sign_extend:SI (match_operand:HI 1 "register_operand" " r"))
396 (sign_extend:SI (match_operand:HI 2 "register_operand" " r"))))))]
397 "TARGET_XTHEADMAC && TARGET_64BIT"
398 "th.mulsh\\t%0,%1,%2"
399 [(set_attr "type" "imul")
400 (set_attr "mode" "SI")]
405 ;; MEMPAIR load 64/32 bit
406 (define_insn "*th_mempair_load_<GPR:mode>2"
407 [(set (match_operand:GPR 0 "register_operand" "=r")
408 (match_operand:GPR 1 "memory_operand" "m"))
409 (set (match_operand:GPR 2 "register_operand" "=r")
410 (match_operand:GPR 3 "memory_operand" "m"))]
411 "TARGET_XTHEADMEMPAIR && reload_completed
412 && th_mempair_operands_p (operands, true, <GPR:MODE>mode)"
413 { return th_mempair_output_move (operands, true, <GPR:MODE>mode, UNKNOWN); }
414 [(set_attr "move_type" "load")
415 (set_attr "type" "load")
416 (set_attr "mode" "<GPR:MODE>")])
418 ;; MEMPAIR store 64/32 bit
419 (define_insn "*th_mempair_store_<GPR:mode>2"
420 [(set (match_operand:GPR 0 "memory_operand" "=m")
421 (match_operand:GPR 1 "register_operand" "r"))
422 (set (match_operand:GPR 2 "memory_operand" "=m")
423 (match_operand:GPR 3 "register_operand" "r"))]
424 "TARGET_XTHEADMEMPAIR && reload_completed
425 && th_mempair_operands_p (operands, false, <GPR:MODE>mode)"
426 { return th_mempair_output_move (operands, false, <GPR:MODE>mode, UNKNOWN); }
427 [(set_attr "move_type" "store")
428 (set_attr "type" "store")
429 (set_attr "mode" "<GPR:MODE>")])
431 ;; MEMPAIR load DI extended signed SI
432 (define_insn "*th_mempair_load_extendsidi2"
433 [(set (match_operand:DI 0 "register_operand" "=r")
434 (sign_extend:DI (match_operand:SI 1 "memory_operand" "m")))
435 (set (match_operand:DI 2 "register_operand" "=r")
436 (sign_extend:DI (match_operand:SI 3 "memory_operand" "m")))]
437 "TARGET_XTHEADMEMPAIR && TARGET_64BIT && reload_completed
438 && th_mempair_operands_p (operands, true, SImode)"
439 { return th_mempair_output_move (operands, true, SImode, SIGN_EXTEND); }
440 [(set_attr "move_type" "load")
441 (set_attr "type" "load")
442 (set_attr "mode" "DI")
443 (set_attr "length" "8")])
445 ;; MEMPAIR load DI extended unsigned SI
446 (define_insn "*th_mempair_load_zero_extendsidi2"
447 [(set (match_operand:DI 0 "register_operand" "=r")
448 (zero_extend:DI (match_operand:SI 1 "memory_operand" "m")))
449 (set (match_operand:DI 2 "register_operand" "=r")
450 (zero_extend:DI (match_operand:SI 3 "memory_operand" "m")))]
451 "TARGET_XTHEADMEMPAIR && TARGET_64BIT && reload_completed
452 && th_mempair_operands_p (operands, true, SImode)"
453 { return th_mempair_output_move (operands, true, SImode, ZERO_EXTEND); }
454 [(set_attr "move_type" "load")
455 (set_attr "type" "load")
456 (set_attr "mode" "DI")
457 (set_attr "length" "8")])
461 (define_insn "*th_memidx_zero_extendqi<SUPERQI:mode>2"
462 [(set (match_operand:SUPERQI 0 "register_operand" "=r,r,r,r,r,r")
464 (match_operand:QI 1 "nonimmediate_operand"
465 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
466 "TARGET_XTHEADMEMIDX"
474 [(set_attr "move_type" "andi,load,load,load,load,load")
475 (set_attr "mode" "<SUPERQI:MODE>")])
477 (define_insn "*th_memidx_extendsidi2"
478 [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r,r")
480 (match_operand:SI 1 "nonimmediate_operand"
481 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
482 "TARGET_64BIT && TARGET_XTHEADMEMIDX"
490 [(set_attr "move_type" "move,load,load,load,load,load")
491 (set_attr "mode" "DI")])
493 ;; XTheadMemIdx (without XTheadBb)
495 (define_insn_and_split "*th_memidx_zero_extendsidi2"
496 [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r,r")
498 (match_operand:SI 1 "nonimmediate_operand"
499 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
500 "TARGET_64BIT && TARGET_XTHEADMEMIDX && !TARGET_XTHEADBB"
509 && REG_P (operands[1])
510 && !paradoxical_subreg_p (operands[0])"
512 (ashift:DI (match_dup 1) (const_int 32)))
514 (lshiftrt:DI (match_dup 0) (const_int 32)))]
515 { operands[1] = gen_lowpart (DImode, operands[1]); }
516 [(set_attr "move_type" "shift_shift,load,load,load,load,load")
517 (set_attr "mode" "DI")])
519 (define_insn_and_split "*th_memidx_zero_extendhi<GPR:mode>2"
520 [(set (match_operand:GPR 0 "register_operand" "=r,r,r,r,r,r")
522 (match_operand:HI 1 "nonimmediate_operand"
523 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
524 "TARGET_XTHEADMEMIDX && !TARGET_XTHEADBB"
533 && REG_P (operands[1])
534 && !paradoxical_subreg_p (operands[0])"
536 (ashift:GPR (match_dup 1) (match_dup 2)))
538 (lshiftrt:GPR (match_dup 0) (match_dup 2)))]
540 operands[1] = gen_lowpart (<GPR:MODE>mode, operands[1]);
541 operands[2] = GEN_INT(GET_MODE_BITSIZE(<GPR:MODE>mode) - 16);
543 [(set_attr "move_type" "shift_shift,load,load,load,load,load")
544 (set_attr "mode" "<GPR:MODE>")])
546 (define_insn_and_split "*th_memidx_extend<SHORT:mode><SUPERQI:mode>2"
547 [(set (match_operand:SUPERQI 0 "register_operand" "=r,r,r,r,r,r")
549 (match_operand:SHORT 1 "nonimmediate_operand"
550 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
551 "TARGET_XTHEADMEMIDX && !TARGET_XTHEADBB"
554 th.l<SHORT:size>ia\t%0,%1
555 th.l<SHORT:size>ib\t%0,%1
556 th.lr<SHORT:size>\t%0,%1
557 th.lur<SHORT:size>\t%0,%1
558 l<SHORT:size>\t%0,%1"
560 && REG_P (operands[1])
561 && !paradoxical_subreg_p (operands[0])"
562 [(set (match_dup 0) (ashift:SI (match_dup 1) (match_dup 2)))
563 (set (match_dup 0) (ashiftrt:SI (match_dup 0) (match_dup 2)))]
565 operands[0] = gen_lowpart (SImode, operands[0]);
566 operands[1] = gen_lowpart (SImode, operands[1]);
567 operands[2] = GEN_INT (GET_MODE_BITSIZE (SImode)
568 - GET_MODE_BITSIZE (<SHORT:MODE>mode));
570 [(set_attr "move_type" "shift_shift,load,load,load,load,load")
571 (set_attr "mode" "SI")])
573 ;; XTheadMemIdx (with XTheadBb)
575 (define_insn "*th_memidx_bb_zero_extendsidi2"
576 [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r,r")
578 (match_operand:SI 1 "nonimmediate_operand"
579 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
580 "TARGET_64BIT && TARGET_XTHEADMEMIDX && TARGET_XTHEADBB"
588 [(set_attr "move_type" "shift_shift,load,load,load,load,load")
589 (set_attr "mode" "DI")])
591 (define_insn "*th_memidx_bb_zero_extendhi<GPR:mode>2"
592 [(set (match_operand:GPR 0 "register_operand" "=r,r,r,r,r,r")
594 (match_operand:HI 1 "nonimmediate_operand"
595 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
596 "TARGET_XTHEADMEMIDX && TARGET_XTHEADBB"
604 [(set_attr "move_type" "shift_shift,load,load,load,load,load")
605 (set_attr "mode" "<GPR:MODE>")])
607 (define_insn "*th_memidx_bb_extendhi<GPR:mode>2"
608 [(set (match_operand:GPR 0 "register_operand" "=r,r,r,r,r,r")
610 (match_operand:HI 1 "nonimmediate_operand"
611 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
612 "TARGET_XTHEADMEMIDX && TARGET_XTHEADBB"
620 [(set_attr "move_type" "shift_shift,load,load,load,load,load")
621 (set_attr "mode" "<GPR:MODE>")])
623 (define_insn "*th_memidx_bb_extendqi<SUPERQI:mode>2"
624 [(set (match_operand:SUPERQI 0 "register_operand" "=r,r,r,r,r,r")
626 (match_operand:QI 1 "nonimmediate_operand"
627 " r,th_m_mia,th_m_mib,th_m_mir,th_m_miu,m")))]
628 "TARGET_XTHEADMEMIDX && TARGET_XTHEADBB"
636 [(set_attr "move_type" "shift_shift,load,load,load,load,load")
637 (set_attr "mode" "<SUPERQI:MODE>")])
639 (include "thead-peephole.md")