aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gnu.org>1994-07-02 13:33:56 +0000
committerTorbjorn Granlund <tege@gnu.org>1994-07-02 13:33:56 +0000
commitc8dbc8ca7f3757ac2453c3fbe6631e9f7a22b71c (patch)
treefd915431f4d3bd3fa39b7eaf336a72bfa3169fd7 /gcc
parent18beb3e99697d66f252e98d717fcdfb14b1f1403 (diff)
downloadgcc-c8dbc8ca7f3757ac2453c3fbe6631e9f7a22b71c.zip
gcc-c8dbc8ca7f3757ac2453c3fbe6631e9f7a22b71c.tar.gz
gcc-c8dbc8ca7f3757ac2453c3fbe6631e9f7a22b71c.tar.bz2
(expand_divmod): Always return gen_lowpart (mode, ...).
From-SVN: r7640
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expmed.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 50ebb67..a57992e 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2720,7 +2720,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
remainder, 1,
OPTAB_LIB_WIDEN);
if (remainder)
- return remainder;
+ return gen_lowpart (mode, remainder);
}
quotient = expand_shift (RSHIFT_EXPR, compute_mode, op0,
build_int_2 (pre_shift, 0),
@@ -2958,7 +2958,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
GEN_INT (((HOST_WIDE_INT) 1 << pre_shift) - 1),
remainder, 0, OPTAB_LIB_WIDEN);
if (remainder)
- return remainder;
+ return gen_lowpart (mode, remainder);
}
quotient = expand_shift (RSHIFT_EXPR, compute_mode, op0,
build_int_2 (pre_shift, 0),
@@ -3054,10 +3054,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
expand_dec (quotient, const1_rtx);
expand_inc (remainder, op1);
emit_label (label);
- if (rem_flag)
- return remainder;
- else
- return quotient;
+ return gen_lowpart (mode, rem_flag ? remainder : quotient);
}
/* No luck with division elimination or divmod. Have to do it
@@ -3146,7 +3143,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
expand_inc (quotient, const1_rtx);
expand_dec (remainder, op1);
emit_label (label);
- return rem_flag ? remainder : quotient;
+ return gen_lowpart (mode, rem_flag ? remainder : quotient);
}
/* No luck with division elimination or divmod. Have to do it
@@ -3213,7 +3210,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
expand_inc (quotient, const1_rtx);
expand_dec (remainder, op1);
emit_label (label);
- return rem_flag ? remainder : quotient;
+ return gen_lowpart (mode, rem_flag ? remainder : quotient);
}
/* No luck with division elimination or divmod. Have to do it