comparison gcc/config/i386/i386.md @ 48:9907f3135723

update CbC on GCC from 4.4.2 to 4.4.3.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Sun, 07 Feb 2010 17:48:31 +0900
parents 27e6f95b2c21 3bfb6c00c1e0
children 326d9e06c2e3
comparison
equal deleted inserted replaced
45:d645ac0f55d6 48:9907f3135723
9878 (zero_extract:SI (match_operand 2 "ext_register_operand" "Q") 9878 (zero_extract:SI (match_operand 2 "ext_register_operand" "Q")
9879 (const_int 8) 9879 (const_int 8)
9880 (const_int 8)))) 9880 (const_int 8))))
9881 (clobber (reg:CC FLAGS_REG))] 9881 (clobber (reg:CC FLAGS_REG))]
9882 "(!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun))" 9882 "(!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun))"
9883 "ior{b}\t{%h2, %h0|%h0, %h2}" 9883 "or{b}\t{%h2, %h0|%h0, %h2}"
9884 [(set_attr "type" "alu") 9884 [(set_attr "type" "alu")
9885 (set_attr "length_immediate" "0") 9885 (set_attr "length_immediate" "0")
9886 (set_attr "mode" "QI")]) 9886 (set_attr "mode" "QI")])
9887 9887
9888 (define_split 9888 (define_split
14939 14939
14940 ;; The predicates normally associated with named expanders are not properly 14940 ;; The predicates normally associated with named expanders are not properly
14941 ;; checked for calls. This is a bug in the generic code, but it isn't that 14941 ;; checked for calls. This is a bug in the generic code, but it isn't that
14942 ;; easy to fix. Ignore it for now and be prepared to fix things up. 14942 ;; easy to fix. Ignore it for now and be prepared to fix things up.
14943 14943
14944 ;; P6 processors will jump to the address after the decrement when %esp
14945 ;; is used as a call operand, so they will execute return address as a code.
14946 ;; See Pentium Pro errata 70, Pentium 2 errata A33 and Pentium 3 errata E17.
14947
14944 ;; Call subroutine returning no value. 14948 ;; Call subroutine returning no value.
14945 14949
14946 (define_expand "call_pop" 14950 (define_expand "call_pop"
14947 [(parallel [(call (match_operand:QI 0 "" "") 14951 [(parallel [(call (match_operand:QI 0 "" "")
14948 (match_operand:SI 1 "" "")) 14952 (match_operand:SI 1 "" ""))
14968 return "call\t%P0"; 14972 return "call\t%P0";
14969 } 14973 }
14970 [(set_attr "type" "call")]) 14974 [(set_attr "type" "call")])
14971 14975
14972 (define_insn "*call_pop_1" 14976 (define_insn "*call_pop_1"
14973 [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm")) 14977 [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lsm"))
14974 (match_operand:SI 1 "" "")) 14978 (match_operand:SI 1 "" ""))
14975 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) 14979 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
14976 (match_operand:SI 2 "immediate_operand" "i")))] 14980 (match_operand:SI 2 "immediate_operand" "i")))]
14977 "!SIBLING_CALL_P (insn) && !TARGET_64BIT" 14981 "!TARGET_64BIT && !SIBLING_CALL_P (insn)"
14978 { 14982 {
14979 if (constant_call_address_operand (operands[0], Pmode)) 14983 if (constant_call_address_operand (operands[0], Pmode))
14980 return "call\t%P0"; 14984 return "call\t%P0";
14981 return "call\t%A0"; 14985 return "call\t%A0";
14982 } 14986 }
14985 (define_insn "*sibcall_pop_1" 14989 (define_insn "*sibcall_pop_1"
14986 [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U")) 14990 [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U"))
14987 (match_operand:SI 1 "" "")) 14991 (match_operand:SI 1 "" ""))
14988 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) 14992 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
14989 (match_operand:SI 2 "immediate_operand" "i,i")))] 14993 (match_operand:SI 2 "immediate_operand" "i,i")))]
14990 "SIBLING_CALL_P (insn) && !TARGET_64BIT" 14994 "!TARGET_64BIT && SIBLING_CALL_P (insn)"
14991 "@ 14995 "@
14992 jmp\t%P0 14996 jmp\t%P0
14993 jmp\t%A0" 14997 jmp\t%A0"
14994 [(set_attr "type" "call")]) 14998 [(set_attr "type" "call")])
14995 14999
15036 return "call\t%P0"; 15040 return "call\t%P0";
15037 } 15041 }
15038 [(set_attr "type" "call")]) 15042 [(set_attr "type" "call")])
15039 15043
15040 (define_insn "*call_1" 15044 (define_insn "*call_1"
15041 [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm")) 15045 [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lsm"))
15042 (match_operand 1 "" ""))] 15046 (match_operand 1 "" ""))]
15043 "!SIBLING_CALL_P (insn) && !TARGET_64BIT" 15047 "!TARGET_64BIT && !SIBLING_CALL_P (insn)"
15044 { 15048 {
15045 if (constant_call_address_operand (operands[0], Pmode)) 15049 if (constant_call_address_operand (operands[0], Pmode))
15046 return "call\t%P0"; 15050 return "call\t%P0";
15047 return "call\t%A0"; 15051 return "call\t%A0";
15048 } 15052 }
15049 [(set_attr "type" "call")]) 15053 [(set_attr "type" "call")])
15050 15054
15051 (define_insn "*sibcall_1" 15055 (define_insn "*sibcall_1"
15052 [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U")) 15056 [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U"))
15053 (match_operand 1 "" ""))] 15057 (match_operand 1 "" ""))]
15054 "SIBLING_CALL_P (insn) && !TARGET_64BIT" 15058 "!TARGET_64BIT && SIBLING_CALL_P (insn)"
15055 "@ 15059 "@
15056 jmp\t%P0 15060 jmp\t%P0
15057 jmp\t%A0" 15061 jmp\t%A0"
15058 [(set_attr "type" "call")]) 15062 [(set_attr "type" "call")])
15059 15063
15060 (define_insn "*call_1_rex64" 15064 (define_insn "*call_1_rex64"
15061 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rsm")) 15065 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rsm"))
15062 (match_operand 1 "" ""))] 15066 (match_operand 1 "" ""))]
15063 "!SIBLING_CALL_P (insn) && TARGET_64BIT 15067 "TARGET_64BIT && !SIBLING_CALL_P (insn)
15064 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC" 15068 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC"
15065 { 15069 {
15066 if (constant_call_address_operand (operands[0], Pmode)) 15070 if (constant_call_address_operand (operands[0], Pmode))
15067 return "call\t%P0"; 15071 return "call\t%P0";
15068 return "call\t%A0"; 15072 return "call\t%A0";
15083 (clobber (reg:TI XMM13_REG)) 15087 (clobber (reg:TI XMM13_REG))
15084 (clobber (reg:TI XMM14_REG)) 15088 (clobber (reg:TI XMM14_REG))
15085 (clobber (reg:TI XMM15_REG)) 15089 (clobber (reg:TI XMM15_REG))
15086 (clobber (reg:DI SI_REG)) 15090 (clobber (reg:DI SI_REG))
15087 (clobber (reg:DI DI_REG))] 15091 (clobber (reg:DI DI_REG))]
15088 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 15092 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
15089 { 15093 {
15090 if (constant_call_address_operand (operands[0], Pmode)) 15094 if (constant_call_address_operand (operands[0], Pmode))
15091 return "call\t%P0"; 15095 return "call\t%P0";
15092 return "call\t%A0"; 15096 return "call\t%A0";
15093 } 15097 }
15094 [(set_attr "type" "call")]) 15098 [(set_attr "type" "call")])
15095 15099
15096 (define_insn "*call_1_rex64_large" 15100 (define_insn "*call_1_rex64_large"
15097 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rm")) 15101 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rm"))
15098 (match_operand 1 "" ""))] 15102 (match_operand 1 "" ""))]
15099 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 15103 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
15100 "call\t%A0" 15104 "call\t%A0"
15101 [(set_attr "type" "call")]) 15105 [(set_attr "type" "call")])
15102 15106
15103 (define_insn "*sibcall_1_rex64" 15107 (define_insn "*sibcall_1_rex64"
15104 [(call (mem:QI (match_operand:DI 0 "sibcall_insn_operand" "s,U")) 15108 [(call (mem:QI (match_operand:DI 0 "sibcall_insn_operand" "s,U"))
15105 (match_operand 1 "" ""))] 15109 (match_operand 1 "" ""))]
15106 "SIBLING_CALL_P (insn) && TARGET_64BIT" 15110 "TARGET_64BIT && SIBLING_CALL_P (insn)"
15107 "@ 15111 "@
15108 jmp\t%P0 15112 jmp\t%P0
15109 jmp\t%A0" 15113 jmp\t%A0"
15110 [(set_attr "type" "call")]) 15114 [(set_attr "type" "call")])
15111 15115
21494 } 21498 }
21495 [(set_attr "type" "callv")]) 21499 [(set_attr "type" "callv")])
21496 21500
21497 (define_insn "*call_value_pop_1" 21501 (define_insn "*call_value_pop_1"
21498 [(set (match_operand 0 "" "") 21502 [(set (match_operand 0 "" "")
21499 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm")) 21503 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm"))
21500 (match_operand:SI 2 "" ""))) 21504 (match_operand:SI 2 "" "")))
21501 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) 21505 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
21502 (match_operand:SI 3 "immediate_operand" "i")))] 21506 (match_operand:SI 3 "immediate_operand" "i")))]
21503 "!SIBLING_CALL_P (insn) && !TARGET_64BIT" 21507 "!TARGET_64BIT && !SIBLING_CALL_P (insn)"
21504 { 21508 {
21505 if (constant_call_address_operand (operands[1], Pmode)) 21509 if (constant_call_address_operand (operands[1], Pmode))
21506 return "call\t%P1"; 21510 return "call\t%P1";
21507 return "call\t%A1"; 21511 return "call\t%A1";
21508 } 21512 }
21512 [(set (match_operand 0 "" "") 21516 [(set (match_operand 0 "" "")
21513 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U")) 21517 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U"))
21514 (match_operand:SI 2 "" ""))) 21518 (match_operand:SI 2 "" "")))
21515 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) 21519 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
21516 (match_operand:SI 3 "immediate_operand" "i,i")))] 21520 (match_operand:SI 3 "immediate_operand" "i,i")))]
21517 "SIBLING_CALL_P (insn) && !TARGET_64BIT" 21521 "!TARGET_64BIT && SIBLING_CALL_P (insn)"
21518 "@ 21522 "@
21519 jmp\t%P1 21523 jmp\t%P1
21520 jmp\t%A1" 21524 jmp\t%A1"
21521 [(set_attr "type" "callv")]) 21525 [(set_attr "type" "callv")])
21522 21526
21561 (clobber (reg:TI XMM13_REG)) 21565 (clobber (reg:TI XMM13_REG))
21562 (clobber (reg:TI XMM14_REG)) 21566 (clobber (reg:TI XMM14_REG))
21563 (clobber (reg:TI XMM15_REG)) 21567 (clobber (reg:TI XMM15_REG))
21564 (clobber (reg:DI SI_REG)) 21568 (clobber (reg:DI SI_REG))
21565 (clobber (reg:DI DI_REG))] 21569 (clobber (reg:DI DI_REG))]
21566 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 21570 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
21567 { 21571 {
21568 if (SIBLING_CALL_P (insn)) 21572 if (SIBLING_CALL_P (insn))
21569 return "jmp\t%P1"; 21573 return "jmp\t%P1";
21570 else 21574 else
21571 return "call\t%P1"; 21575 return "call\t%P1";
21572 } 21576 }
21573 [(set_attr "type" "callv")]) 21577 [(set_attr "type" "callv")])
21574 21578
21575 (define_insn "*call_value_1" 21579 (define_insn "*call_value_1"
21576 [(set (match_operand 0 "" "") 21580 [(set (match_operand 0 "" "")
21577 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm")) 21581 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm"))
21578 (match_operand:SI 2 "" "")))] 21582 (match_operand:SI 2 "" "")))]
21579 "!SIBLING_CALL_P (insn) && !TARGET_64BIT" 21583 "!TARGET_64BIT && !SIBLING_CALL_P (insn)"
21580 { 21584 {
21581 if (constant_call_address_operand (operands[1], Pmode)) 21585 if (constant_call_address_operand (operands[1], Pmode))
21582 return "call\t%P1"; 21586 return "call\t%P1";
21583 return "call\t%A1"; 21587 return "call\t%A1";
21584 } 21588 }
21586 21590
21587 (define_insn "*sibcall_value_1" 21591 (define_insn "*sibcall_value_1"
21588 [(set (match_operand 0 "" "") 21592 [(set (match_operand 0 "" "")
21589 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U")) 21593 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U"))
21590 (match_operand:SI 2 "" "")))] 21594 (match_operand:SI 2 "" "")))]
21591 "SIBLING_CALL_P (insn) && !TARGET_64BIT" 21595 "!TARGET_64BIT && SIBLING_CALL_P (insn)"
21592 "@ 21596 "@
21593 jmp\t%P1 21597 jmp\t%P1
21594 jmp\t%A1" 21598 jmp\t%A1"
21595 [(set_attr "type" "callv")]) 21599 [(set_attr "type" "callv")])
21596 21600
21597 (define_insn "*call_value_1_rex64" 21601 (define_insn "*call_value_1_rex64"
21598 [(set (match_operand 0 "" "") 21602 [(set (match_operand 0 "" "")
21599 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rsm")) 21603 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rsm"))
21600 (match_operand:DI 2 "" "")))] 21604 (match_operand:DI 2 "" "")))]
21601 "!SIBLING_CALL_P (insn) && TARGET_64BIT 21605 "TARGET_64BIT && !SIBLING_CALL_P (insn)
21602 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC" 21606 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC"
21603 { 21607 {
21604 if (constant_call_address_operand (operands[1], Pmode)) 21608 if (constant_call_address_operand (operands[1], Pmode))
21605 return "call\t%P1"; 21609 return "call\t%P1";
21606 return "call\t%A1"; 21610 return "call\t%A1";
21634 21638
21635 (define_insn "*call_value_1_rex64_large" 21639 (define_insn "*call_value_1_rex64_large"
21636 [(set (match_operand 0 "" "") 21640 [(set (match_operand 0 "" "")
21637 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rm")) 21641 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rm"))
21638 (match_operand:DI 2 "" "")))] 21642 (match_operand:DI 2 "" "")))]
21639 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 21643 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
21640 "call\t%A1" 21644 "call\t%A1"
21641 [(set_attr "type" "callv")]) 21645 [(set_attr "type" "callv")])
21642 21646
21643 (define_insn "*sibcall_value_1_rex64" 21647 (define_insn "*sibcall_value_1_rex64"
21644 [(set (match_operand 0 "" "") 21648 [(set (match_operand 0 "" "")
21645 (call (mem:QI (match_operand:DI 1 "sibcall_insn_operand" "s,U")) 21649 (call (mem:QI (match_operand:DI 1 "sibcall_insn_operand" "s,U"))
21646 (match_operand:DI 2 "" "")))] 21650 (match_operand:DI 2 "" "")))]
21647 "SIBLING_CALL_P (insn) && TARGET_64BIT" 21651 "TARGET_64BIT && SIBLING_CALL_P (insn)"
21648 "@ 21652 "@
21649 jmp\t%P1 21653 jmp\t%P1
21650 jmp\t%A1" 21654 jmp\t%A1"
21651 [(set_attr "type" "callv")]) 21655 [(set_attr "type" "callv")])
21652 21656
21957 return "mov{q}\t{%1, %3|%3, %1}\;xor{q}\t{%%gs:%P2, %3|%3, QWORD PTR gs:%P2}"; 21961 return "mov{q}\t{%1, %3|%3, %1}\;xor{q}\t{%%gs:%P2, %3|%3, QWORD PTR gs:%P2}";
21958 } 21962 }
21959 [(set_attr "type" "multi")]) 21963 [(set_attr "type" "multi")])
21960 21964
21961 (define_mode_iterator CRC32MODE [QI HI SI]) 21965 (define_mode_iterator CRC32MODE [QI HI SI])
21962 (define_mode_attr crc32modesuffix [(QI "b") (HI "w") (SI "l")]) 21966 (define_mode_attr crc32modesuffix [(QI "{b}") (HI "{w}") (SI "{l}")])
21963 (define_mode_attr crc32modeconstraint [(QI "qm") (HI "rm") (SI "rm")]) 21967 (define_mode_attr crc32modeconstraint [(QI "qm") (HI "rm") (SI "rm")])
21964 21968
21965 (define_insn "sse4_2_crc32<mode>" 21969 (define_insn "sse4_2_crc32<mode>"
21966 [(set (match_operand:SI 0 "register_operand" "=r") 21970 [(set (match_operand:SI 0 "register_operand" "=r")
21967 (unspec:SI 21971 (unspec:SI
21980 (unspec:DI 21984 (unspec:DI
21981 [(match_operand:DI 1 "register_operand" "0") 21985 [(match_operand:DI 1 "register_operand" "0")
21982 (match_operand:DI 2 "nonimmediate_operand" "rm")] 21986 (match_operand:DI 2 "nonimmediate_operand" "rm")]
21983 UNSPEC_CRC32))] 21987 UNSPEC_CRC32))]
21984 "TARGET_SSE4_2 && TARGET_64BIT" 21988 "TARGET_SSE4_2 && TARGET_64BIT"
21985 "crc32q\t{%2, %0|%0, %2}" 21989 "crc32{q}\t{%2, %0|%0, %2}"
21986 [(set_attr "type" "sselog1") 21990 [(set_attr "type" "sselog1")
21987 (set_attr "prefix_rep" "1") 21991 (set_attr "prefix_rep" "1")
21988 (set_attr "prefix_extra" "1") 21992 (set_attr "prefix_extra" "1")
21989 (set_attr "mode" "DI")]) 21993 (set_attr "mode" "DI")])
21990 21994