Commit 42a6ff51 by Alexandre Oliva Committed by Alexandre Oliva

combine.c (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD): New macro.

* combine.c (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD): New macro.
(try_combine): Use it.

From-SVN: r39624
parent 62415523
2001-02-13 Alexandre Oliva <aoliva@redhat.com>
* combine.c (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD): New macro.
(try_combine): Use it.
Tue Feb 13 11:37:06 CET 2001 Jan Hubicka <jh@suse.cz> Tue Feb 13 11:37:06 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.h (SSE_CLASS_P, MMX_CLASS_P, MAYBE_FLOAT_CLASS_P, * i386.h (SSE_CLASS_P, MMX_CLASS_P, MAYBE_FLOAT_CLASS_P,
......
...@@ -146,6 +146,12 @@ static int max_uid_cuid; ...@@ -146,6 +146,12 @@ static int max_uid_cuid;
#define INSN_CUID(INSN) \ #define INSN_CUID(INSN) \
(INSN_UID (INSN) > max_uid_cuid ? insn_cuid (INSN) : uid_cuid[INSN_UID (INSN)]) (INSN_UID (INSN) > max_uid_cuid ? insn_cuid (INSN) : uid_cuid[INSN_UID (INSN)])
/* In case BITS_PER_WORD == HOST_BITS_PER_WIDE_INT, shifting by
BITS_PER_WORD would invoke undefined behavior. Work around it. */
#define UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD(val) \
(((unsigned HOST_WIDE_INT)(val) << (BITS_PER_WORD - 1)) << 1)
/* Maximum register number, which is the size of the tables below. */ /* Maximum register number, which is the size of the tables below. */
static unsigned int combine_max_regno; static unsigned int combine_max_regno;
...@@ -1667,7 +1673,7 @@ try_combine (i3, i2, i1, new_direct_jump_p) ...@@ -1667,7 +1673,7 @@ try_combine (i3, i2, i1, new_direct_jump_p)
if (HOST_BITS_PER_WIDE_INT < BITS_PER_WORD) if (HOST_BITS_PER_WIDE_INT < BITS_PER_WORD)
abort (); abort ();
lo &= ~(((unsigned HOST_WIDE_INT)1 << BITS_PER_WORD) - 1); lo &= ~(UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD (1) - 1);
lo |= INTVAL (SET_SRC (PATTERN (i3))); lo |= INTVAL (SET_SRC (PATTERN (i3)));
} }
else if (HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) else if (HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
...@@ -1677,9 +1683,10 @@ try_combine (i3, i2, i1, new_direct_jump_p) ...@@ -1677,9 +1683,10 @@ try_combine (i3, i2, i1, new_direct_jump_p)
int sign = -(int) ((unsigned HOST_WIDE_INT) lo int sign = -(int) ((unsigned HOST_WIDE_INT) lo
>> (HOST_BITS_PER_WIDE_INT - 1)); >> (HOST_BITS_PER_WIDE_INT - 1));
lo &= ~((((unsigned HOST_WIDE_INT)1 << BITS_PER_WORD) - 1) lo &= ~ (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD
<< BITS_PER_WORD); (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD (1) - 1));
lo |= INTVAL (SET_SRC (PATTERN (i3))) << BITS_PER_WORD; lo |= (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD
(INTVAL (SET_SRC (PATTERN (i3)))));
if (hi == sign) if (hi == sign)
hi = lo < 0 ? -1 : 0; hi = lo < 0 ? -1 : 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