This is the mail archive of the
mailing list for the GCC project.
Re: Question about integer_asm_op()
- From: John Lu <jlu at lsil dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 25 Apr 2003 17:30:34 -0500 (CDT)
- Subject: Re: Question about integer_asm_op()
- Reply-to: John Lu <jlu at lsil dot com>
I interpreted align_p as a guarantee of an alignment because of
my reading of the comment on line 1903
object. SIZE is the number of bytes in the object and ALIGNED_P
indicates whether it is known to be aligned. Return NULL if the
and because it is calculated in assemble_integer() as:
aligned_p = (align >= MIN (size * BITS_PER_UNIT, BIGGEST_ALIGNMENT));
In this calculation, I could only make sense of it if "align" was an
alignment that the compiler could already guarantee. Then if "align"
is greater than the size of the object or greater than the maximum
possible alignment required by the system, the compiler can state
that alignment is already satisfied.
I initially thought "align" in this calculation was a requested alignment.
But I could not understand why alignment is required only if the
requested alignment is greater than the size of the object or greater
than the largest alignment possibly required by the system.
In my particular case, I have a pointer of size==2, BITS_PER_UNIT==16,
align==16, and BIGGEST_ALIGNMENT==16. Since BITS_PER_UNIT==BIGGEST_ALIGNMENT,
I would expect alignment to never be necessary, but in this case
Hope this is clear. Thanks for your help.