Re: debugging internal compiler errors ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The code from libgcc2.c(_fixunsxfdi):

#if defined(L_fixunsxfdi) && LIBGCC2_HAS_XF_MODE
UDWtype
__fixunsxfDI (XFtype a)
{
  if (a < 0)
    return 0;

  /* Compute high word of result, as a flonum.  */
  const XFtype b = (a / Wtype_MAXp1_F);
  /* Convert that to fixed (but not to DWtype!),
     and shift it into the high word.  */
  UDWtype v = (UWtype) b;
  v <<= W_TYPE_SIZE;
  /* Remove high part from the XFtype, leaving the low part as flonum.  */
  a -= (XFtype)v;
  /* Convert that to fixed (but not to DWtype!) and add it in.
     Sometimes A comes out negative.  This is significant, since
     A has more bits than a long int does.  */
  if (a < 0)
    v -= (UWtype) (- a);
  else
    v += (UWtype) a;
  return v;
}

Based on this:

#12 0x0813c8b9 in expand_expr_real_1 (exp=0xb73c76ac, target=0x0,
    tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at ../../gcc-4.3.5/gcc/expr.c:9158
9158		expand_assignment (lhs, rhs, MOVE_NONTEMPORAL (exp));
(gdb) call debug_rtx(lhs)
(const/j (nil))
(gdb) call debug_rtx(rhs)
(lshiftrt (nil)
    (nil))

It looks like it could be getting stuck on the left shift?

#15 0x08420bc9 in expand_gimple_basic_block (bb=0xb7496708)
    at ../../gcc-4.3.5/gcc/cfgexpand.c:1610
1610		      expand_expr_stmt (stmt);
(gdb) l
1605			}
1606		    }
1607		  else
1608		    {
1609		      last = get_last_insn ();
1610		      expand_expr_stmt (stmt);
1611		      maybe_dump_rtl_for_tree_stmt (stmt, last);
1612		    }
1613		}
1614	    }
(gdb) whatis last
type = rtx
(gdb) call debug_rtx(last)
(insn 44 43 0 ../../../gcc-4.3.5/libgcc/../gcc/libgcc2.c:1234 (set
(reg/v:DI 31 [ v.6 ])
        (ashift:DI (reg/v:DI 32 [ v.5 ])
            (const_int 32 [0x20]))) -1 (nil))

Here is the debug_tree(exp) from the tree argument of
expand_expr_stmnt() (#14 in the stack frame):

(gdb) call debug_tree(exp)
 <gimple_modify_stmt 0xb73c76ac side-effects asm_written
    arg 0 <var_decl 0xb73cb1b8 a.7
        type <real_type 0xb73b9f70 XFtype sizes-gimplified XF
            size <integer_cst 0xb749cb0c constant invariant 96>
            unit size <integer_cst 0xb749cb28 constant invariant 12>
            align 32 symtab -1220816636 alias set -1 canonical type
0xb74b04e0 precision 80>
        used XF file ../../../gcc-4.3.5/libgcc/../gcc/libgcc2.c line
1225 col 1 size <integer_cst 0xb749cb0c 96> unit size <integer_cst
0xb749cb28 12>
        align 32 context <function_decl 0xb73c25b0 __fixunsxfdi>
        (reg/v:XF 30 [ a.7 ])>
    arg 1 <minus_expr 0xb75075a0
        type <real_type 0xb74b04e0 long double sizes-gimplified XF
size <integer_cst 0xb749cb0c 96> unit size <integer_cst 0xb749cb28 12>
            align 32 symtab -1220816532 alias set -1 canonical type
0xb74b04e0 precision 80
            pointer_to_this <pointer_type 0xb74b0618>>

        arg 0 <parm_decl 0xb73c5500 a type <real_type 0xb73b9f70 XFtype>
            used XF file ../../../gcc-4.3.5/libgcc/../gcc/libgcc2.c
line 1224 col 22 size <integer_cst 0xb749cb0c 96> unit size
<integer_cst 0xb749cb28 12>
            align 32 context <function_decl 0xb73c25b0 __fixunsxfdi>
initial <real_type 0xb73b9f70 XFtype>
            (reg/v:XF 35 [ a ]) arg-type <real_type 0xb73b9f70 XFtype>
            incoming-rtl (mem/c/i:XF (reg/f:SI 25
virtual-incoming-args) [0 a+0 S12 A32])>
        arg 1 <float_expr 0xb752a680 type <real_type 0xb74b04e0 long double>
            arg 0 <var_decl 0xb73cb160 v.6>>>
    ../../../gcc-4.3.5/libgcc/../gcc/libgcc2.c:1236:3>

kevin

P.S.:  Is there a way to turnoff the -quiet option to cc1 from the driver?


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux