optabs.c (expand_fix): Look for wider integer modes first.
authorJan Hubicka <jh@suse.cz>
Thu, 10 Jan 2002 10:21:30 +0000 (11:21 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 10 Jan 2002 10:21:30 +0000 (10:21 +0000)
* optabs.c (expand_fix): Look for wider integer modes first.

* i386.md (mov?f): Avoid the fake const double trick for medium
memory model.
(min?f*/max?f*): Prohibit memory operands for i387 variant.
(fop_df_4): Disable for SSE compilation.

From-SVN: r48721

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/optabs.c

index f33f6ac40a079909319de5ffa665e2796a6dc8f8..ec68f0e86afde65aacf4e51a3fb4b5b2163e5f48 100644 (file)
@@ -1,3 +1,12 @@
+Thu Jan 10 11:19:18 CET 2002  Jan Hubicka  <jh@suse.cz>
+
+       * optabs.c (expand_fix): Look for wider integer modes first.
+
+       * i386.md (mov?f): Avoid the fake const double trick for medium
+       memory model.
+       (min?f*/max?f*): Prohibit memory operands for i387 variant.
+       (fop_df_4): Disable for SSE compilation.
+
 2002-01-20  Graham Stott  <grahams@redhat.com>
 
        * dwarf2out.c (indirect_string_alloc, output_indirect_string):
index 6e61108b49ad4d70faf1606657a498ee13be574c..ec38dece3ea441142698d5d254177ea1c022ca9b 100644 (file)
        (match_operand:SF 1 "general_operand" "fm#rx,f#rx,G,rmF#fx,Fr#fx,H,x,xm#rf,x#rf"))]
   "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
    && (reload_in_progress || reload_completed
+       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || memory_operand (operands[0], SFmode))" 
 {
   "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
    && (optimize_size || !TARGET_INTEGER_DFMODE_MOVES)
    && (reload_in_progress || reload_completed
+       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || memory_operand (operands[0], DFmode))" 
 {
   "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
    && !optimize_size && TARGET_INTEGER_DFMODE_MOVES
    && (reload_in_progress || reload_completed
+       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || memory_operand (operands[0], DFmode))" 
 {
    && optimize_size
    && (reload_in_progress || reload_completed
        || GET_CODE (operands[1]) != CONST_DOUBLE
+       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || memory_operand (operands[0], TFmode))" 
 {
   switch (which_alternative)
    && !optimize_size
    && (reload_in_progress || reload_completed
        || GET_CODE (operands[1]) != CONST_DOUBLE
+       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
        || memory_operand (operands[0], TFmode))" 
 {
   switch (which_alternative)
        (match_operator:DF 3 "binary_fp_operator"
           [(float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,0"))
            (match_operand:DF 2 "register_operand" "0,f")]))]
-  "TARGET_80387
+  "TARGET_80387 && (!TARGET_SSE2 || !TARGET_SSE_MATH)
    && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
   "* return output_387_binary_op (insn, operands);"
   [(set (attr "type") 
 (define_insn "*minsf_nonieee"
   [(set (match_operand:SF 0 "register_operand" "=x#f,f#x")
        (if_then_else:SF (lt (match_operand:SF 1 "register_operand" "%0,0")
-                            (match_operand:SF 2 "nonimmediate_operand" "xm#f,fm#x"))
+                            (match_operand:SF 2 "nonimmediate_operand" "xm#f,f#x"))
                         (match_dup 1)
                         (match_dup 2)))
    (clobber (reg:CC 17))]
 (define_insn "*mindf_nonieee"
   [(set (match_operand:DF 0 "register_operand" "=Y#f,f#Y")
        (if_then_else:DF (lt (match_operand:DF 1 "register_operand" "%0,0")
-                            (match_operand:DF 2 "nonimmediate_operand" "Ym#f,fm#Y"))
+                            (match_operand:DF 2 "nonimmediate_operand" "Ym#f,f#Y"))
                         (match_dup 1)
                         (match_dup 2)))
    (clobber (reg:CC 17))]
 (define_insn "*maxsf"
   [(set (match_operand:SF 0 "register_operand" "=x#f,f#x,f#x")
        (if_then_else:SF (gt (match_operand:SF 1 "register_operand" "0,0,f#x")
-                            (match_operand:SF 2 "nonimmediate_operand" "xm#f,fm#x,0"))
+                            (match_operand:SF 2 "nonimmediate_operand" "xm#f,f#x,0"))
                         (match_dup 1)
                         (match_dup 2)))
    (clobber (reg:CC 17))]
 (define_insn "*maxsf_nonieee"
   [(set (match_operand:SF 0 "register_operand" "=x#f,f#x")
        (if_then_else:SF (gt (match_operand:SF 1 "register_operand" "%0,0")
-                            (match_operand:SF 2 "nonimmediate_operand" "xm#f,fm#x"))
+                            (match_operand:SF 2 "nonimmediate_operand" "xm#f,f#x"))
                         (match_dup 1)
                         (match_dup 2)))
    (clobber (reg:CC 17))]
 (define_insn "*maxdf"
   [(set (match_operand:DF 0 "register_operand" "=Y#f,f#Y,f#Y")
        (if_then_else:DF (gt (match_operand:DF 1 "register_operand" "0,0,f#Y")
-                            (match_operand:DF 2 "nonimmediate_operand" "Ym#f,fm#Y,0"))
+                            (match_operand:DF 2 "nonimmediate_operand" "Ym#f,f#Y,0"))
                         (match_dup 1)
                         (match_dup 2)))
    (clobber (reg:CC 17))]
 (define_insn "*maxdf_nonieee"
   [(set (match_operand:DF 0 "register_operand" "=Y#f,f#Y")
        (if_then_else:DF (gt (match_operand:DF 1 "register_operand" "%0,0")
-                            (match_operand:DF 2 "nonimmediate_operand" "Ym#f,fm#Y"))
+                            (match_operand:DF 2 "nonimmediate_operand" "Ym#f,f#Y"))
                         (match_dup 1)
                         (match_dup 2)))
    (clobber (reg:CC 17))]
index 49ea3193c8cd9c6c3da09cd47fe167a6447e9e80..9e26e7f78c86aabe0663d501ceacef98e66147be 100644 (file)
@@ -4349,10 +4349,10 @@ expand_fix (to, from, unsignedp)
      this conversion.  If the integer mode is wider than the mode of TO,
      we can do the conversion either signed or unsigned.  */
 
-  for (imode = GET_MODE (to); imode != VOIDmode;
-       imode = GET_MODE_WIDER_MODE (imode))
-    for (fmode = GET_MODE (from); fmode != VOIDmode;
-        fmode = GET_MODE_WIDER_MODE (fmode))
+  for (fmode = GET_MODE (from); fmode != VOIDmode;
+       fmode = GET_MODE_WIDER_MODE (fmode))
+    for (imode = GET_MODE (to); imode != VOIDmode;
+        imode = GET_MODE_WIDER_MODE (imode))
       {
        int doing_unsigned = unsignedp;