Annotation of cci/usr/src/usr.lib/libF77/rindex_s.s, revision 1.1

1.1     ! root        1: .data
        !             2: .text
        !             3: LL0:.align     1
        !             4: .globl _rindex_
        !             5: .set MASK__,0x1c0c
        !             6: .data
        !             7: .text
        !             8: _rindex_: .word        MASK__
        !             9: 
        !            10:        movl    16(fp),r12      /* sublen */
        !            11:        tstl    r12             /* if sublen == 0 */
        !            12:        jeql    out0            /*   return(0L) */
        !            13: 
        !            14:        movl    4(fp), r11      /* str */
        !            15:        movl    8(fp), r10      /* substr */
        !            16:        addl3   r11, 12(fp), r3 /* p = str + strlen */
        !            17:        subl2   r12, r3         /* p -= sublen */
        !            18: loop:
        !            19:        cmpl    r3, r11         /* while (p >= str) */
        !            20:        jlss    out0            /* not found - return(0L) */
        !            21:        movl    r3, r0          /* current p (in str) */
        !            22:        movl    r10, r1         /* substr */
        !            23:        movl    r12, r2         /* sublen */
        !            24:        cmps3                   /* if strigs equal */
        !            25:        jeql    out             /* return index */
        !            26: 
        !            27:        decl    r3              /* p-- */
        !            28:        jbr     loop
        !            29: 
        !            30: out:
        !            31:        incl    r3              /* index = ++p - str */
        !            32:        subl3   r11, r3, r0
        !            33:        ret
        !            34: 
        !            35: out0:
        !            36:        clrl    r0
        !            37:        ret
        !            38: 

unix.superglobalmegacorp.com

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