|
12647 | 12647 | ""
|
12648 | 12648 | )
|
12649 | 12649 |
|
| 12650 | +;; Implement zero_extract using uxtb/uxth instruction with |
| 12651 | +;; the ror #N qualifier when applicable. |
| 12652 | + |
| 12653 | +(define_insn "*arm_zeroextractsi2_8_8" |
| 12654 | + [(set (match_operand:SI 0 "s_register_operand" "=r") |
| 12655 | + (zero_extract:SI (match_operand:SI 1 "s_register_operand" "r") |
| 12656 | + (const_int 8) (const_int 8)))] |
| 12657 | + "TARGET_ARM && arm_arch6" |
| 12658 | + "uxtb%?\\t%0, %1, ror #8" |
| 12659 | + [(set_attr "predicable" "yes") |
| 12660 | + (set_attr "type" "extend")] |
| 12661 | +) |
| 12662 | + |
| 12663 | +(define_insn "*arm_zeroextractsi2_8_16" |
| 12664 | + [(set (match_operand:SI 0 "s_register_operand" "=r") |
| 12665 | + (zero_extract:SI (match_operand:SI 1 "s_register_operand" "r") |
| 12666 | + (const_int 8) (const_int 16)))] |
| 12667 | + "TARGET_ARM && arm_arch6" |
| 12668 | + "uxtb%?\\t%0, %1, ror #16" |
| 12669 | + [(set_attr "predicable" "yes") |
| 12670 | + (set_attr "type" "extend")] |
| 12671 | +) |
| 12672 | + |
| 12673 | +(define_insn "*arm_zeroextractsi2_16_8" |
| 12674 | + [(set (match_operand:SI 0 "s_register_operand" "=r") |
| 12675 | + (zero_extract:SI (match_operand:SI 1 "s_register_operand" "r") |
| 12676 | + (const_int 16) (const_int 8)))] |
| 12677 | + "TARGET_ARM && arm_arch6" |
| 12678 | + "uxth%?\\t%0, %1, ror #8" |
| 12679 | + [(set_attr "predicable" "yes") |
| 12680 | + (set_attr "type" "extend")] |
| 12681 | +) |
| 12682 | + |
| 12683 | +;; Implement sign_extract using sxtb/sxth instruction with |
| 12684 | +;; the ror #N qualifier when applicable. |
| 12685 | + |
| 12686 | +(define_insn "*arm_signextractsi2_8_8" |
| 12687 | + [(set (match_operand:SI 0 "s_register_operand" "=r") |
| 12688 | + (sign_extract:SI (match_operand:SI 1 "s_register_operand" "r") |
| 12689 | + (const_int 8) (const_int 8)))] |
| 12690 | + "TARGET_ARM && arm_arch6" |
| 12691 | + "sxtb%?\\t%0, %1, ror #8" |
| 12692 | + [(set_attr "predicable" "yes") |
| 12693 | + (set_attr "type" "extend")] |
| 12694 | +) |
| 12695 | + |
| 12696 | +(define_insn "*arm_signextractsi2_8_16" |
| 12697 | + [(set (match_operand:SI 0 "s_register_operand" "=r") |
| 12698 | + (sign_extract:SI (match_operand:SI 1 "s_register_operand" "r") |
| 12699 | + (const_int 8) (const_int 16)))] |
| 12700 | + "TARGET_ARM && arm_arch6" |
| 12701 | + "sxtb%?\\t%0, %1, ror #16" |
| 12702 | + [(set_attr "predicable" "yes") |
| 12703 | + (set_attr "type" "extend")] |
| 12704 | +) |
| 12705 | + |
| 12706 | +(define_insn "*arm_signextractsi2_16_8" |
| 12707 | + [(set (match_operand:SI 0 "s_register_operand" "=r") |
| 12708 | + (sign_extract:SI (match_operand:SI 1 "s_register_operand" "r") |
| 12709 | + (const_int 16) (const_int 8)))] |
| 12710 | + "TARGET_ARM && arm_arch6" |
| 12711 | + "sxth%?\\t%0, %1, ror #8" |
| 12712 | + [(set_attr "predicable" "yes") |
| 12713 | + (set_attr "type" "extend")] |
| 12714 | +) |
| 12715 | + |
12650 | 12716 | ;; Patterns for LDRD/STRD in Thumb2 mode
|
12651 | 12717 |
|
12652 | 12718 | (define_insn "*thumb2_ldrd"
|
|
0 commit comments