Vasanth <[EMAIL PROTECTED]> writes:

> What is the recommended way to do DW2 frame unwinding based exception
> handling for targets that do not support unaligned accesses in
> hardware? I did see the documentation about UNALIGNED_INT_ASM_OP, but
> not sure if that is meant to generate a directive to the assembler to
> produce an aligned int (the name indicates otherwise). Also, I see
> UNALIGNED_INT_ASM_OP being used only in the VMS debugging source file.
> So I am unsure how it relates to DW2 based frame unwinding.

UNALIGNED_INT_ASM_OP tells the assembler to not do any automatic
alignment before emitting the value.  In current development sources
this is TARGET_ASM_UNALIGNED_SI_OP, and it is defined in a number of
config/*/*.c files.

It should not matter that your target does not support unaligned
access in hardware.  The code in read_encoded_value_with_base in
unwind-pe.h should do the right thing, by using a packed union.  On a
target which does not support unaligned access, it will use byte
reads.

If you really do want to insist that all accesses be aligned, it
should work to define ASM_PREFERRED_EH_DATA_FORMAT to be
DW_EH_PE_aligned.

Ian

Reply via email to