This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
DW_EH_PE_aligned handling
- From: Jakub Jelinek <jakub at redhat dot com>
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 12 Dec 2001 20:03:42 +0100
- Subject: DW_EH_PE_aligned handling
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
Is DW_EH_PE_aligned only meaningful if not ored with any of the low 4 bit
values?
Wouldn't it be better to handle DW_EH_PE_aligned as
if ((encoding & 0x70) == DW_EH_PE_aligned)
{
_Unwind_Ptr size = size_of_encoded_value (encoding);
_Unwind_Ptr a = (_Unwind_Ptr) p;
a = (a + size - 1) & - size;
p = (const unsigned char *) a;
u = (union unaligned *) p;
}
instead (and then continue with the switch (encoding & 0x0f))?
Like that, only DW_EH_PE_aligned|DW_EH_PE_uleb128 and
DW_EH_PE_aligned|DW_EH_PE_sleb128 would be banned (they make no sense),
but e.g. DW_EH_PE_aligned|DW_EH_PE_udata4 which makes sense could be
handled.
What do you think?
Jakub