This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


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

Re: PROPOSAL - Correct use of "factored offset" in Appendix 5


Ron,

>Keith: can you provide the data for the other compilers you have surveyed?

Not many I'm afraid ......
	GCC which only factors those offset which explicitly say they are factored
offsets.
	ARM's ARM compiler which factors all the data offsets.
	TI's ARM compiler (using a special option to generate DWARF2) which
factors all the data offsets.

>Nonetheless... I think it important to see the data regarding which
>implementations have come down on which side of this ambiguity. If most
>implementations in fact use unfactored offsets for DW_CFA_def_cfa and
>DW_CFA_def_cfa_offset, then perhaps we should change the wording in the
>opposite direction?
>
>Keith reports that gcc does not apply the factored offset to DW_CFA_def_cfa
>and DW_CFA_def_cfa_offset. For information on a second implementation, I can
>report that the Compaq compilers (F90, C, C++) on Alpha Linux do likewise
>(probably because we looked at gcc and followed suit!).

One thing to bear in mind is that the offset defined in the DW_CFA_def_cfa and
DW_CFA_def_cfa_offset instructions are unsigned values ..... therefore if there
are systems that requires a negative offset the only way of doing this is to
multiply it by a negative data_alignment_factor which is a signed value.

I would suggest that this is a compelling reason for the use of the
data_alignment_factor in the offsets of DW_CFA_def_cfa and
DW_CFA_def_cfa_offset instructions.

If negative offsets were not intended to be supported then the
data_alignment_factor
would have been defined as an unsigned value.

Keith

Keith Walker		keith.walker@arm.com		Tel:+44 (1628) 427732
ARM Ltd		http://www.arm.com

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