call frame instruction encodings ?

Andrew Haley aph@redhat.com
Sat Jan 18 21:13:00 GMT 2003


Andreas Tobler writes:
 > David Edelsohn wrote:
 > >>>>>>Andreas Tobler writes:
 > > 
 > > 
 > > 
 > > Andreas> Can anyone point me or explain me the meaning of the following snippet 
 > > Andreas> from libffi/src/powerpc/sysv.S?
 > > 
 > > Andreas> .byte     0x2f     /*  DW_CFA_GNU_negative_offset_extended */
 > > Andreas> .byte     0x41     /*  uleb128 0x41 */
 > > Andreas> .byte     0x1      /*  uleb128 0x1 */
 > > 
 > > Andreas> I found the dwarf document explaining the DW_CFA and what they mean. But 
 > > Andreas> nothing about DW_CFA_GNU?
 > > 
 > > Andreas> Any pointer would be great since I'm stuck in understanding this.
 > > 
 > > 	See gcc/unwind-dw2.c:execute_cfa_program().
 > 
 > case DW_CFA_GNU_negative_offset_extended:
 >            /* Obsoleted by DW_CFA_offset_extended_sf, but used by
 >               older PowerPC code.  */

It's a nonstandard DWARF extension invented at Cygnus.

  4.4.3 DW_CFA_GNU_negative_offset_extended (0x2f)

  This opcode takes two unsigned LEB128 operands representing a
  register number and a factored offset. This instruction is identical
  to DW_CFA_offset_extended except that the delta is in the opposite
  direction. This opcode was used on some PowerPC targets, but is
  replaced by DW_CFA_offset_extended_sf.

 > In other words I should not use it when writing eh-frame info for
 > darwin?
 
It'll still be supported for a while.  I still don't know a reason not
to copy the sysv version as long as the stack is the same.

Andrew.



More information about the Gcc mailing list