OSDN Git Service

2006-01-26 Paolo Bonzini <bonzini@gnu.org>
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Jan 2006 18:45:29 +0000 (18:45 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Jan 2006 18:45:29 +0000 (18:45 +0000)
* config/i386/i386.md (extendsfdf2, extendsfxf2, extenddfxf2): Emit
constants provided by 80387 instructions in the destination mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110264 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md

index ed19913..de65848 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-26  Paolo Bonzini  <bonzini@gnu.org>
+
+       * config/i386/i386.md (extendsfdf2, extendsfxf2, extenddfxf2): Emit
+       constants provided by 80387 instructions in the destination mode.
+
 2006-01-26  Richard Guenther  <rguenther@suse.de>
             Andrew Pinski  <pinskia@physics.uc.edu>
 
 2006-01-26  Richard Guenther  <rguenther@suse.de>
             Andrew Pinski  <pinskia@physics.uc.edu>
 
@@ -19,7 +24,7 @@
        (adjust_range_with_scev): Reject ranges from SCEV which are out
        of bounds for the type.
 
        (adjust_range_with_scev): Reject ranges from SCEV which are out
        of bounds for the type.
 
-2005-01-26  Daniel Berlin  <dberlin@dberlin.org>
+2006-01-26  Daniel Berlin  <dberlin@dberlin.org>
 
        * tree-ssa-alias.c (maybe_create_global_var): Change
        subvar walking to an assertion that we don't have subvar'd variables.
 
        * tree-ssa-alias.c (maybe_create_global_var): Change
        subvar walking to an assertion that we don't have subvar'd variables.
        mips-tdump.c (main), mips-tfile.c (main): Update copyright notice
        dates.
 
        mips-tdump.c (main), mips-tfile.c (main): Update copyright notice
        dates.
 
-2005-01-21  Kenneth Zadeck <zadeck@naturalbridge.com>
+2006-01-21  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * df-scan.c (problem_SCAN): Added NULL reset function.
        (df_scan_reset_blocks): Added code to call reset block function
 
        * df-scan.c (problem_SCAN): Added NULL reset function.
        (df_scan_reset_blocks): Added code to call reset block function
        * c-common.c (empty_body_warning): Add (from c_finish_if_stmt).
        Now uses IS_EMPTY_STMT() instead of special NOP markers.
 
        * c-common.c (empty_body_warning): Add (from c_finish_if_stmt).
        Now uses IS_EMPTY_STMT() instead of special NOP markers.
 
-2005-01-20  Paul Brook  <paul@codesourcery.com>
+2006-01-20  Paul Brook  <paul@codesourcery.com>
 
        * Makefile.in (lang_checks): Keep going if mkdir fails.
 
 
        * Makefile.in (lang_checks): Keep going if mkdir fails.
 
-2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>
+2006-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * df-scan.c (df_scan_free_bb_info): Added basic block parameter to
        be able to clean out basic block when not necessary.
 
        * df-scan.c (df_scan_free_bb_info): Added basic block parameter to
        be able to clean out basic block when not necessary.
        Fixed to properly delete information if df is unused before
        calling df_finish.
 
        Fixed to properly delete information if df is unused before
        calling df_finish.
 
-2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>
+2006-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        PR rtl-optimization/25799
        * df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
 
        PR rtl-optimization/25799
        * df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
        * gcc.h (lang_specific_spec_functions): Remove.
        * gccspec.c (lang_specific_spec_functions): Remove.
 
        * gcc.h (lang_specific_spec_functions): Remove.
        * gccspec.c (lang_specific_spec_functions): Remove.
 
-2005-01-16  Paolo Bonzini  <bonzini@gnu.org>
+2006-01-16  Paolo Bonzini  <bonzini@gnu.org>
 
        * combine.c (record_value_for_reg): Invalidate registers
        if INSN is null.
 
        * combine.c (record_value_for_reg): Invalidate registers
        if INSN is null.
 
        * rtlanal.c (find_reg_note): Assert insn is not null.
 
 
        * rtlanal.c (find_reg_note): Assert insn is not null.
 
-2005-01-11  Kenneth Zadeck <zadeck@naturalbridge.com>
+2006-01-11  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * df-scan.c (df_hard_reg_init): Move declaration of i outside
        ifdef.
 
        * df-scan.c (df_hard_reg_init): Move declaration of i outside
        ifdef.
        * tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, create_bb):
        Likewise.
 
        * tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, create_bb):
        Likewise.
 
