Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Feb 2000 08:58:54 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        dfr@nlsystems.com
Cc:        alpha@freebsd.org
Subject:   Re: pcb_onfault bug on alpha?
Message-ID:  <200002241658.IAA39924@vashon.polstra.com>
In-Reply-To: <Pine.BSF.4.10.10002240856070.54384-100000@tecra.nlsystems.com>
References:  <Pine.BSF.4.10.10002240856070.54384-100000@tecra.nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On a related topic, do you have any idea why they did all this
".set noat" nonsense in copyout instead of simply using t0 to set
pcb_onfault as is done elsewhere?  I can't see any reason why they'd
need to preserve t0 at this point.

NESTED(copyout, 3, 16, ra, 0, 0)
        LDGP(pv)
        lda     sp, -16(sp)                     /* set up stack frame        */
        stq     ra, (16-8)(sp)                  /* save ra                   */
        ldiq    t0, VM_MAXUSER_ADDRESS          /* make sure that dest addr  */
        cmpult  a1, t0, t1                      /* is in user space.         */
        beq     t1, copyerr                     /* if it's not, error out.   */
        lda     v0, copyerr                     /* set up fault handler.     */
        .set noat
        ldq     at_reg, curproc
        ldq     at_reg, P_ADDR(at_reg)
        stq     v0, U_PCB_ONFAULT(at_reg)
        .set at
        CALL(bcopy)                             /* do the copy.              */
        .set noat
        ldq     at_reg, curproc                 /* kill the fault handler.   */
        ldq     at_reg, P_ADDR(at_reg) 
        stq     zero, U_PCB_ONFAULT(at_reg)
        .set at
        ldq     ra, (16-8)(sp)                  /* restore ra.               */
        lda     sp, 16(sp)                      /* kill stack frame.         */
        mov     zero, v0                        /* return 0. */
        RET
        END(copyout)

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002241658.IAA39924>