|
177 | 177 |
|
178 | 178 | (define_attr "type" |
179 | 179 | "move,load,store,cmove,unary,binary,compare,shift,uncond_branch,jump,branch, |
180 | | - brcc,brcc_no_delay_slot,call,sfunc,call_no_delay_slot, |
| 180 | + brcc,brcc_no_delay_slot,call,sfunc,call_no_delay_slot,retintr, |
181 | 181 | multi,umulti, two_cycle_core,lr,sr,divaw,loop_setup,loop_end,return, |
182 | 182 | misc,spfp,dpfp_mult,dpfp_addsub,mulmac_600,cc_arith, |
183 | 183 | simd_vload, simd_vload128, simd_vstore, simd_vmove, simd_vmove_else_zero, |
|
445 | 445 |
|
446 | 446 | (define_attr "in_delay_slot" "false,true" |
447 | 447 | (cond [(eq_attr "type" "uncond_branch,jump,branch, |
448 | | - call,sfunc,call_no_delay_slot, |
| 448 | + call,sfunc,call_no_delay_slot,retintr, |
449 | 449 | brcc, brcc_no_delay_slot,loop_setup,loop_end") |
450 | 450 | (const_string "false") |
451 | 451 | (match_test "arc_write_ext_corereg (insn)") |
|
4777 | 4777 | = gen_rtx_REG (Pmode, |
4778 | 4778 | arc_return_address_regs[arc_compute_function_type (cfun)]); |
4779 | 4779 |
|
4780 | | - if (TARGET_PAD_RETURN) |
4781 | | - arc_pad_return (); |
4782 | | - output_asm_insn (\"j%!%* [%0]%&\", ®); |
4783 | | - return \"\"; |
| 4780 | + if (arc_compute_function_type (cfun) == ARC_FUNCTION_ILINK1 |
| 4781 | + && TARGET_V2) |
| 4782 | + { |
| 4783 | + return \"reti\"; |
| 4784 | + } |
| 4785 | + else |
| 4786 | + { |
| 4787 | + if (TARGET_PAD_RETURN) |
| 4788 | + arc_pad_return (); |
| 4789 | + output_asm_insn (\"j%!%* [%0]%&\", ®); |
| 4790 | + return \"\"; |
| 4791 | + } |
4784 | 4792 | } |
4785 | | - [(set_attr "type" "return") |
| 4793 | +[(set (attr "type") |
| 4794 | + (cond [(and (eq (symbol_ref "arc_compute_function_type (cfun)") |
| 4795 | + (symbol_ref "ARC_FUNCTION_ILINK1")) |
| 4796 | + (match_test "TARGET_V2")) |
| 4797 | + (const_string "retintr")] |
| 4798 | + (const_string "return"))) |
4786 | 4799 | ; predicable won't help here since the canonical rtl looks different |
4787 | 4800 | ; for branches. |
4788 | | - (set_attr "cond" "canuse") |
| 4801 | + (set (attr "cond") |
| 4802 | + (cond [(and (eq (symbol_ref "arc_compute_function_type (cfun)") |
| 4803 | + (symbol_ref "ARC_FUNCTION_ILINK1")) |
| 4804 | + (match_test "TARGET_V2")) |
| 4805 | + (const_string "nocond")] |
| 4806 | + (const_string "canuse"))) |
4789 | 4807 | (set (attr "iscompact") |
4790 | 4808 | (cond [(eq (symbol_ref "arc_compute_function_type (cfun)") |
4791 | 4809 | (symbol_ref "ARC_FUNCTION_NORMAL")) |
|
0 commit comments