This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Yet more missing alignment hunks.
- To: gcc-patches at gcc dot gnu dot org
- Subject: Yet more missing alignment hunks.
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Thu, 30 Mar 00 16:59:51 EST
Somehow these got left out:
Thu Mar 30 06:32:51 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expmed.c (store_bit_field, store_fixed_bit_field): Fix more
cases of alignment in bytes.
*** expmed.c 2000/03/30 14:12:28 1.55
--- expmed.c 2000/03/30 21:11:05
*************** negate_rtx (mode, x)
*** 218,222 ****
containing BITSIZE bits starting at bit BITNUM.
FIELDMODE is the machine-mode of the FIELD_DECL node for this field.
! ALIGN is the alignment that STR_RTX is known to have, measured in bytes.
TOTAL_SIZE is the size of the structure in bytes, or -1 if varying. */
--- 218,222 ----
containing BITSIZE bits starting at bit BITNUM.
FIELDMODE is the machine-mode of the FIELD_DECL node for this field.
! ALIGN is the alignment that STR_RTX is known to have.
TOTAL_SIZE is the size of the structure in bytes, or -1 if varying. */
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 310,314 ****
|| ! SLOW_UNALIGNED_ACCESS (fieldmode, align)
|| (offset * BITS_PER_UNIT % bitsize == 0
! && align % GET_MODE_SIZE (fieldmode) == 0))
&& (BYTES_BIG_ENDIAN ? bitpos + bitsize == unit : bitpos == 0)
&& bitsize == GET_MODE_BITSIZE (fieldmode))
--- 310,314 ----
|| ! SLOW_UNALIGNED_ACCESS (fieldmode, align)
|| (offset * BITS_PER_UNIT % bitsize == 0
! && align % GET_MODE_BITSIZE (fieldmode) == 0))
&& (BYTES_BIG_ENDIAN ? bitpos + bitsize == unit : bitpos == 0)
&& bitsize == GET_MODE_BITSIZE (fieldmode))
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 516,520 ****
|| GET_MODE_SIZE (GET_MODE (op0)) > GET_MODE_SIZE (maxmode))
bestmode
! = get_best_mode (bitsize, bitnum, align * BITS_PER_UNIT, maxmode,
MEM_VOLATILE_P (op0));
else
--- 516,520 ----
|| GET_MODE_SIZE (GET_MODE (op0)) > GET_MODE_SIZE (maxmode))
bestmode
! = get_best_mode (bitsize, bitnum, align, maxmode,
MEM_VOLATILE_P (op0));
else
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 523,527 ****
if (bestmode == VOIDmode
|| (SLOW_UNALIGNED_ACCESS (bestmode, align)
! && GET_MODE_SIZE (bestmode) > align))
goto insv_loses;
--- 523,527 ----
if (bestmode == VOIDmode
|| (SLOW_UNALIGNED_ACCESS (bestmode, align)
! && GET_MODE_BITSIZE (bestmode) > align))
goto insv_loses;
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 534,538 ****
plus_constant (XEXP (op0, 0), offset));
! /* Fetch that unit, store the bitfield in it, then store the unit. */
tempreg = copy_to_reg (op0);
store_bit_field (tempreg, bitsize, bitpos, fieldmode, value,
--- 534,539 ----
plus_constant (XEXP (op0, 0), offset));
! /* Fetch that unit, store the bitfield in it, then store
! the unit. */
tempreg = copy_to_reg (op0);
store_bit_field (tempreg, bitsize, bitpos, fieldmode, value,
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 629,633 ****
but BITPOS still counts within a full word,
which is significant on bigendian machines.)
! STRUCT_ALIGN is the alignment the structure is known to have (in bytes).
Note that protect_from_queue has already been done on OP0 and VALUE. */
--- 630,634 ----
but BITPOS still counts within a full word,
which is significant on bigendian machines.)
! STRUCT_ALIGN is the alignment the structure is known to have.
Note that protect_from_queue has already been done on OP0 and VALUE. */
*************** store_fixed_bit_field (op0, offset, bits
*** 799,803 ****
(within the word).
VALUE is the value to store.
! ALIGN is the known alignment of OP0, measured in bytes.
This is also the size of the memory objects to be used.
--- 800,804 ----
(within the word).
VALUE is the value to store.
! ALIGN is the known alignment of OP0.
This is also the size of the memory objects to be used.
*************** store_split_bit_field (op0, bitsize, bit
*** 819,823 ****
unit = BITS_PER_WORD;
else
! unit = MIN (align * BITS_PER_UNIT, BITS_PER_WORD);
/* If VALUE is a constant other than a CONST_INT, get it into a register in
--- 820,824 ----
unit = BITS_PER_WORD;
else
! unit = MIN (align, BITS_PER_WORD);
/* If VALUE is a constant other than a CONST_INT, get it into a register in
*************** store_split_bit_field (op0, bitsize, bit
*** 886,891 ****
? UNITS_PER_WORD
: (GET_MODE (value) == BLKmode
! ? 1
! : GET_MODE_ALIGNMENT (GET_MODE (value)) / BITS_PER_UNIT));
}
else
--- 887,891 ----
? UNITS_PER_WORD
: (GET_MODE (value) == BLKmode
! ? 1 : GET_MODE_ALIGNMENT (GET_MODE (value))));
}
else
*************** store_split_bit_field (op0, bitsize, bit
*** 903,908 ****
? UNITS_PER_WORD
: (GET_MODE (value) == BLKmode
! ? 1
! : GET_MODE_ALIGNMENT (GET_MODE (value)) / BITS_PER_UNIT));
}
--- 903,907 ----
? UNITS_PER_WORD
: (GET_MODE (value) == BLKmode
! ? 1 : GET_MODE_ALIGNMENT (GET_MODE (value))));
}