-2005-01-11  Kenneth Zadeck <zadeck@naturalbridge.com>
+2006-01-11  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * Makefile.in: Removed rotted odf.c entry.
 
 
        * Makefile.in: Removed rotted odf.c entry.
 
        optimizations.
        * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.
 
        optimizations.
        * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.
 
-2005-01-11  Danny Berlin <dberlin@dberlin.org>
+2006-01-11  Danny Berlin <dberlin@dberlin.org>
            Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN,
            Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN,
index 0b1d153..39d542d 100644 (file)
   /* ??? Needed for compress_float_constant since all fp constants
      are LEGITIMATE_CONSTANT_P.  */
   if (GET_CODE (operands[1]) == CONST_DOUBLE)
   /* ??? Needed for compress_float_constant since all fp constants
      are LEGITIMATE_CONSTANT_P.  */
   if (GET_CODE (operands[1]) == CONST_DOUBLE)
-    operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
+    {
+      if ((!TARGET_SSE2 || TARGET_MIX_SSE_I387)
+         && standard_80387_constant_p (operands[1]) > 0)
+       {
+         operands[1] = simplify_const_unary_operation
+           (FLOAT_EXTEND, DFmode, operands[1], SFmode);
+         emit_move_insn_1 (operands[0], operands[1]);
+         DONE;
+       }
+      operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
+    }
   if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
     operands[1] = force_reg (SFmode, operands[1]);
 })
   if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
     operands[1] = force_reg (SFmode, operands[1]);
 })
   /* ??? Needed for compress_float_constant since all fp constants
      are LEGITIMATE_CONSTANT_P.  */
   if (GET_CODE (operands[1]) == CONST_DOUBLE)
   /* ??? Needed for compress_float_constant since all fp constants
      are LEGITIMATE_CONSTANT_P.  */
   if (GET_CODE (operands[1]) == CONST_DOUBLE)
-    operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
+    {
+      if (standard_80387_constant_p (operands[1]) > 0)
+       {
+         operands[1] = simplify_const_unary_operation
+           (FLOAT_EXTEND, XFmode, operands[1], SFmode);
+         emit_move_insn_1 (operands[0], operands[1]);
+         DONE;
+       }
+      operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
+    }
   if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
     operands[1] = force_reg (SFmode, operands[1]);
 })
   if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
     operands[1] = force_reg (SFmode, operands[1]);
 })
   /* ??? Needed for compress_float_constant since all fp constants
      are LEGITIMATE_CONSTANT_P.  */
   if (GET_CODE (operands[1]) == CONST_DOUBLE)
   /* ??? Needed for compress_float_constant since all fp constants
      are LEGITIMATE_CONSTANT_P.  */
   if (GET_CODE (operands[1]) == CONST_DOUBLE)
-    operands[1] = validize_mem (force_const_mem (DFmode, operands[1]));
+    {
+      if (standard_80387_constant_p (operands[1]) > 0)
+       {
+         operands[1] = simplify_const_unary_operation
+           (FLOAT_EXTEND, XFmode, operands[1], DFmode);
+         emit_move_insn_1 (operands[0], operands[1]);
+         DONE;
+       }
+      operands[1] = validize_mem (force_const_mem (DFmode, operands[1]));
+    }
   if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
     operands[1] = force_reg (DFmode, operands[1]);
 })
   if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
     operands[1] = force_reg (DFmode, operands[1]);
 })