From: Uros Bizjak Date: Fri, 18 Mar 2011 20:54:25 +0000 (+0100) Subject: i386.md (float2): Rewrite using indirect functions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16cc44407fe40e3411e206eeec60a14d20769ade;p=gcc.git i386.md (float2): Rewrite using indirect functions. * config/i386/i386.md (float2): Rewrite using indirect functions. (lwp_slwpcb): Ditto. * config/i386/sse.md (avx_vextractf128): Ditto. (avx_vinsertf128): Ditto. From-SVN: r171169 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4dda33c52b2..762dbb4a45c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-03-18 Uros Bizjak + + * config/i386/i386.md (float2): + Rewrite using indirect functions. + (lwp_slwpcb): Ditto. + * config/i386/sse.md (avx_vextractf128): Ditto. + (avx_vinsertf128): Ditto. + 2011-03-18 Andreas Krebbel * config/s390/s390.c (s390_delegitimize_address): Handle GOTOFF @@ -214,8 +222,7 @@ 2011-03-16 Jeff Law * tree-vrp.c (identify_jump_threads): Slightly simplify type - check for operands of conditional. Allow type to be a - pointer. + check for operands of conditional. Allow type to be a pointer. 2011-03-16 Richard Guenther @@ -470,8 +477,7 @@ 2011-03-15 Richard Guenther - * config/i386/i386.c (ix86_emit_swdivsf): Implement more - efficiently. + * config/i386/i386.c (ix86_emit_swdivsf): Implement more efficiently. 2011-03-15 Alan Modra @@ -499,8 +505,7 @@ 2011-03-14 Rainer Orth - * config/sol2.c (solaris_assemble_visibility): Remove obsolete - URLs. + * config/sol2.c (solaris_assemble_visibility): Remove obsolete URLs. 2011-03-14 Jakub Jelinek diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 12470eae14e..c9761a46e4c 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -4959,18 +4959,18 @@ && !X87_ENABLE_FLOAT (mode, mode)) { rtx reg = gen_reg_rtx (XFmode); - rtx insn; + rtx (*insn)(rtx, rtx); emit_insn (gen_floatxf2 (reg, operands[1])); if (mode == SFmode) - insn = gen_truncxfsf2 (operands[0], reg); + insn = gen_truncxfsf2; else if (mode == DFmode) - insn = gen_truncxfdf2 (operands[0], reg); + insn = gen_truncxfdf2; else gcc_unreachable (); - emit_insn (insn); + emit_insn (insn (operands[0], reg)); DONE; } }) @@ -18216,10 +18216,13 @@ (unspec_volatile [(const_int 0)] UNSPECV_SLWP_INTRINSIC))] "TARGET_LWP" { - if (TARGET_64BIT) - emit_insn (gen_lwp_slwpcbdi (operands[0])); - else - emit_insn (gen_lwp_slwpcbsi (operands[0])); + rtx (*insn)(rtx); + + insn = (TARGET_64BIT + ? gen_lwp_slwpcbdi + : gen_lwp_slwpcbsi); + + emit_insn (insn (operands[0])); DONE; }) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index ba2bf24ea13..62004198548 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -4122,17 +4122,21 @@ (match_operand:SI 2 "const_0_to_1_operand" "")] "TARGET_AVX" { + rtx (*insn)(rtx, rtx); + switch (INTVAL (operands[2])) { case 0: - emit_insn (gen_vec_extract_lo_ (operands[0], operands[1])); + insn = gen_vec_extract_lo_; break; case 1: - emit_insn (gen_vec_extract_hi_ (operands[0], operands[1])); + insn = gen_vec_extract_hi_; break; default: gcc_unreachable (); } + + emit_insn (insn (operands[0], operands[1])); DONE; }) @@ -11776,19 +11780,21 @@ (match_operand:SI 3 "const_0_to_1_operand" "")] "TARGET_AVX" { + rtx (*insn)(rtx, rtx, rtx); + switch (INTVAL (operands[3])) { case 0: - emit_insn (gen_vec_set_lo_ (operands[0], operands[1], - operands[2])); + insn = gen_vec_set_lo_; break; case 1: - emit_insn (gen_vec_set_hi_ (operands[0], operands[1], - operands[2])); + insn = gen_vec_set_hi_; break; default: gcc_unreachable (); } + + emit_insn (insn (operands[0], operands[1], operands[2])); DONE; })