comparison gcc/config/picochip/picochip.md @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children b7f97abdc517
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
549 ;; branch should occur. 549 ;; branch should occur.
550 550
551 (define_insn_and_split "cbranchhi4" 551 (define_insn_and_split "cbranchhi4"
552 [(set (pc) 552 [(set (pc)
553 (if_then_else 553 (if_then_else
554 (match_operator:CC 0 "comparison_operator" 554 (match_operator:CC 0 "ordered_comparison_operator"
555 [(match_operand:HI 1 "register_operand" "r") 555 [(match_operand:HI 1 "register_operand" "r")
556 (match_operand:HI 2 "picochip_comparison_operand" "ri")]) 556 (match_operand:HI 2 "picochip_comparison_operand" "ri")])
557 (label_ref (match_operand 3 "" "")) 557 (label_ref (match_operand 3 "" ""))
558 (pc))) 558 (pc)))
559 (clobber (reg:CC CC_REGNUM))] 559 (clobber (reg:CC CC_REGNUM))]
2522 } 2522 }
2523 [(set_attr "length" "2") 2523 [(set_attr "length" "2")
2524 (set_attr "type" "picoAlu,picoAlu") 2524 (set_attr "type" "picoAlu,picoAlu")
2525 (set_attr "longConstant" "false,true")]) 2525 (set_attr "longConstant" "false,true")])
2526 2526
2527 ;; cmphi - This needs to be defined, to ensure that the conditional
2528 ;; move works properly (because the if-cvt code uses this pattern to
2529 ;; build the conditional move, even though normally we use cbranch to
2530 ;; directly generate the instructions).
2531
2532 (define_expand "cmphi"
2533 [(match_operand:HI 0 "general_operand" "g")
2534 (match_operand:HI 1 "general_operand" "g")]
2535 ""
2536 "DONE;")
2537
2538 ;;============================================================================
2539 ;; Branch patterns - needed for conditional moves. This is because
2540 ;; they result in the bcc_gen_fctn array being initialised with the
2541 ;; code to define_expand the following, and this in turn means that
2542 ;; when noce_emit_cmove is called, the correct pattern can be
2543 ;; generated, based upon the assumed presence of the following. The
2544 ;; following are never actually used, because the earlier cbranch
2545 ;; patterns take precendence.
2546 ;;============================================================================
2547
2548 (define_expand "bne"
2549 [(set (pc)
2550 (if_then_else
2551 (ne (reg:CC CC_REGNUM) (const_int 0))
2552 (label_ref (match_operand 0 "" ""))
2553 (pc)))]
2554 ""
2555 "gcc_unreachable();")
2556
2557 (define_expand "beq"
2558 [(set (pc)
2559 (if_then_else
2560 (eq (reg:CC CC_REGNUM) (const_int 0))
2561 (label_ref (match_operand 0 "" ""))
2562 (pc)))]
2563 ""
2564 "gcc_unreachable();")
2565
2566 (define_expand "blt"
2567 [(set (pc)
2568 (if_then_else
2569 (lt (reg:CC CC_REGNUM) (const_int 0))
2570 (label_ref (match_operand 0 "" ""))
2571 (pc)))]
2572 ""
2573 "gcc_unreachable();")
2574
2575 (define_expand "bge"
2576 [(set (pc)
2577 (if_then_else
2578 (ge (reg:CC CC_REGNUM) (const_int 0))
2579 (label_ref (match_operand 0 "" ""))
2580 (pc)))]
2581 ""
2582 "gcc_unreachable();")
2583
2584 (define_expand "bgeu"
2585 [(set (pc)
2586 (if_then_else
2587 (geu (reg:CC CC_REGNUM) (const_int 0))
2588 (label_ref (match_operand 0 "" ""))
2589 (pc)))]
2590 ""
2591 "gcc_unreachable();")
2592
2593 (define_expand "bltu"
2594 [(set (pc)
2595 (if_then_else
2596 (ltu (reg:CC CC_REGNUM) (const_int 0))
2597 (label_ref (match_operand 0 "" ""))
2598 (pc)))]
2599 ""
2600 "gcc_unreachable();")
2601
2602 (define_expand "ble"
2603 [(set (pc)
2604 (if_then_else
2605 (le (reg:CC CC_REGNUM) (const_int 0))
2606 (label_ref (match_operand 0 "" ""))
2607 (pc)))]
2608 ""
2609 "gcc_unreachable();")
2610
2611 (define_expand "bgt"
2612 [(set (pc)
2613 (if_then_else
2614 (gt (reg:CC CC_REGNUM) (const_int 0))
2615 (label_ref (match_operand 0 "" ""))
2616 (pc)))]
2617 ""
2618 "gcc_unreachable();")
2619
2620 (define_expand "bleu"
2621 [(set (pc)
2622 (if_then_else
2623 (leu (reg:CC CC_REGNUM) (const_int 0))
2624 (label_ref (match_operand 0 "" ""))
2625 (pc)))]
2626 ""
2627 "gcc_unreachable();")
2628
2629 (define_expand "bgtu"
2630 [(set (pc)
2631 (if_then_else
2632 (gtu (reg:CC CC_REGNUM) (const_int 0))
2633 (label_ref (match_operand 0 "" ""))
2634 (pc)))]
2635 ""
2636 "gcc_unreachable();")
2637
2638 ;;============================================================================ 2527 ;;============================================================================
2639 ;; Scheduling, including delay slot scheduling. 2528 ;; Scheduling, including delay slot scheduling.
2640 ;;============================================================================ 2529 ;;============================================================================
2641 2530
2642 (automata_option "v") 2531 (automata_option "v")