DW_EH_PE_aligned handling
Jakub Jelinek
jakub@redhat.com
Wed Dec 12 11:37:00 GMT 2001
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
More information about the Gcc
mailing list