This is the mail archive of the 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]

Re: [PATCH] PR: 19885 [4.0/4.1 Regression] avr dwarf-2 support is broken for head 4.0/4.1

On Tue, May 17, 2005 at 11:57:06PM +0200, Björn Haase wrote:
> 1.) "dw2_assemble_integer (int size, rtx x)"
> is called with 
> size == 4 
> and 
> x == minus:HI (symbol_ref:HI ("*.LELT0")) (symbol_ref:HI ("*.LSLT0")))


> I.e. "dw2_asm_output_delta" passes the parameters size and an expression of 
> mode Pmode without checking that they are having the same width.

Yes, but...

> The problem, therefore always seem to show up, if DWARF_OFFSET_SIZE does not 
> correspond to the same width as Pmode.

Well, yes and no.  Let's step back and look at dw2_assemble_integer.
It looks up whether there's an assembler op that performs the function
it wants directly:

  const char *op = integer_asm_op (size, FALSE);

If that fails, it calls assemble_integer.  There, we perform a different
but similar lookup:

  if (targetm.asm_out.integer (x, size, aligned_p))

and failing that, we attempt to break down the operation into pieces.
Which fails.

Now, arguably, the original computation should either happen in a wider
mode, or it should be extended in some way.  I would not be opposed to
adding a variable

      dwarf2_offset_mode = Pmode;

and using that throughout dwarf2*.c instead of Pmode.

But in addition your patch uses ".word" and ".long" for 2 and 4 byte
integer output in the assembly.  Which begs the question of why the
very first test in dw2_assemble_integer didn't find that operation.

Which suggests that TARGET_ASM_UNALIGNED_SI_OP is not defined when it
really should be.


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