From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Grundler Subject: Re: [parisc-linux] hppa glibc clone() patch proposal (3/3) Date: Fri, 24 Mar 2006 09:51:20 -0700 Message-ID: <20060324165120.GC4206@colo.lackof.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Parisc List , Kyle McMartin To: Joel Soete Return-Path: In-Reply-To: List-Id: parisc-linux developers list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: parisc-linux-bounces@lists.parisc-linux.org On Fri, Mar 24, 2006 at 11:18:25AM +0100, Joel Soete wrote: > Hello Mike, pa*, > > And this last step is my actual fix proposal: ... > ENTRY(__clone) > + /* Sanity check arguments. */ > + comib,= 0, %arg0, .Larg_error /* no NULL function pointers */ > + ldi -EINVAL, %ret0 > + comib,= 0, %arg1, .Larg_error /* no NULL stack pointers */ > + nop If this is correct, then I would prefer: /* catch NULL stack or function ptrs */ xor %arg1, %arg0, %ret0 comib,=,n 0, %ret0, .Larg_error ldi -EINVAL, %ret0 > > /* Save the fn ptr and arg on the new stack. */ > stwm %arg0, 64(%arg1) > @@ -60,8 +67,8 @@ > > /* Create frame for function */ > copy %sp, %r21 > + stw %r21, 60(%sp) Is %r21 used later again? If not, then these two ops can become: stw %sp, 60(%sp) If yes, then add the copy() *after* the stw. PA-RISC can only do one store at a time. PA20 can do the copy in parallel with the store. hth, grant _______________________________________________ parisc-linux mailing list parisc-linux@lists.parisc-linux.org http://lists.parisc-linux.org/mailman/listinfo/parisc-linux