comparison gcc/config/i386/i386.md @ 47:3bfb6c00c1e0

update it from 4.4.2 to 4.4.3.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Sun, 07 Feb 2010 17:44:34 +0900
parents 855418dad1a3
children 9907f3135723 77e2b8dfacca
comparison
equal deleted inserted replaced
46:b85a337e5837 47:3bfb6c00c1e0
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
15024 return "call\t%P0"; 15028 return "call\t%P0";
15025 } 15029 }
15026 [(set_attr "type" "call")]) 15030 [(set_attr "type" "call")])
15027 15031
15028 (define_insn "*call_1" 15032 (define_insn "*call_1"
15029 [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "rsm")) 15033 [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lsm"))
15030 (match_operand 1 "" ""))] 15034 (match_operand 1 "" ""))]
15031 "!SIBLING_CALL_P (insn) && !TARGET_64BIT" 15035 "!TARGET_64BIT && !SIBLING_CALL_P (insn)"
15032 { 15036 {
15033 if (constant_call_address_operand (operands[0], Pmode)) 15037 if (constant_call_address_operand (operands[0], Pmode))
15034 return "call\t%P0"; 15038 return "call\t%P0";
15035 return "call\t%A0"; 15039 return "call\t%A0";
15036 } 15040 }
15037 [(set_attr "type" "call")]) 15041 [(set_attr "type" "call")])
15038 15042
15039 (define_insn "*sibcall_1" 15043 (define_insn "*sibcall_1"
15040 [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U")) 15044 [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U"))
15041 (match_operand 1 "" ""))] 15045 (match_operand 1 "" ""))]
15042 "SIBLING_CALL_P (insn) && !TARGET_64BIT" 15046 "!TARGET_64BIT && SIBLING_CALL_P (insn)"
15043 "@ 15047 "@
15044 jmp\t%P0 15048 jmp\t%P0
15045 jmp\t%A0" 15049 jmp\t%A0"
15046 [(set_attr "type" "call")]) 15050 [(set_attr "type" "call")])
15047 15051
15048 (define_insn "*call_1_rex64" 15052 (define_insn "*call_1_rex64"
15049 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rsm")) 15053 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rsm"))
15050 (match_operand 1 "" ""))] 15054 (match_operand 1 "" ""))]
15051 "!SIBLING_CALL_P (insn) && TARGET_64BIT 15055 "TARGET_64BIT && !SIBLING_CALL_P (insn)
15052 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC" 15056 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC"
15053 { 15057 {
15054 if (constant_call_address_operand (operands[0], Pmode)) 15058 if (constant_call_address_operand (operands[0], Pmode))
15055 return "call\t%P0"; 15059 return "call\t%P0";
15056 return "call\t%A0"; 15060 return "call\t%A0";
15071 (clobber (reg:TI XMM13_REG)) 15075 (clobber (reg:TI XMM13_REG))
15072 (clobber (reg:TI XMM14_REG)) 15076 (clobber (reg:TI XMM14_REG))
15073 (clobber (reg:TI XMM15_REG)) 15077 (clobber (reg:TI XMM15_REG))
15074 (clobber (reg:DI SI_REG)) 15078 (clobber (reg:DI SI_REG))
15075 (clobber (reg:DI DI_REG))] 15079 (clobber (reg:DI DI_REG))]
15076 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 15080 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
15077 { 15081 {
15078 if (constant_call_address_operand (operands[0], Pmode)) 15082 if (constant_call_address_operand (operands[0], Pmode))
15079 return "call\t%P0"; 15083 return "call\t%P0";
15080 return "call\t%A0"; 15084 return "call\t%A0";
15081 } 15085 }
15082 [(set_attr "type" "call")]) 15086 [(set_attr "type" "call")])
15083 15087
15084 (define_insn "*call_1_rex64_large" 15088 (define_insn "*call_1_rex64_large"
15085 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rm")) 15089 [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rm"))
15086 (match_operand 1 "" ""))] 15090 (match_operand 1 "" ""))]
15087 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 15091 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
15088 "call\t%A0" 15092 "call\t%A0"
15089 [(set_attr "type" "call")]) 15093 [(set_attr "type" "call")])
15090 15094
15091 (define_insn "*sibcall_1_rex64" 15095 (define_insn "*sibcall_1_rex64"
15092 [(call (mem:QI (match_operand:DI 0 "sibcall_insn_operand" "s,U")) 15096 [(call (mem:QI (match_operand:DI 0 "sibcall_insn_operand" "s,U"))
15093 (match_operand 1 "" ""))] 15097 (match_operand 1 "" ""))]
15094 "SIBLING_CALL_P (insn) && TARGET_64BIT" 15098 "TARGET_64BIT && SIBLING_CALL_P (insn)"
15095 "@ 15099 "@
15096 jmp\t%P0 15100 jmp\t%P0
15097 jmp\t%A0" 15101 jmp\t%A0"
15098 [(set_attr "type" "call")]) 15102 [(set_attr "type" "call")])
15099 15103
21467 } 21471 }
21468 [(set_attr "type" "callv")]) 21472 [(set_attr "type" "callv")])
21469 21473
21470 (define_insn "*call_value_pop_1" 21474 (define_insn "*call_value_pop_1"
21471 [(set (match_operand 0 "" "") 21475 [(set (match_operand 0 "" "")
21472 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm")) 21476 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm"))
21473 (match_operand:SI 2 "" ""))) 21477 (match_operand:SI 2 "" "")))
21474 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) 21478 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
21475 (match_operand:SI 3 "immediate_operand" "i")))] 21479 (match_operand:SI 3 "immediate_operand" "i")))]
21476 "!SIBLING_CALL_P (insn) && !TARGET_64BIT" 21480 "!TARGET_64BIT && !SIBLING_CALL_P (insn)"
21477 { 21481 {
21478 if (constant_call_address_operand (operands[1], Pmode)) 21482 if (constant_call_address_operand (operands[1], Pmode))
21479 return "call\t%P1"; 21483 return "call\t%P1";
21480 return "call\t%A1"; 21484 return "call\t%A1";
21481 } 21485 }
21485 [(set (match_operand 0 "" "") 21489 [(set (match_operand 0 "" "")
21486 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U")) 21490 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U"))
21487 (match_operand:SI 2 "" ""))) 21491 (match_operand:SI 2 "" "")))
21488 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) 21492 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
21489 (match_operand:SI 3 "immediate_operand" "i,i")))] 21493 (match_operand:SI 3 "immediate_operand" "i,i")))]
21490 "SIBLING_CALL_P (insn) && !TARGET_64BIT" 21494 "!TARGET_64BIT && SIBLING_CALL_P (insn)"
21491 "@ 21495 "@
21492 jmp\t%P1 21496 jmp\t%P1
21493 jmp\t%A1" 21497 jmp\t%A1"
21494 [(set_attr "type" "callv")]) 21498 [(set_attr "type" "callv")])
21495 21499
21534 (clobber (reg:TI XMM13_REG)) 21538 (clobber (reg:TI XMM13_REG))
21535 (clobber (reg:TI XMM14_REG)) 21539 (clobber (reg:TI XMM14_REG))
21536 (clobber (reg:TI XMM15_REG)) 21540 (clobber (reg:TI XMM15_REG))
21537 (clobber (reg:DI SI_REG)) 21541 (clobber (reg:DI SI_REG))
21538 (clobber (reg:DI DI_REG))] 21542 (clobber (reg:DI DI_REG))]
21539 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 21543 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
21540 { 21544 {
21541 if (SIBLING_CALL_P (insn)) 21545 if (SIBLING_CALL_P (insn))
21542 return "jmp\t%P1"; 21546 return "jmp\t%P1";
21543 else 21547 else
21544 return "call\t%P1"; 21548 return "call\t%P1";
21545 } 21549 }
21546 [(set_attr "type" "callv")]) 21550 [(set_attr "type" "callv")])
21547 21551
21548 (define_insn "*call_value_1" 21552 (define_insn "*call_value_1"
21549 [(set (match_operand 0 "" "") 21553 [(set (match_operand 0 "" "")
21550 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "rsm")) 21554 (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lsm"))
21551 (match_operand:SI 2 "" "")))] 21555 (match_operand:SI 2 "" "")))]
21552 "!SIBLING_CALL_P (insn) && !TARGET_64BIT" 21556 "!TARGET_64BIT && !SIBLING_CALL_P (insn)"
21553 { 21557 {
21554 if (constant_call_address_operand (operands[1], Pmode)) 21558 if (constant_call_address_operand (operands[1], Pmode))
21555 return "call\t%P1"; 21559 return "call\t%P1";
21556 return "call\t%A1"; 21560 return "call\t%A1";
21557 } 21561 }
21559 21563
21560 (define_insn "*sibcall_value_1" 21564 (define_insn "*sibcall_value_1"
21561 [(set (match_operand 0 "" "") 21565 [(set (match_operand 0 "" "")
21562 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U")) 21566 (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U"))
21563 (match_operand:SI 2 "" "")))] 21567 (match_operand:SI 2 "" "")))]
21564 "SIBLING_CALL_P (insn) && !TARGET_64BIT" 21568 "!TARGET_64BIT && SIBLING_CALL_P (insn)"
21565 "@ 21569 "@
21566 jmp\t%P1 21570 jmp\t%P1
21567 jmp\t%A1" 21571 jmp\t%A1"
21568 [(set_attr "type" "callv")]) 21572 [(set_attr "type" "callv")])
21569 21573
21570 (define_insn "*call_value_1_rex64" 21574 (define_insn "*call_value_1_rex64"
21571 [(set (match_operand 0 "" "") 21575 [(set (match_operand 0 "" "")
21572 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rsm")) 21576 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rsm"))
21573 (match_operand:DI 2 "" "")))] 21577 (match_operand:DI 2 "" "")))]
21574 "!SIBLING_CALL_P (insn) && TARGET_64BIT 21578 "TARGET_64BIT && !SIBLING_CALL_P (insn)
21575 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC" 21579 && ix86_cmodel != CM_LARGE && ix86_cmodel != CM_LARGE_PIC"
21576 { 21580 {
21577 if (constant_call_address_operand (operands[1], Pmode)) 21581 if (constant_call_address_operand (operands[1], Pmode))
21578 return "call\t%P1"; 21582 return "call\t%P1";
21579 return "call\t%A1"; 21583 return "call\t%A1";
21607 21611
21608 (define_insn "*call_value_1_rex64_large" 21612 (define_insn "*call_value_1_rex64_large"
21609 [(set (match_operand 0 "" "") 21613 [(set (match_operand 0 "" "")
21610 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rm")) 21614 (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rm"))
21611 (match_operand:DI 2 "" "")))] 21615 (match_operand:DI 2 "" "")))]
21612 "!SIBLING_CALL_P (insn) && TARGET_64BIT" 21616 "TARGET_64BIT && !SIBLING_CALL_P (insn)"
21613 "call\t%A1" 21617 "call\t%A1"
21614 [(set_attr "type" "callv")]) 21618 [(set_attr "type" "callv")])
21615 21619
21616 (define_insn "*sibcall_value_1_rex64" 21620 (define_insn "*sibcall_value_1_rex64"
21617 [(set (match_operand 0 "" "") 21621 [(set (match_operand 0 "" "")
21618 (call (mem:QI (match_operand:DI 1 "sibcall_insn_operand" "s,U")) 21622 (call (mem:QI (match_operand:DI 1 "sibcall_insn_operand" "s,U"))
21619 (match_operand:DI 2 "" "")))] 21623 (match_operand:DI 2 "" "")))]
21620 "SIBLING_CALL_P (insn) && TARGET_64BIT" 21624 "TARGET_64BIT && SIBLING_CALL_P (insn)"
21621 "@ 21625 "@
21622 jmp\t%P1 21626 jmp\t%P1
21623 jmp\t%A1" 21627 jmp\t%A1"
21624 [(set_attr "type" "callv")]) 21628 [(set_attr "type" "callv")])
21625 21629
21930 return "mov{q}\t{%1, %3|%3, %1}\;xor{q}\t{%%gs:%P2, %3|%3, QWORD PTR gs:%P2}"; 21934 return "mov{q}\t{%1, %3|%3, %1}\;xor{q}\t{%%gs:%P2, %3|%3, QWORD PTR gs:%P2}";
21931 } 21935 }
21932 [(set_attr "type" "multi")]) 21936 [(set_attr "type" "multi")])
21933 21937
21934 (define_mode_iterator CRC32MODE [QI HI SI]) 21938 (define_mode_iterator CRC32MODE [QI HI SI])
21935 (define_mode_attr crc32modesuffix [(QI "b") (HI "w") (SI "l")]) 21939 (define_mode_attr crc32modesuffix [(QI "{b}") (HI "{w}") (SI "{l}")])
21936 (define_mode_attr crc32modeconstraint [(QI "qm") (HI "rm") (SI "rm")]) 21940 (define_mode_attr crc32modeconstraint [(QI "qm") (HI "rm") (SI "rm")])
21937 21941
21938 (define_insn "sse4_2_crc32<mode>" 21942 (define_insn "sse4_2_crc32<mode>"
21939 [(set (match_operand:SI 0 "register_operand" "=r") 21943 [(set (match_operand:SI 0 "register_operand" "=r")
21940 (unspec:SI 21944 (unspec:SI
21953 (unspec:DI 21957 (unspec:DI
21954 [(match_operand:DI 1 "register_operand" "0") 21958 [(match_operand:DI 1 "register_operand" "0")
21955 (match_operand:DI 2 "nonimmediate_operand" "rm")] 21959 (match_operand:DI 2 "nonimmediate_operand" "rm")]
21956 UNSPEC_CRC32))] 21960 UNSPEC_CRC32))]
21957 "TARGET_SSE4_2 && TARGET_64BIT" 21961 "TARGET_SSE4_2 && TARGET_64BIT"
21958 "crc32q\t{%2, %0|%0, %2}" 21962 "crc32{q}\t{%2, %0|%0, %2}"
21959 [(set_attr "type" "sselog1") 21963 [(set_attr "type" "sselog1")
21960 (set_attr "prefix_rep" "1") 21964 (set_attr "prefix_rep" "1")
21961 (set_attr "prefix_extra" "1") 21965 (set_attr "prefix_extra" "1")
21962 (set_attr "mode" "DI")]) 21966 (set_attr "mode" "DI")])
21963 21967