From 8127d479850af74f7a01c83af55c18fdc1f59d75 Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Mon, 26 May 2008 18:39:02 +0000 Subject: [PATCH] STATUS: 33% 0000 T _sureg compatible 00e8 T _estabur functional compatible: uses different temp. reg. 01ae T _sestabur compatible 0296 T _segureg not existent 0438 T _ldsdr not existent 0548 T _prmmu not existent --- WEGA/src/uts/sys/ureg.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/WEGA/src/uts/sys/ureg.c b/WEGA/src/uts/sys/ureg.c index 321df47..66f8910 100644 --- a/WEGA/src/uts/sys/ureg.c +++ b/WEGA/src/uts/sys/ureg.c @@ -96,31 +96,37 @@ register unsigned nt, nd, ns; sestabur(nt, nd, ns, sep) register unsigned nt; +char nd; register unsigned ns; register unsigned sep; { - int foo2; + int stakseg; - if(nt > 0x100) { + if(nt > 256) { u.u_error = ENOMEM; return(-1); } - foo2 = nd&LONGMASK; + stackseg = nd&LONGMASK; - if(sep>0x0080) { + if(sep > 128) { u.u_error = ENOEXEC; return(-1); } - if(foo2 == u.u_stakseg) { - u.u_segmts[NUSEGS-1].sg_limit = (!nt?0:-nt+0x100); - u.u_segmts[NUSEGS-1].sg_attr = (!nt?0x20:-nt+0x14); + if(stackseg == u.u_stakseg) { + u.u_segmts[NUSEGS-1].sg_limit = (!nt?0:-nt+256); + u.u_segmts[NUSEGS-1].sg_attr = (!nt?32:-nt+20); return(0); } + + u.u_segmts[ns].sg_limit = (!nt?0:nt-1); -/*FIXME: and now the whole thing is missing.... */ - + if(nd&128) { + u.u_segmts[ns].sg_attr = (!nt?20:sep); + } else { + u.u_segmts[ns].sg_attr = (!nt?20:0); + } return(0); }