On Fri, Nov 11, 2011 at 11:04 AM, H.J. Lu <hongjiu...@intel.com> wrote:
> Hi,
>
> I am working on 32bit Pmode for x32:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50797
>
> It removes all LEAs, which convert 32bit address to 64bit, and uses 0x67
> address prefix instead.  I got 5% speed up in SPEC CPU 2K/2006.
>
> But assert in _Unwind_SetGRValue:
>
> gcc_assert (dwarf_reg_size_table[index] == sizeof (_Unwind_Context_Reg_Val));
>
> failed on return column since init_return_column_size use Pmode, not
> word_mode.  In this case, _Unwind_Context_Reg_Val is 64bit, but return
> column size is 32bit.  This patch changes it to assert DWARF register
> size <= saved reg size.  OK for trunk?
>
> Thanks.
>
>
> H.J.
> ---
> 2011-11-11  H.J. Lu  <hongjiu...@intel.com>
>
>        * unwind-dw2.c (_Unwind_SetGRValue): Assert DWARF register size
>        <= saved reg size.
>
> diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c
> index 475ad00..db1c757 100644
> --- a/libgcc/unwind-dw2.c
> +++ b/libgcc/unwind-dw2.c
> @@ -294,7 +294,8 @@ _Unwind_SetGRValue (struct _Unwind_Context *context, int 
> index,
>  {
>   index = DWARF_REG_TO_UNWIND_COLUMN (index);
>   gcc_assert (index < (int) sizeof(dwarf_reg_size_table));
> -  gcc_assert (dwarf_reg_size_table[index] == sizeof 
> (_Unwind_Context_Reg_Val));
> +  /* Return column size may be smaller than _Unwind_Context_Reg_Va.  */
> +  gcc_assert (dwarf_reg_size_table[index] <= sizeof 
> (_Unwind_Context_Reg_Val));
>
>   context->by_value[index] = 1;
>   context->reg[index] = _Unwind_Get_Unwind_Context_Reg_Val (val);

Now trunk is in stage 1. Jason, is this OK for trunk?

Thanks.

-- 
H.J.

Reply via email to