This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
HOST_WIDE_INT = long long patches
- To: egcs at cygnus dot com
- Subject: HOST_WIDE_INT = long long patches
- From: John Carr <jfc at mit dot edu>
- Date: Sun, 19 Apr 1998 15:34:31 -0400
Sun Apr 19 15:27:53 1998 John Carr <jfc@mit.edu>
* final.c (split_double): Sign extend both halves of a split CONST_INT.
* emit_rtl.c (gen_highpart): If HOST_WIDE_INT is larger than a target
word, the high part of a CONST_INT is not always zero.
* recog.c (constrain_operands): Allow CONST_INT in place of
CONST_DOUBLE when HOST_WIDE_INT is larger than a target word.
* reload.c (find_reloads): Likewise.
*** final.c~ Sat Apr 4 14:53:20 1998
--- final.c Sun Apr 19 12:40:30 1998
***************
*** 3661,3676 ****
if (HOST_BITS_PER_WIDE_INT >= (2 * BITS_PER_WORD))
{
/* In this case the CONST_INT holds both target words.
! Extract the bits from it into two word-sized pieces. */
rtx low, high;
- HOST_WIDE_INT word_mask;
- /* Avoid warnings for shift count >= BITS_PER_WORD. */
- int shift_count = BITS_PER_WORD - 1;
! word_mask = (HOST_WIDE_INT) 1 << shift_count;
! word_mask |= word_mask - 1;
! low = GEN_INT (INTVAL (value) & word_mask);
! high = GEN_INT ((INTVAL (value) >> (shift_count + 1)) & word_mask);
if (WORDS_BIG_ENDIAN)
{
*first = high;
--- 3661,3672 ----
if (HOST_BITS_PER_WIDE_INT >= (2 * BITS_PER_WORD))
{
/* In this case the CONST_INT holds both target words.
! Extract the bits from it into two word-sized pieces.
! Sign extend each half to HOST_WIDE_INT. */
rtx low, high;
! low = GEN_INT (INTVAL (value) << (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD) >> (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD));
! high = GEN_INT (INTVAL (value) << (HOST_BITS_PER_WIDE_INT - 2 * BITS_PER_WORD) >> (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD));
if (WORDS_BIG_ENDIAN)
{
*first = high;
*** emit-rtl.c~ Sat Apr 18 07:40:05 1998
--- emit-rtl.c Sun Apr 19 14:31:59 1998
***************
*** 984,990 ****
)
return GEN_INT (CONST_DOUBLE_HIGH (x) & GET_MODE_MASK (mode));
else if (GET_CODE (x) == CONST_INT)
! return const0_rtx;
else if (GET_CODE (x) == MEM)
{
register int offset = 0;
--- 984,994 ----
)
return GEN_INT (CONST_DOUBLE_HIGH (x) & GET_MODE_MASK (mode));
else if (GET_CODE (x) == CONST_INT)
! {
! if (HOST_BITS_PER_WIDE_INT <= BITS_PER_WORD)
! return const0_rtx;
! return GEN_INT (INTVAL (x) >> (HOST_BITS_PER_WIDE_INT - BITS_PER_WORD));
! }
else if (GET_CODE (x) == MEM)
{
register int offset = 0;
*** reload.c~ Sat Apr 4 14:53:45 1998
--- reload.c Sun Apr 19 14:10:12 1998
***************
*** 3054,3060 ****
case 'G':
case 'H':
! if (GET_CODE (operand) == CONST_DOUBLE
&& CONST_DOUBLE_OK_FOR_LETTER_P (operand, c))
win = 1;
break;
--- 3054,3062 ----
case 'G':
case 'H':
! if ((GET_CODE (operand) == CONST_DOUBLE
! || (HOST_BITS_PER_WIDE_INT > BITS_PER_WORD
! && GET_CODE (operand) == CONST_INT))
&& CONST_DOUBLE_OK_FOR_LETTER_P (operand, c))
win = 1;
break;
*** recog.c~ Fri Apr 17 15:57:25 1998
--- recog.c Sun Apr 19 14:12:10 1998
***************
*** 1858,1864 ****
case 'G':
case 'H':
! if (GET_CODE (op) == CONST_DOUBLE
&& CONST_DOUBLE_OK_FOR_LETTER_P (op, c))
win = 1;
break;
--- 1858,1866 ----
case 'G':
case 'H':
! if ((GET_CODE (op) == CONST_DOUBLE
! || (HOST_BITS_PER_WIDE_INT > BITS_PER_WORD
! && GET_CODE (op) == CONST_INT))
&& CONST_DOUBLE_OK_FOR_LETTER_P (op, c))
win = 1;
break;