This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about integer_asm_op()

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,
I would expect alignment to never be necessary, but in this case

Hope this is clear.  Thanks for your help.

John Lu

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]