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