sigh.. put back non-garbage collectible `que' functions.

This commit is contained in:
pk 1998-09-18 08:07:08 +00:00
parent 10261f5201
commit 81d435b491
1 changed files with 26 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.92 1998/09/13 11:12:36 pk Exp $ */
/* $NetBSD: locore.s,v 1.93 1998/09/18 08:07:08 pk Exp $ */
/*
* Copyright (c) 1996 Paul Kranenburg
@ -5023,6 +5023,31 @@ ENTRY(fkbyte)
st %g0, [%o2 + PCB_ONFAULT]! but first clear onfault
/*
* Insert entry into doubly-linked queue.
* We could just do this in C, but gcc does not do leaves well (yet).
*/
ENTRY(_insque)
! %o0 = e = what to insert; %o1 = after = entry to insert after
st %o1, [%o0 + 4] ! e->prev = after;
ld [%o1], %o2 ! tmp = after->next;
st %o2, [%o0] ! e->next = tmp;
st %o0, [%o1] ! after->next = e;
retl
st %o0, [%o2 + 4] ! tmp->prev = e;
/*
* Remove entry from doubly-linked queue.
*/
ENTRY(_remque)
! %o0 = e = what to remove
ld [%o0], %o1 ! n = e->next;
ld [%o0 + 4], %o2 ! p = e->prev;
st %o2, [%o1 + 4] ! n->prev = p;
retl
st %o1, [%o2] ! p->next = n;
/*
* copywords(src, dst, nbytes)
*