This is the mail archive of the gcc@gcc.gnu.org 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]

DW_EH_PE_aligned handling


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


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