comparison gcc/config/rs6000/rs6000.md @ 112:ab0bcb71f44d

merge gcc 7
author mir3636
date Fri, 10 Nov 2017 19:46:38 +0900
parents 04ced10e8804 1b10fe6932e1
children d34655255c78
comparison
equal deleted inserted replaced
111:04ced10e8804 112:ab0bcb71f44d
11442 b %z1 11442 b %z1
11443 b%T1" 11443 b%T1"
11444 [(set_attr "type" "branch") 11444 [(set_attr "type" "branch")
11445 (set_attr "length" "4")]) 11445 (set_attr "length" "4")])
11446 11446
11447 <<<<<<< local
11448 =======
11449 (define_insn "*sibcall_value_nonlocal_aix32"
11450 [(set (match_operand 0 "" "")
11451 (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s"))
11452 (match_operand 2 "" "g")))
11453 (use (match_operand:SI 3 "immediate_operand" "O"))
11454 (use (reg:SI LR_REGNO))
11455 (return)]
11456 "TARGET_32BIT
11457 && DEFAULT_ABI == ABI_AIX
11458 && (INTVAL (operands[3]) & CALL_LONG) == 0"
11459 "b %z1"
11460 [(set_attr "type" "branch")
11461 (set_attr "length" "4")])
11462
11463 (define_insn "*sibcall_value_nonlocal_aix64"
11464 [(set (match_operand 0 "" "")
11465 (call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s"))
11466 (match_operand 2 "" "g")))
11467 (use (match_operand:SI 3 "immediate_operand" "O"))
11468 (use (reg:SI LR_REGNO))
11469 (return)]
11470 "TARGET_64BIT
11471 && DEFAULT_ABI == ABI_AIX
11472 && (INTVAL (operands[3]) & CALL_LONG) == 0"
11473 "b %z1"
11474 [(set_attr "type" "branch")
11475 (set_attr "length" "4")])
11476
11477 (define_insn "*sibcall_nonlocal_sysv<mode>"
11478 [(call (mem:SI (match_operand:P 0 "symbol_ref_operand" "s,s"))
11479 (match_operand 1 "" ""))
11480 (use (match_operand 2 "immediate_operand" "O,n"))
11481 (use (reg:SI LR_REGNO))
11482 (return)]
11483 "(DEFAULT_ABI == ABI_DARWIN
11484 || DEFAULT_ABI == ABI_V4)
11485 && (INTVAL (operands[2]) & CALL_LONG) == 0"
11486 "*
11487 {
11488 if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS)
11489 output_asm_insn (\"crxor 6,6,6\", operands);
11490
11491 else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
11492 output_asm_insn (\"creqv 6,6,6\", operands);
11493
11494 if (DEFAULT_ABI == ABI_V4 && flag_pic)
11495 {
11496 gcc_assert (!TARGET_SECURE_PLT);
11497 return \"b %z0@plt\";
11498 }
11499 else
11500 return \"b %z0\";
11501 }"
11502 [(set_attr "type" "branch,branch")
11503 (set_attr "length" "4,8")])
11504
11505
11506 ;; added by kent.
11507 ;; for indirect sibcalls of Continuation based C.
11508 ;; this is based on call_indirect_nonlocal_sysv<mode>"
11509 (define_insn "*sibcall_indirect_nonlocal_sysv<mode>"
11510 [(call (mem:SI (match_operand:P 0 "register_operand" "c,*l,c,*l"))
11511 (match_operand 1 "" "g,g,g,g"))
11512 (use (match_operand:SI 2 "immediate_operand" "O,O,n,n"))
11513 (use (reg:SI LR_REGNO))
11514 (return)]
11515 "DEFAULT_ABI == ABI_V4
11516 || DEFAULT_ABI == ABI_DARWIN"
11517 {
11518 /*
11519 if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS)
11520 output_asm_insn ("crxor 6,6,6", operands);
11521
11522 else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
11523 output_asm_insn ("creqv 6,6,6", operands);
11524 */
11525
11526 return "b%T0";
11527 }
11528 [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg")
11529 (set_attr "length" "4,4,8,8")])
11530
11531
11532
11533
11534 (define_expand "sibcall_value"
11535 [(parallel [(set (match_operand 0 "register_operand" "")
11536 (call (mem:SI (match_operand 1 "address_operand" ""))
11537 (match_operand 2 "" "")))
11538 (use (match_operand 3 "" ""))
11539 (use (reg:SI LR_REGNO))
11540 (return)])]
11541 ""
11542 "
11543 {
11544 #if TARGET_MACHO
11545 if (MACHOPIC_INDIRECT)
11546 operands[1] = machopic_indirect_call_target (operands[1]);
11547 #endif
11548
11549 gcc_assert (GET_CODE (operands[1]) == MEM);
11550 gcc_assert (GET_CODE (operands[2]) == CONST_INT);
11551
11552 operands[1] = XEXP (operands[1], 0);
11553 }")
11554
11555 (define_insn "*sibcall_value_nonlocal_sysv<mode>"
11556 [(set (match_operand 0 "" "")
11557 (call (mem:SI (match_operand:P 1 "symbol_ref_operand" "s,s"))
11558 (match_operand 2 "" "")))
11559 (use (match_operand:SI 3 "immediate_operand" "O,n"))
11560 (use (reg:SI LR_REGNO))
11561 (return)]
11562 "(DEFAULT_ABI == ABI_DARWIN
11563 || DEFAULT_ABI == ABI_V4)
11564 && (INTVAL (operands[3]) & CALL_LONG) == 0"
11565 "*
11566 {
11567 if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS)
11568 output_asm_insn (\"crxor 6,6,6\", operands);
11569
11570 else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
11571 output_asm_insn (\"creqv 6,6,6\", operands);
11572
11573 if (DEFAULT_ABI == ABI_V4 && flag_pic)
11574 {
11575 gcc_assert (!TARGET_SECURE_PLT);
11576 return \"b %z1@plt\";
11577 }
11578 else
11579 return \"b %z1\";
11580 }"
11581 [(set_attr "type" "branch,branch")
11582 (set_attr "length" "4,8")])
11583
11584 >>>>>>> other
11447 (define_expand "sibcall_epilogue" 11585 (define_expand "sibcall_epilogue"
11448 [(use (const_int 0))] 11586 [(use (const_int 0))]
11449 "" 11587 ""
11450 { 11588 {
11451 if (!TARGET_SCHED_PROLOG) 11589 if (!TARGET_SCHED_PROLOG)