This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix x86-64 crash (3.1?)
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- Date: Wed, 27 Feb 2002 17:00:57 +0100
- Subject: Fix x86-64 crash (3.1?)
Hi,
this is fixes silly bug that CONDITONALIZE_REGISTER_USSAGE writes
to PIC_OFFSET_TABLE_REGNUM that is INVALID_REGNUM for x86_64 and thus
overwrites stack.
Ok for branch too?
Honza
Wed Feb 27 17:56:08 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.h (CONDITIONALIZE_REGISTER_USAGE): Avoid overwriting
of stack on 64bit target.
Index: i386.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.243
diff -c -3 -p -r1.243 i386.h
*** i386.h 17 Feb 2002 07:52:12 -0000 1.243
--- i386.h 27 Feb 2002 15:56:27 -0000
*************** do { \
*** 957,963 ****
call_used_regs[i] = (call_used_regs[i] \
& (TARGET_64BIT ? 2 : 1)) != 0; \
} \
! if (flag_pic) \
{ \
fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
--- 957,963 ----
call_used_regs[i] = (call_used_regs[i] \
& (TARGET_64BIT ? 2 : 1)) != 0; \
} \
! if (flag_pic && !TARGET_64BIT) \
{ \
fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \