This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug target/47324] r157762 caused g++.dg/torture/stackalign failures with -O3 -g at -m32 on darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47324

--- Comment #34 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-10 15:01:44 UTC ---
For #c32, you obviously can't hardcode darwin ugly hacks into generic code.
The #c33 patch looks much better, but still
1) in output_loc_sequence, you need to use DWARF2_FRAME_REG_OUT even if
!for_eh,
   so that conditional has to go (on ppc, DWARF2-FRAME_REG_OUT changes the
value
   only if !for_eh.  On the other side, you want to handle
   DW_OP_reg0 ... DW_OP_reg31 similarly.  So something like:

    enum dwarf_location_atom opc = loc->dw_loc_opc;
    if (opc >= DW_OP_breg0 && opc <= DW_OP_breg31)
      {
        unsigned r = (opc - DW_OP_breg0);
        r = DWARF_FRAME_REG_OUT (r, for_eh);
        gcc_assert (r <= 31);
        opc = (enum dwarf_location_atom) (DW_OP_breg0 + r);
      }
    else if (opc >= DW_OP_reg0 && opc <= DW_OP_reg31)
      {
        unsigned r = (opc - DW_OP_reg0);
        r = DWARF_FRAME_REG_OUT (r, for_eh);
        gcc_assert (r <= 31);
        opc = (enum dwarf_location_atom) (DW_OP_reg0 + r);
      }
    dw2_asm_output_data (1, opc, "%s", dwarf_stack_op_name (opc));

2) you need to handle DW_OP_bregx and DW_OP_regx operand in output_loc_operands
(this time with assertion that size_of_uleb128 is the same).

3) the *raw* routines need similar changes, just with for_eh argument not
passed around (instead assumed to be 1).


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