Annotation of lucent/sys/src/liblock/mipstas.s, revision 1.1.1.1

1.1       root        1: /*
                      2:  *     magnum user level lock code
                      3:  */
                      4: 
                      5: #define        LL(base, rt)    WORD    $((060<<26)|((base)<<21)|((rt)<<16))
                      6: #define        SC(base, rt)    WORD    $((070<<26)|((base)<<21)|((rt)<<16))
                      7: #define        NOOP            WORD    $0x27
                      8: #define COP3           WORD    $(023<<26)
                      9: 
                     10:        TEXT    C_3ktas(SB),$0
                     11:        MOVW    R1, R21
                     12: btas:
                     13:        MOVW    R21, R1
                     14:        MOVB    R0, 1(R1)
                     15:        NOOP
                     16:        COP3
                     17:        BLTZ    R1, btas
                     18:        RET
                     19: 
                     20:        TEXT    C_4ktas(SB), $0
                     21:        MOVW    R1, R2          /* address of key */
                     22: tas1:
                     23:        MOVW    $1, R3
                     24:        LL(2, 1)
                     25:        NOOP
                     26:        SC(2, 3)
                     27:        NOOP
                     28:        BEQ     R3, tas1
                     29:        RET
                     30: 
                     31:        TEXT    C_fcr0(SB), $0
                     32:        MOVW    FCR0, R1
                     33:        RET

unix.superglobalmegacorp.com

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