fix execute/20010518-2.c

Richard Henderson rth@redhat.com
Tue Aug 21 13:16:00 GMT 2001


On Tue, Aug 21, 2001 at 12:44:33PM -0400, John David Anglin wrote:
> This doesn't work as things stand.  The problem is the alignment
> argument is still 8 bits (ie., unaligned) even when the encoding
> is DW_EH_PE_aligned.

This should fix that.

> It looks like there may be similar problems in the functions
> dw2_asm_output_delta, dw2_asm_output_offset, dw2_asm_output_addr,
> dw2_asm_output_addr_rtx and dw2_asm_output_encoded_addr_rtx
> in dwarf2asm.c.

No, dw2_asm_output_encoded_addr_rtx is the only one that supports
aligning data.  Of course, it's the only one that really needs to.


r~


Index: dwarf2asm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2asm.c,v
retrieving revision 1.11
diff -c -p -d -u -r1.11 dwarf2asm.c
--- dwarf2asm.c	2001/08/19 20:08:36	1.11
+++ dwarf2asm.c	2001/08/21 19:54:54
@@ -933,7 +933,8 @@ dw2_asm_output_encoded_addr_rtx VPARAMS 
   if (encoding == DW_EH_PE_aligned)
     {
       assemble_align (POINTER_SIZE);
-      encoding = DW_EH_PE_absptr;
+      assemble_integer (addr, size, POINTER_SIZE, 1);
+      return;
     }
 
   /* NULL is _always_ represented as a plain zero.  */



More information about the Gcc-patches mailing list