This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ix86_split_long_move fix
- To: rth at cygnus dot com, aj at suse dot de, patches at x86-64 dot org, gcc-patches at gcc dot gnu dot org
- Subject: ix86_split_long_move fix
- From: Jan Hubicka <jh at suse dot cz>
- Date: Fri, 30 Mar 2001 00:38:30 +0200
Hi,
This patch fixes crash reported by Andreas - the code in ix86_split_long_move
cope adresses to compensate the push instruciton, but those addresses may use
different modes resulting in compile time abort in expr.c
I am installing this to x86_64 tree and waiting for approval for mainline.
Fri Mar 30 00:35:57 CEST 2001 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_split_long_mvoe): Use change address to compensate
stack pointer change in push instruction.
Index: config/i386/i386.c
===================================================================
RCS file: /home/cvs/Repository/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.50
diff -c -3 -p -r1.50 i386.c
*** config/i386/i386.c 2001/03/26 15:37:35 1.50
--- config/i386/i386.c 2001/03/29 22:33:52
*************** ix86_split_long_move (operands)
*** 7916,7923 ****
&& reg_overlap_mentioned_p (stack_pointer_rtx, operands[1]))
{
if (nparts == 3)
! part[1][1] = part[1][2];
! part[1][0] = part[1][1];
}
/* We need to do copy in the right order in case an address register
--- 7916,7925 ----
&& reg_overlap_mentioned_p (stack_pointer_rtx, operands[1]))
{
if (nparts == 3)
! part[1][1] = change_address (part[1][1], GET_MODE (part[1][1]),
! XEXP (part[1][2], 0));
! part[1][0] = change_address (part[1][0], GET_MODE (part[1][0]),
! XEXP (part[1][1], 0));
}
/* We need to do copy in the right order in case an address register
*************** ix86_split_long_move (operands)
*** 7989,7994 ****
--- 7991,7998 ----
part[1][1] = gen_rtx_REG (DImode, REGNO (part[1][1]));
else
abort();
+ if (GET_MODE (part[1][0]) == SImode)
+ part[1][0] = part[1][1];
}
}
emit_move_insn (part[0][1], part[1][1]);