PR jit/64722: fix corruption of %ebx on 32-bit i386 with libgccjit

gcc/ChangeLog:
	PR jit/64722
	* emit-rtl.c (init_emit_regs): Set pic_offset_table_rtx to
	NULL_RTX before testing PIC_OFFSET_TABLE_REGNUM, since the
	latter may be affected by the former (e.g. on i686).

From-SVN: r220044
This commit is contained in:
David Malcolm 2015-01-23 15:57:42 +00:00 committed by David Malcolm
parent 130dc027c5
commit ca72dad54a
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2015-01-23 David Malcolm <dmalcolm@redhat.com>
PR jit/64722
* emit-rtl.c (init_emit_regs): Set pic_offset_table_rtx to
NULL_RTX before testing PIC_OFFSET_TABLE_REGNUM, since the
latter may be affected by the former (e.g. on i686).
2015-01-23 Martin Liska <mliska@suse.cz>
* tree.h (tree_vec_elt_check): Workaround -Wstrict-overflow

View File

@ -5872,10 +5872,9 @@ init_emit_regs (void)
= gen_raw_REG (Pmode, RETURN_ADDRESS_POINTER_REGNUM);
#endif
pic_offset_table_rtx = NULL_RTX;
if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)
pic_offset_table_rtx = gen_raw_REG (Pmode, PIC_OFFSET_TABLE_REGNUM);
else
pic_offset_table_rtx = NULL_RTX;
for (i = 0; i < (int) MAX_MACHINE_MODE; i++)
{