Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: Joel Soete <soete.joel@tiscali.be>
Cc: Parisc List <parisc-linux@lists.parisc-linux.org>,
	Kyle McMartin <kyle@parisc-linux.org>
Subject: Re: [parisc-linux] hppa glibc clone() patch proposal (3/3)
Date: Fri, 24 Mar 2006 09:51:20 -0700	[thread overview]
Message-ID: <20060324165120.GC4206@colo.lackof.org> (raw)
In-Reply-To: <IWMNAP$23D07646E4F7FC13AA5E343EDFB71AEA@scarlet.be>

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

  reply	other threads:[~2006-03-24 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24 10:18 [parisc-linux] hppa glibc clone() patch proposal (3/3) Joel Soete
2006-03-24 16:51 ` Grant Grundler [this message]
     [not found] ` <119aab440603241148k755eb8a1m10982b0538fc2cf3@mail.gmail.com>
2006-03-24 19:50   ` [parisc-linux] Fwd: " Carlos O'Donell
     [not found]     ` <442467DF.8060309@tiscali.be>
     [not found]       ` <119aab440603241504m5f1f8a97tebe4110185d5ac4c@mail.gmail.com>
     [not found]         ` <4424F7EE.7020002@tiscali.be>
     [not found]           ` <119aab440603251126s3a599718n32759d5ed0dcd8c0@mail.gmail.com>
2006-03-26 18:00             ` Joel Soete
2006-03-27  1:33               ` Randolph Chung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060324165120.GC4206@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=kyle@parisc-linux.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=soete.joel@tiscali.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox