+2005-08-11 Andreas Schwab <schwab@suse.de>
+
+ PR exp/1978
+ * valarith.c (value_binop): Fix result type for the shift
+ operators.
+
2005-08-09 Mark Kettenis <kettenis@gnu.org>
* sparc64obsd-tdep.c: Tweak comments.
Use the signedness of the operand with the greater length.
If both operands are of equal length, use unsigned operation
if one of the operands is unsigned. */
- if (promoted_len1 > promoted_len2)
+ if (op == BINOP_RSH || op == BINOP_LSH)
+ {
+ /* In case of the shift operators the type of the result only
+ depends on the type of the left operand. */
+ unsigned_operation = is_unsigned1;
+ result_len = promoted_len1;
+ }
+ else if (promoted_len1 > promoted_len2)
{
unsigned_operation = is_unsigned1;
result_len = promoted_len1;