aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2002-01-10 11:21:30 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2002-01-10 10:21:30 +0000
commit3987b9db30f95cd055f68d302da8e9c474b6feea (patch)
treee5b6a50b27b2f10f3b1d39f0ed1204c4e8bbd21d /gcc
parentbccd793e46f58b737cb7592f22e2d21c6543b0d8 (diff)
downloadgcc-3987b9db30f95cd055f68d302da8e9c474b6feea.zip
gcc-3987b9db30f95cd055f68d302da8e9c474b6feea.tar.gz
gcc-3987b9db30f95cd055f68d302da8e9c474b6feea.tar.bz2
optabs.c (expand_fix): Look for wider integer modes first.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/i386/i386.md19
-rw-r--r--gcc/optabs.c8
3 files changed, 25 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f33f6ac..ec68f0e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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):
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 6e61108..ec38dec 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -2718,6 +2718,7 @@
(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))"
{
@@ -2893,6 +2894,7 @@
"(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))"
{
@@ -2950,6 +2952,7 @@
"(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))"
{
@@ -3253,6 +3256,7 @@
&& 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)
@@ -3346,6 +3350,7 @@
&& !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)
@@ -14132,7 +14137,7 @@
(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")
@@ -15962,7 +15967,7 @@
(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))]
@@ -16044,7 +16049,7 @@
(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))]
@@ -16115,7 +16120,7 @@
(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))]
@@ -16125,7 +16130,7 @@
(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))]
@@ -16195,7 +16200,7 @@
(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))]
@@ -16205,7 +16210,7 @@
(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))]
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 49ea319..9e26e7f 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -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;