Commit cfff35c1 by Jim Wilson Committed by Jim Wilson

Fix ia64 gdb miscompilation reported by Kevin Buettner.

	* combine.c (force_to_mode, case LSHIFTRT): Check that shift shift
	plus mask size is smaller or equal to the mode size.

From-SVN: r33157
parent 4c1545e4
Fri Apr 14 16:09:02 2000 Jim Wilson <wilson@cygnus.com>
* combine.c (force_to_mode, case LSHIFTRT): Check that shift shift
plus mask size is smaller or equal to the mode size.
Fri Apr 14 18:07:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Fri Apr 14 18:07:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* print-rtl.c (print_rtx, case NOTE): Don't blow up if NOTE_BASIC_BLOCK * print-rtl.c (print_rtx, case NOTE): Don't blow up if NOTE_BASIC_BLOCK
......
...@@ -6935,10 +6935,17 @@ force_to_mode (x, mode, mask, reg, just_select) ...@@ -6935,10 +6935,17 @@ force_to_mode (x, mode, mask, reg, just_select)
if (GET_CODE (x) == LSHIFTRT if (GET_CODE (x) == LSHIFTRT
&& GET_CODE (XEXP (x, 1)) == CONST_INT && GET_CODE (XEXP (x, 1)) == CONST_INT
/* The shift puts one of the sign bit copies in the least significant
bit. */
&& ((INTVAL (XEXP (x, 1)) && ((INTVAL (XEXP (x, 1))
+ num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0)))) + num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0))))
>= GET_MODE_BITSIZE (GET_MODE (x))) >= GET_MODE_BITSIZE (GET_MODE (x)))
&& exact_log2 (mask + 1) >= 0 && exact_log2 (mask + 1) >= 0
/* Number of bits left after the shift must be more than the mask
needs. */
&& ((INTVAL (XEXP (x, 1)) + exact_log2 (mask + 1))
<= GET_MODE_BITSIZE (GET_MODE (x)))
/* Must be more sign bit copies than the mask needs. */
&& ((int) num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0))) && ((int) num_sign_bit_copies (XEXP (x, 0), GET_MODE (XEXP (x, 0)))
>= exact_log2 (mask + 1))) >= exact_log2 (mask + 1)))
x = gen_binary (LSHIFTRT, GET_MODE (x), XEXP (x, 0), x = gen_binary (LSHIFTRT, GET_MODE (x), XEXP (x, 0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment