From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4918 invoked by alias); 30 Jan 2013 04:34:18 -0000 Received: (qmail 4843 invoked by uid 22791); 30 Jan 2013 04:34:17 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RP_MATCHES_RCVD,TW_EG X-Spam-Check-By: sourceware.org Received: from usmamail.tilera.com (HELO USMAMAIL.TILERA.COM) (12.216.194.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jan 2013 04:34:12 +0000 Received: from [10.200.0.56] (124.207.145.166) by USMAExch2.tad.internal.tilera.com (10.3.0.33) with Microsoft SMTP Server (TLS) id 14.0.694.0; Tue, 29 Jan 2013 23:34:11 -0500 Message-ID: <5108A2BB.4010405@tilera.com> Date: Wed, 30 Jan 2013 04:34:00 -0000 From: Jiong Wang User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: CC: Joel Brobecker , , Walter Lee Subject: Re: [RFC/TileGX 1/6] fix args alignment bug References: <50F9148F.3010602@tilera.com> <20130118131358.GE3564@adacore.com> <50F9638C.4020005@tilera.com> <50FE69DB.6090802@tilera.com> <5107E15A.9080809@tilera.com> In-Reply-To: <5107E15A.9080809@tilera.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00704.txt.bz2 Ok, if no one object, Walter (GNU appointed TileGX gcc/binutils maintainer) will checkin all these updated TileGX patches. thanks. --- Regards, Jiong 于 2013/1/29 22:48, Jiong Wang 写道: > PING, any feedback? > > I had fixed all issues according to feedback, these patches cut tilegx > Dejagnu unexpected failures from 120 to about 50. > > so is it OK to commit them? if it's OK to commit, can any one help > commit them? we do not have a gdb account yet. > > thanks > > Regards, > Jiong > Tilera Corporation. > > > 于 2013/1/22 18:28, Jiong Wang 写道: >> 于 2013/1/18 23:00, Jiong Wang 写道: >>> Hi Joel, >>> >>> thanks for your careful review >>> >>>>> - /* Loop backwards through arguments to determine stack >>>>> alignment. */ >>>>> - alignlen = 0; >>>>> - >>>>> - for (j = nargs - 1; j >= i; j--) >>>>> - { >>>>> - typelen = TYPE_LENGTH (value_enclosing_type (args[j])); >>>>> - alignlen += (typelen + 3) & (~3); >>>>> - } >>>>> - >>>>> - if (alignlen & 0x4) >>>>> - stack_dest -= 4; >>>> Do you have any hint as to why this code was written the way it was? >>>> It doesn't seem like the type of code that would be added by accident. >>>> Did Jeff (the apparent author) misunderstand the ABI? >>> >>> actually, these these copied from our tilepro target which is >>> a pure 32bit target, and the >>> compiler for that target is not gcc initially. so there maybe some >>> historic reason for those code. >>> >>> but for tilegx, the ABI is actually very clear, 10 regs for >>> arguments, then push on stack. >>> >>> so I just delete them, gdb works ok on both daily usage and >>> dejagnu >>>> >>>>> typelen = TYPE_LENGTH (value_enclosing_type (args[j])); >>>>> - slacklen = ((typelen + 3) & (~3)) - typelen; >>>>> + slacklen = ((typelen + 7) & (~7)) - typelen; >>>> This is a detail, but can you use utils.c:align_up, in this case? >>>> (I find those midly more readable than these incantations, but >>>> it's OK if you prefer the code to stay as is). >>> thanks, I change to align_up to reuse existing helper function >>>> >>>>> /* Add 2 words for linkage space to the stack. */ >>>>> - stack_dest = stack_dest - 8; >>>>> - write_memory (stack_dest, two_zero_words, 8); >>>>> + stack_dest = stack_dest - 16; >>>>> + write_memory (stack_dest, four_zero_words, 16); >>>> It looks like you need to adjust the comment as well. >>> >>> fixed. >>> >>> is this new 01-revise.patch ok for this issue? >>> >> Ping, are this and the other updated tilegx patches OK? >> >> Thanks, >> Jiong >> >