comparison gcc/config/rs6000/rs6000.md @ 27:f9b1a53df341

implemented indirect sibcall for ppc.
author kent@teto.cr.ie.u-ryukyu.ac.jp
date Tue, 10 Nov 2009 16:34:29 +0900
parents a06113de4d67
children f2ea7e07d030
comparison
equal deleted inserted replaced
26:b388631e4738 27:f9b1a53df341
11679 return \"b %z0\"; 11679 return \"b %z0\";
11680 }" 11680 }"
11681 [(set_attr "type" "branch,branch") 11681 [(set_attr "type" "branch,branch")
11682 (set_attr "length" "4,8")]) 11682 (set_attr "length" "4,8")])
11683 11683
11684
11685 ;; added by kent.
11686 ;; for indirect sibcalls of Continuation based C.
11687 ;; this is based on call_indirect_nonlocal_sysv<mode>"
11688 (define_insn "*sibcall_indirect_nonlocal_sysv<mode>"
11689 [(call (mem:SI (match_operand:P 0 "register_operand" "c,*l,c,*l"))
11690 (match_operand 1 "" "g,g,g,g"))
11691 (use (match_operand:SI 2 "immediate_operand" "O,O,n,n"))
11692 (use (reg:SI LR_REGNO))
11693 (return)]
11694 "DEFAULT_ABI == ABI_V4
11695 || DEFAULT_ABI == ABI_DARWIN"
11696 {
11697 /*
11698 if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS)
11699 output_asm_insn ("crxor 6,6,6", operands);
11700
11701 else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
11702 output_asm_insn ("creqv 6,6,6", operands);
11703 */
11704
11705 return "b%T0";
11706 }
11707 [(set_attr "type" "branch,branch")
11708 (set_attr "length" "4,8")])
11709
11710
11711
11712
11684 (define_expand "sibcall_value" 11713 (define_expand "sibcall_value"
11685 [(parallel [(set (match_operand 0 "register_operand" "") 11714 [(parallel [(set (match_operand 0 "register_operand" "")
11686 (call (mem:SI (match_operand 1 "address_operand" "")) 11715 (call (mem:SI (match_operand 1 "address_operand" ""))
11687 (match_operand 2 "" ""))) 11716 (match_operand 2 "" "")))
11688 (use (match_operand 3 "" "")) 11717 (use (match_operand 3 "" ""))