|
2012 | 2012 | { |
2013 | 2013 | if (TARGET_HS && (arc_mpy_option > 7)) |
2014 | 2014 | { |
2015 | | - emit_insn (gen_mpyd_arcv2hs (operands[0], operands[1], operands[2])); |
| 2015 | + if (CONST_INT_P (operands[2])) |
| 2016 | + { |
| 2017 | + emit_insn (gen_mpyd_imm_arcv2hs (operands[0], operands[1], operands[2])); |
| 2018 | + } |
| 2019 | + else |
| 2020 | + { |
| 2021 | + emit_insn (gen_mpyd_arcv2hs (operands[0], operands[1], operands[2])); |
| 2022 | + } |
2016 | 2023 | DONE; |
2017 | 2024 | } |
2018 | 2025 | else if ((TARGET_ARC700 && TARGET_MPY_SET) || EM_MULTI) |
|
2252 | 2259 | { |
2253 | 2260 | if (TARGET_HS && (arc_mpy_option > 7)) |
2254 | 2261 | { |
2255 | | - emit_insn (gen_mpydu_arcv2hs (operands[0], operands[1], operands[2])); |
| 2262 | + if (CONST_INT_P (operands[2])) |
| 2263 | + { |
| 2264 | + emit_insn (gen_mpydu_imm_arcv2hs (operands[0], operands[1], operands[2])); |
| 2265 | + } |
| 2266 | + else |
| 2267 | + { |
| 2268 | + emit_insn (gen_mpydu_arcv2hs (operands[0], operands[1], operands[2])); |
| 2269 | + } |
2256 | 2270 | DONE; |
2257 | 2271 | } |
2258 | 2272 | else if ((TARGET_ARC700 && TARGET_MPY_SET) || EM_MULTI) |
|
5782 | 5796 | (set_attr "cond" "canuse,nocond,nocond,canuse,nocond")]) |
5783 | 5797 |
|
5784 | 5798 | (define_insn "mpyd_arcv2hs" |
| 5799 | + [(set (match_operand:DI 0 "nonimmediate_operand" "=Rcr, r") |
| 5800 | + (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" " 0, c")) |
| 5801 | + (sign_extend:DI (match_operand:SI 2 "register_operand" " c, c")))) |
| 5802 | + (clobber (reg:DI 56))] |
| 5803 | + "TARGET_HS && (arc_mpy_option > 7)" |
| 5804 | + "mpyd%? %0, %1, %2" |
| 5805 | + [(set_attr "length" "4,4") |
| 5806 | + (set_attr "iscompact" "false") |
| 5807 | + (set_attr "type" "multi") |
| 5808 | + (set_attr "predicable" "yes,no") |
| 5809 | + (set_attr "cond" "canuse,nocond")]) |
| 5810 | + |
| 5811 | +(define_insn "mpyd_imm_arcv2hs" |
5785 | 5812 | [(set (match_operand:DI 0 "nonimmediate_operand" "=Rcr, r,r,Rcr, r") |
5786 | 5813 | (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" " 0, c,0, 0, c")) |
5787 | | - (sign_extend:DI (match_operand:SI 2 "nonmemory_operand" " cL,cL,I,Cal,Cal")))) |
| 5814 | + (match_operand 2 "immediate_operand" " L, L,I,Cal,Cal"))) |
5788 | 5815 | (clobber (reg:DI 56))] |
5789 | 5816 | "TARGET_HS && (arc_mpy_option > 7)" |
5790 | 5817 | "mpyd%? %0, %1, %2" |
|
5795 | 5822 | (set_attr "cond" "canuse,nocond,nocond,canuse_limm,nocond")]) |
5796 | 5823 |
|
5797 | 5824 | (define_insn "mpydu_arcv2hs" |
| 5825 | + [(set (match_operand:DI 0 "nonimmediate_operand" "=Rcr, r") |
| 5826 | + (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" " 0, c")) |
| 5827 | + (zero_extend:DI (match_operand:SI 2 "register_operand" " c, c")))) |
| 5828 | + (clobber (reg:DI 56))] |
| 5829 | + "TARGET_HS && (arc_mpy_option > 7)" |
| 5830 | + "mpydu%? %0, %1, %2" |
| 5831 | + [(set_attr "length" "4,4") |
| 5832 | + (set_attr "iscompact" "false") |
| 5833 | + (set_attr "type" "multi") |
| 5834 | + (set_attr "predicable" "yes,no") |
| 5835 | + (set_attr "cond" "canuse,nocond")]) |
| 5836 | + |
| 5837 | +(define_insn "mpydu_imm_arcv2hs" |
5798 | 5838 | [(set (match_operand:DI 0 "nonimmediate_operand" "=Rcr, r,r,Rcr, r") |
5799 | 5839 | (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" " 0, c,0, 0, c")) |
5800 | | - (zero_extend:DI (match_operand:SI 2 "nonmemory_operand" " cL,cL,I,Cal,Cal")))) |
| 5840 | + (match_operand 2 "immediate_operand" " L, L,I,Cal,Cal"))) |
5801 | 5841 | (clobber (reg:DI 56))] |
5802 | 5842 | "TARGET_HS && (arc_mpy_option > 7)" |
5803 | 5843 | "mpydu%? %0, %1, %2" |
|
5807 | 5847 | (set_attr "predicable" "yes,no,no,yes,no") |
5808 | 5848 | (set_attr "cond" "canuse,nocond,nocond,canuse_limm,nocond")]) |
5809 | 5849 |
|
| 5850 | + |
5810 | 5851 | (define_insn "*movdi_hsll64" |
5811 | 5852 | [(set (match_operand:DI 0 "nonimmediate_operand" "=r,m") |
5812 | 5853 | (match_operand:DI 1 "nonimmediate_operand" "m,c"))] |
|
0 commit comments