Annotation of 43BSDTahoe/sys/tahoealign/Asbwc.c, revision 1.1.1.1

1.1       root        1: /*     Asbwc.c 1.1     86/07/20        */
                      2: 
                      3: 
                      4: #include "../tahoealign/align.h" 
                      5: sbwc(infop)    process_info *infop;
                      6: /*
                      7: /*     Subtract with carry.
                      8: /*     Note : the play with 'tmp' just before the 'asm' line makes
                      9: /*             sure that when the sbwc opcode is executed, the current
                     10: /*             carry in psl is the same as the 'offending' process'.
                     11: /*             Don't change unless you know exactly what you're doing.
                     12: /*
                     13: /*****************************/
                     14: {
                     15:        register        long    Register_12;    /* Has to be first reg ! */
                     16:        register        long    Register_11;
                     17:        register        long    Register_10;
                     18:        register        long    tmp;
                     19: 
                     20:        Register_12 = operand(infop,0)->data;
                     21:        Register_11 = operand(infop,1)->data;
                     22:        if (carry)      /* If process' carry set */
                     23:                tmp = -1;
                     24:        else tmp = 0;
                     25:        tmp++;          /* 0 => carry set.  1 => carry clear */
                     26: 
                     27:        Register_10=psl;
                     28:        Set_psl(r10);   /* restore the user psl */
                     29:        asm("   sbwc    r12,r11");
                     30:        asm("   movpsl  r12");
                     31:        New_cc (Register_12);
                     32: 
                     33:        write_back(infop, Register_11, operand(infop,1) );
                     34: }

unix.superglobalmegacorp.com

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