summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/optabs.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-09-17 04:03:37 +0000
committerkan <kan@FreeBSD.org>2002-09-17 04:03:37 +0000
commit366976642281939a5ef910427ef046ec6f72af8a (patch)
tree142ed567a01fe5d8a2452c34837343fe24fa825a /contrib/gcc/optabs.c
parente921678e240f578a38fecb6143e3cdd2b0494996 (diff)
downloadFreeBSD-src-366976642281939a5ef910427ef046ec6f72af8a.zip
FreeBSD-src-366976642281939a5ef910427ef046ec6f72af8a.tar.gz
Gcc 3.2.1-prerelease from the FSF anoncvs repo gcc-3_2-branch on 16-Sep-2002 13:23:11 EDT.
Diffstat (limited to 'contrib/gcc/optabs.c')
-rw-r--r--contrib/gcc/optabs.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/contrib/gcc/optabs.c b/contrib/gcc/optabs.c
index d228e58..1cf2803 100644
--- a/contrib/gcc/optabs.c
+++ b/contrib/gcc/optabs.c
@@ -752,23 +752,18 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
}
/* In case the insn wants input operands in modes different from
- the result, convert the operands. It would seem that we
- don't need to convert CONST_INTs, but we do, so that they're
- a properly sign-extended for their modes; we choose the
- widest mode between mode and mode[01], so that, in a widening
- operation, we call convert_modes with different FROM and TO
- modes, which ensures the value is sign-extended. Shift
- operations are an exception, because the second operand needs
- not be extended to the mode of the result. */
+ those of the actual operands, convert the operands. It would
+ seem that we don't need to convert CONST_INTs, but we do, so
+ that they're properly zero-extended or sign-extended for their
+ modes; shift operations are an exception, because the second
+ operand needs not be extended to the mode of the result. */
if (GET_MODE (op0) != mode0
&& mode0 != VOIDmode)
xop0 = convert_modes (mode0,
GET_MODE (op0) != VOIDmode
? GET_MODE (op0)
- : GET_MODE_SIZE (mode) > GET_MODE_SIZE (mode0)
- ? mode
- : mode0,
+ : mode,
xop0, unsignedp);
if (GET_MODE (xop1) != mode1
@@ -776,8 +771,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
xop1 = convert_modes (mode1,
GET_MODE (op1) != VOIDmode
? GET_MODE (op1)
- : (GET_MODE_SIZE (mode) > GET_MODE_SIZE (mode1)
- && ! shift_op)
+ : ! shift_op
? mode
: mode1,
xop1, unsignedp);
OpenPOWER on IntegriCloud