Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: John David Anglin <dave@hiauly3.hia.nrc.ca>
Cc: randolph@tausq.org, dave.anglin@nrc-cnrc.gc.ca,
	parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Re: [glibc] tststatic failues, reduced to simple testcase.
Date: Sun, 31 Aug 2003 11:38:38 -0400	[thread overview]
Message-ID: <20030831153837.GJ5194@systemhalted> (raw)
In-Reply-To: <200308310000.UAA01375@hiauly3.hia.nrc.ca>

> I don't fully understand this code but possibly PT_GR20 might be used
> to save r2.  In the fork call for example, we know that this location
> contains  __NR_fork.  This value gets restored to r20 in wrapper_exit.
> I think the valued saved above is loaded into r2 here:

So you say perhaps instead of PT_GR19 we use PT_GR20 and
TASK_PT_GR20? I think we can't though, because tracing the syscall
requires that GR20 continue to retain the syscall value. I think we can
use _any_ other caller-saves registers (including the last input for the
fork-ish calls e.g. GR21 or GR22?).
 
> child_return:
> 	bl      schedule_tail, %r2
> 	nop
> 
> 	LDREG   TASK_PT_GR19-TASK_SZ_ALGN-FRAME_SIZE-FRAME_SIZE(%r30),%r2
> 	b       wrapper_exit
> 	copy    %r0,%r28
> 
> I don't see where the %r30 value saved in PT_GR21 is used.

Me neither. Perhaps it's superfluous and can be used to retrieve r2 and
thus keep r19 safe.

> If a syscall is going to clobber registers, the appropriate clobbers
> need to be added to the asm used for the syscall so that gcc doesn't
> try to use these registers over the syscall.  Use of PT_GR19 appears
> to have been a bad choice because of its special use in pic code.

I've added all the caller-saves registers to our clobber lists when
making syscalls. Though, r19 being special, I've had to add "STW_PIC"
and "LDW_PIC" that do the saving and restore _only_ if we are compiled
PIC.

c.

  reply	other threads:[~2003-08-31 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030829084816.GD19341@systemhalted>
     [not found] ` <200308291507.LAA13539@hiauly3.hia.nrc.ca>
2003-08-29 20:04   ` [parisc-linux] Re: [glibc] tststatic failues, reduced to simple testcase Carlos O'Donell
2003-08-29 22:03     ` John David Anglin
2003-08-29 22:44       ` John David Anglin
2003-08-30 16:15         ` Carlos O'Donell
2003-08-31  0:00           ` John David Anglin
2003-08-31 15:38             ` Carlos O'Donell [this message]
2003-08-31 18:21               ` [parisc-linux] Re: [glibc] tststatic failues, reduced to simp le testcase John David Anglin
2003-08-31 15:29           ` [parisc-linux] Re: [glibc] tststatic failues, reduced to simple testcase Carlos O'Donell
2003-08-30 15:35       ` Carlos O'Donell

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=20030831153837.GJ5194@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=dave.anglin@nrc-cnrc.gc.ca \
    --cc=dave@hiauly3.hia.nrc.ca \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=randolph@tausq.org \
    /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