[klibc] [PATCH] vfork() for parisc
kyle at parisc-linux.org
Tue Jul 25 15:15:24 PDT 2006
On Tue, Jul 25, 2006 at 02:58:02PM -0700, H. Peter Anvin wrote:
> Kyle McMartin wrote:
> >Implement "pid_t vfork(void)" for parisc.
> Dumb question... where does %r20 get set? This isn't invoked by a
> system call stub; it's the entire function.
Oh. Nowhere then. We can set it in the branch delay slot.
[PARISC] Load __NR_vfork in syscall branch delay slot
I mistakenly thought this was a system call stub, not
a standalone piece of code.
Signed-off-by: Kyle McMartin <kyle at parisc-linux.org>
@@ -13,7 +13,7 @@
/* pid_t vfork(void) */
ble 0x100(%sr2, %r0) ; jump to gateway page
+ ldi __NR_vfork, %r20 ; load syscall nr
ldi -0x1000,%r19 ; %r19 = -4096
sub %r0,%ret0,%r22 ; %r22 = -%ret0
More information about the klibc