From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29968 invoked by alias); 5 Jul 2012 17:31:02 -0000 Received: (qmail 29951 invoked by uid 22791); 5 Jul 2012 17:31:00 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mail.rt-rk.ftn.uns.ac.rs (HELO mail.rt-rk.com) (147.91.177.140) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Jul 2012 17:30:46 +0000 Received: from mail.rt-rk.com (mail.localdomain [127.0.0.1]) by mail.rt-rk.com (Postfix) with SMTP id 1B5F825C85E for ; Thu, 5 Jul 2012 19:30:43 +0200 (CEST) From: "Petar Jovanovic" To: "'Maciej W. Rozycki'" , "'Joseph Myers'" Cc: References: <38131C9536FD498AA0679A54D87B1B96@domain.local> Subject: RE: patch to RTLD_START to avoid store data below $sp on MIPS Date: Thu, 05 Jul 2012 17:31:00 -0000 Message-ID: <23DAE082C3224D9DAB2B9E56BEB6E5CB@domain.local> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00011.txt.bz2 @Joseph I did try it out on o32 platform, this is how I know Valgrind will not report error with that change. I have not run any test suite. @Maciej You are right, additional spaces and brackets will look nicer. Regards, Petar -----Original Message----- From: Maciej W. Rozycki [mailto:macro@codesourcery.com] Sent: Wednesday, July 04, 2012 6:30 PM To: Petar Jovanovic Cc: libc-ports@sourceware.org Subject: Re: patch to RTLD_START to avoid store data below $sp on MIPS On Wed, 4 Jul 2012, Petar Jovanovic wrote: > diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h > index bc03785..5aabc88 100644 > --- a/sysdeps/mips/dl-machine.h > +++ b/sysdeps/mips/dl-machine.h > @@ -266,8 +266,9 @@ do { > \ > " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\ > # Make sure the stack pointer is aligned for _dl_init_internal.\n\ > and $2, $29, -2 * " STRINGXP(SZREG) "\n\ > - " STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\ > + move $8, $29\n\ > " STRINGXP(PTR_SUBIU) " $29, $2, 32\n\ > + " STRINGXP(PTR_S) " $8, 32-" STRINGXP(SZREG) "($29)\n\ ^ Spaces missing here, this is not unary "-" unlike in the old instruction, and the whole displacement expression should probably be bracketed to avoid reader's confusion. > " STRINGXP(SAVE_GP(16)) "\n\ > # Call the function to run the initializers.\n\ > jal _dl_init_internal\n\ Maciej