Annotation of 43BSDReno/pgrm/lisp/franz/tahoe/calqhat.s.org, revision 1.1

1.1     ! root        1:        .align  1
        !             2:        .globl  _calqhat
        !             3: _calqhat:
        !             4:        .word   0xffc
        !             5:        movl    4(fp),r11               # &u[j] into r11
        !             6:        movl    8(fp),r10               # &v[1] into r10
        !             7:        cmpl    (r10),(r11)             # v[1] == u[j] ??
        !             8:        beql    L102                    
        !             9:        # calculate qhat and rhat simultaneously,
        !            10:        #  qhat in r0
        !            11:        #  rhat in r1
        !            12:        emul    (r11),$0x40000000,4(r11),r4 # u[j]b+u[j+1] into r4,r5
        !            13:        ediv    (r10),r4,r0,r1          # qhat = ((u[j]b+u[j+1])/v[1]) into r0
        !            14:                                        # (u[j]b+u[j+1] -qhat*v[1]) into r1
        !            15:                                        # called rhat
        !            16: L101:
        !            17:        # check if v[2]*qhat > rhat*b+u[j+2]
        !            18:        emul    r0,4(r10),$0,r2         # qhat*v[2] into r3,r2
        !            19:        emul    r1,$0x40000000,8(r11),r8 #rhat*b + u[j+2] into r9,r8
        !            20:        # give up if r3,r2 <= r9,r8, otherwise iterate
        !            21:        subl2   r8,r2                   # perform r3,r2 - r9,r8
        !            22:        sbwc    r9,r3
        !            23:        bleq    L103                    # give up if negative or equal
        !            24:        decl    r0                      # otherwise, qhat = qhat - 1
        !            25:        addl2   (r10),r1                # since dec'ed qhat, inc rhat by v[1]
        !            26:        jbr     L101
        !            27: L102:  
        !            28:        # get here if v[1]==u[j]
        !            29:        # set qhat to b-1
        !            30:        # rhat is easily calculated since if we substitute b-1 for qhat in
        !            31:        # the formula, then it simplifies to (u[j+1] + v[1])
        !            32:        # 
        !            33:        addl3   4(r11),(r10),r1         # rhat = u[j+1] + v[1]
        !            34:        movl    $0x3fffffff,r0          # qhat = b-1
        !            35:        jbr     L101
        !            36:        
        !            37: L103:
        !            38:        ret
        !            39: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.