From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28851 invoked by alias); 28 Mar 2003 07:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 28663 invoked by uid 71); 28 Mar 2003 07:36:00 -0000 Date: Fri, 28 Mar 2003 07:56:00 -0000 Message-ID: <20030328073600.28662.qmail@sources.redhat.com> To: kazu@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Dhananjay R. Deshpande" Subject: Re: target/10205: Incorrect code generated for H8300 "normal" mode Reply-To: "Dhananjay R. Deshpande" X-SW-Source: 2003-03/txt/msg01961.txt.bz2 List-Id: The following reply was made to PR target/10205; it has been noted by GNATS. From: "Dhananjay R. Deshpande" To: , , , , Cc: "Kazu Hirata" Subject: Re: target/10205: Incorrect code generated for H8300 "normal" mode Date: Fri, 28 Mar 2003 13:01:11 +0530 Hi, >Synopsis: Incorrect code generated for H8300 "normal" mode >State-Changed-From-To: open->analyzed >State-Changed-By: kazu >State-Changed-When: Thu Mar 27 19:59:48 2003 >State-Changed-Why: > Still present in mainline. Here is a smaller testcase. =20 The patch below fixes this. If it is OK, it should be applied to both = mainline=20 and 3.3 branch. - Dhannajay Changelog 2003-03-28 Dhananjay Deshpande PR target/10205 * config/h8300/h8300.c (h8300_initial_elimination_offset): = Remove hack in=20 adjustment of offset for normal mode. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D --- h8300.c.orig Fri Mar 28 12:07:21 2003 +++ h8300.c Fri Mar 28 12:04:57 2003 @@ -1717,7 +1717,8 @@ h8300_initial_elimination_offset (from,=20 int offset =3D 0; =20 if (from =3D=3D ARG_POINTER_REGNUM && to =3D=3D FRAME_POINTER_REGNUM) - offset =3D UNITS_PER_WORD + frame_pointer_needed * UNITS_PER_WORD; + offset =3D (POINTER_SIZE / BITS_PER_UNIT) + frame_pointer_needed * + UNITS_PER_WORD; else if (from =3D=3D RETURN_ADDRESS_POINTER_REGNUM && to =3D=3D = FRAME_POINTER_REGNUM) offset =3D frame_pointer_needed * UNITS_PER_WORD; else @@ -1734,11 +1735,8 @@ h8300_initial_elimination_offset (from,=20 offset +=3D round_frame_size (get_frame_size ()); =20 if (from =3D=3D ARG_POINTER_REGNUM && to =3D=3D = STACK_POINTER_REGNUM) - offset +=3D UNITS_PER_WORD; /* Skip saved PC */ + offset +=3D (POINTER_SIZE / BITS_PER_UNIT); /* Skip saved = PC */ } - - if ((TARGET_H8300H || TARGET_H8300S) && TARGET_NORMAL_MODE) - offset -=3D 2; =20 return offset; } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D